Ameya Solutions’ netProfileManager

2
Categories: .NET, C#, News
Posted on: 26th February 2010 by: Andrei

This is a small network profile manager that I’ve developed at the request of a friend of mine. He’s pleased with it and encouraged me to publish it.

The application is called netProfileManager and it is written in C#.

netProfileManager Screenshot

netProfileManager Screenshot

The main goal of the software is to allow you to create profiles that store your network configurations. It supports IPv4 both static and DHCP configurations. It uses the netsh and ipconfig command line utilities.

Profiles can be launched by right clicking the application icon in the tray bar or from the main interface. The software is provided as is with no warranty whatsoever.

Don’t hesitate to contact me if you wish to report a bug or make a suggestion.

You can download it here: http://ameya.ro/downloads.php

I would love to hear some feedback from those who’ve already tested it.

Simulating mouse movement and actions in C#

1
Categories: .NET, C#
Posted on: 2nd November 2009 by: Andrei

I’ve recently worked on a project that required my application to move the mouse and left click on some items.

Here’s a simple working solution that will handle mouse movement and left clicking.


using System.Runtime.InteropServices;

private const UInt32 MouseEventLeftDown = 0x0002;

private const UInt32 MouseEventLeftUp = 0x0004;

 [DllImport("user32.dll")]
 private static extern void mouse_event(UInt32 dwFlags, UInt32 dx, UInt32 dy, UInt32 dwData, IntPtr dwExtraInfo);

private void leftClick()
 {
 mouse_event(MouseEventLeftDown, 0, 0, 0, new System.IntPtr());
 mouse_event(MouseEventLeftUp, 0, 0, 0, new System.IntPtr());
 }

private void mouseMove()
 {
 Cursor.Position = new Point(Cursor.Position.X - 200, Cursor.Position.Y - 200);
 }

MSDN Beginner

0
Categories: .NET, News
Posted on: 13th August 2009 by: Andrei

The Microsoft Developer Network has released a new site aimed at teaching kids and beginners how to program.

You can find more information here: http://msdn.com/beginner .

Windows Mobile 6.5 Developer Tool Kit available

0
Categories: .NET, Mobile, News
Posted on: 5th June 2009 by: Andrei

You can download it here but keep in mind that it requires the Windows Mobile 6 SDK which you can get here. It includes API’s for “touch gestures” and “physics”.

More details here.

Performance testing of Dictionary, List and HashSet

0
Categories: .NET, C#
Posted on: 30th May 2009 by: Andrei

This is an interesting article. I won’t spoil the results.

Read all about it here: http://softscenario.blogspot.com/2009/05/performance-testing-of-dictionary-list.html

How to add rows to a DataGridView programmatically in C#

0
Categories: .NET, C#
Posted on: 15th May 2009 by: Andrei

// Populate the row
string[] row = new string[] {"Item 1","Item 2","Item 3"};

//Add the row to the DataGridView
dataGridView.Rows.Add(row[0]);

You can, of course, create an object array with multiple row arrays and use a foreach to add them all to the DataGridView.

Learning the Observer Pattern

0
Categories: .NET
Posted on: 8th May 2009 by: Andrei

The Observer pattern allows you to define a one-to-many relationship inside your application where the parent object (the one) has the ability to notify the child objects (the many) of any state change. You can utilize this pattern to make sure that a set of objects are keep in order when there behavior needs to change based on the state of your application.

http://www.dimecasts.net/Casts/CastDetails/108

Regex Hero – The Online .NET Regular Expression Tester

2
Categories: .NET
Posted on: 7th May 2009 by: Andrei

A real-time online Silverlight regular expression testing & benchmarking tool utilizing the .NET regular expression engine.

Check it out here: Regex Hero

Windows 7 SDK and .NET Framework 3.5 SP1 RC

0
Categories: .NET
Posted on: 7th May 2009 by: Andrei

Microsoft has just released the Windows Software Development Kit (SDK) for Windows 7 and .NET Framework 3.5 Service Pack 1 (SP1): Release Candidate (RC).

You can get it here Windows SDK

How to copy a folder recursively in C#

0
Categories: .NET, C#, Linux
Posted on: 5th May 2009 by: Andrei

using System;
using System.IO;

namespace cpFolder
{
	class Program
	{
		static void Main( string[] args )
		{
			copyFolder( @"C:\source", @"C:\destination" );
            Console.ReadLine();
        }
        static public void copyFolder( string sourceFolder, string destFolder )
        {
            if (!Directory.Exists( destFolder ))
            Directory.CreateDirectory( destFolder );
            string[] files = Directory.GetFiles( sourceFolder );
            foreach (string file in files)
            {
                string name = Path.GetFileName( file );
                string dest = Path.Combine( destFolder, name );
                File.Copy( file, dest );
            }
            string[] folders = Directory.GetDirectories( sourceFolder );
            foreach (string folder in folders)
            {
                string name = Path.GetFileName( folder );
                string dest = Path.Combine( destFolder, name );
                copyFolder( folder, dest );
            }
        }
    }
}