Wednesday, June 30, 2004

Getting the current path of my application

Re: Getting the current path of my application :

System.Environment.CurrentDirectory
AppDomain.CurrentDomain.BaseDirectory

317421 - HOW TO: Create a Setup Project for a Windows Service in Visual Basic .NET

317421 - HOW TO: Create a Setup Project for a Windows Service in Visual Basic .NET
To tell the deployment project what it should package, follow these steps:
In Solution Explorer, right-click ServiceSetup, point to Add, and then click Project Output.
In the Add Project Output Group dialog box, in the Project box, click LogWriterService.
Click Primary Output, and then click OK.
For proper installation, you are only required to add primary output. To add the custom actions, follow these steps:
In Solution Explorer, right-click ServiceSetup, point to View, and then click Custom Actions.
Right-click Custom Actions, and then click Add Custom Action.
Click Application Folder, and then click OK.
Click Primary output from LogWriterService (Active), and then click OK. Notice that Primary output appears under Install, Commit, Rollback and Uninstall.
Setup projects are not included in the build configuration by default. To build the solution, follow these steps:
Right-click LogWriterService, and then click Build. Subsequently, right-click ServiceSetup, and then click Build.

Wednesday, June 23, 2004

Chapter 14 - Improving SQL Server Performance

Chapter 14 - Improving SQL Server Performance

.NET 247 : Command Builder vs. Loop. - on ASPFriends.com 'aspngdata' list

.NET 247 : Command Builder vs. Loop. - on ASPFriends.com 'aspngdata' list

Thursday, June 17, 2004

Array sorting example

private class Game
{
internal GameEnum GameEnum;
internal int Position;
internal Game(GameEnum gameEnum, int position)
{
GameEnum = gameEnum;
Position = position;
}
}

private class GameComparer : System.Collections.IComparer
{
public int Compare(object x, object y)
{
// We are going to sort array of positions.
// We want to have the smallest position at the begining of sorted array
// We want "i1" value at the end of the array
Selector.Game gameX = (Game)x;
Selector.Game gameY = (Game)y;
int xPosition = gameX.Position;
int yPosition = gameY.Position;


if (xPosition == yPosition)
return 0;
if (xPosition == -1)
return 1; //Moves x to the end of the sorted array
if (yPosition == -1)
return -1; //Moves x toward beginning of the sorted array
if (xPosition < yPosition)
return -1; //Moves x toward beginning of the sorted array
else
return 1; //Moves x toward the end of the sorted array
}
}

Wednesday, June 16, 2004

The Code Project - Handle multiple configuration files - C# Programming

The Code Project - Handle multiple configuration files - C# Programming
Here is another recipe for cooking up and serving your own configuration files. And I mean any configuration file, not just your ready-to-serve app.config and web.config files. Readers who need a refresher on the configuration file layout or mechanics can see prior articles published here or other references.


Friday, June 11, 2004

Convert Image into MMS (cell phone) format

using MMSEngineLib;

MMSSimpleMessage objSimpleMessage = new MMSSimpleMessageClass();
MMSEngineLib.MMSImageMediaElement objImage=
objSimpleMessage.MediaElements.AddImage(@"D:\Dennis\projects\MMS\xmasmicro.jpg");
objSimpleMessage.GenerateMMSMessage(@"D:\Dennis\projects\MMS\xmasmicro.mms");

Monday, June 07, 2004

HOW TO: Send and Receive Binary Documents by Using an ASP.NET Web Service and Visual C# .NET

Send and Receive Binary Documents by Using an ASP.NET Web Service and Visual C# .NET

This page is powered by Blogger. Isn't yours?