|
absolutely positively yes.
[ADDED] Assuming it's about variables, not properties.[/ADDED]
modified on Tuesday, July 22, 2008 2:23 PM
|
|
|
|
|
Good People,
I am about to finish an application I am working on. The target audience is the general consumer. Do you have any application deployment tool recommendations?
ClickOnce and Windows Installer (by MSDN's own admission) seems to be primarily for enterprise environments wherein much is known about who will be using it and how. However, I need something that would be great for the average joe/josephine who will be downloading and using the software.
Thanks,
BP
|
|
|
|
|
It depends on what your requirements are for the installer. If all you need is a license agreement, possibly some registry changes, and a sparse amount of user input then I would say a Visual Studio Setup project should be sufficient. It's extremely easy to setup (VS has a wizard for creating the project) and the installer is straightforward for the end user. There's limited customization, but you also won't have to learn any scripting languages. It really depends on how much effort you want to put into it, and if you want to customize the look and feel of the installer.
|
|
|
|
|
Thanks Garrett.
Indeed, all I need the user to do is accept the license agreement and provide the license code or somehow authenticate the software.
I have two quick questions:
1) Can I at least put my own graphic on the install screens (e.g. a company logo, etc...)?
2) Does Visual Studio Setup allow me to ensure that the user has a license (i.e. provide a license or authorization key)?
These are really the only functions that I need.
Thanks again.
|
|
|
|
|
You can set a custom banner for the graphics. As for the license, you can provide a license where the user has to agree, and you can also request a user name, organization, and serial number. Here's a brief explanation of how to validate a serial number (although it's old, the idea should be the same): http://support.microsoft.com/kb/253683[^]
|
|
|
|
|
Thanks Garret. I appreciate the information.
|
|
|
|
|
Hi,
1) I am sure that you can use your own images on installation screens. It is pretty easy in Vs Wizard to customize your installation forms.
2) As far as I know licensing is kinda different platform, it requires additional tools. Well I am not sure but I think you cannot handle licensing only with VS setup wizard. I suggest googling on this issue...
Hope this helps.
|
|
|
|
|
I was given the following class to C# clean up. It's a mess.
****
using System;
private enum sections
{
section1 = 1,
section2 = 2,
section3 = 3
}
namespace My.Name.Space{
public class UppperClass
{
abstract public void NoClass();
private string upper
public string Upper
{
get
{
Upper = value;
}
Put
{
return(Upper);
}
private void UpperDiv(interface number1, number2)
{
private int upperResult;
upperResult==number1/number2;
return result;
}
}
public class MiddleClass : UppperClass
{
UpperClass[] upperArray;
upperArray = new UpperClass[5];
for(int i=0; int<= upperArray.length; i+)
{
upperArray[int] = new UpperClass();
}
public void MiddleDiv()
{
int middleResult = 0;
int sumOfAllResults;
middleResult=UpperDiv(1,2);
sumOfAllResults= ++middleResult;
}
}
public class LowerClass : UpperClass
{
string lowerString;
private Boolean initialized = false;
public void LowerClass(int paramInt) //Base Method overload 1, return nothing
{
initialized=1;
}
public string LowerClass(int paramInt) //Base Method Overload 2, return string
{
lowerString = paraamInt.ToString;
return lowerString;
}
public override void NoClass()
{
MiddleDiv(3,4);
}
}
********
|
|
|
|
|
You best get started then, it shouldn't take too long
My current favourite word is: I'm starting to run out of fav. words!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
Hey,
I am trying to multithread my xml parsing routine but it seems that there are some issues with accessing attributes.
I have created a recursive xml parser using the composite pattern. So it means that I have a state class (a node in the xml file) which parses itself and depending on the child it creates another state and tells it to parse itself in a seperate thread and passes it the child node containing its data. The parse function for all my classes do not modify the xml node, they only read attributes. None of the functions should end up with the same xml node.
However when I run it in threaded mode... all my parse functions end up with the same xml node even if i am passing them a different node. If i set a break on each parse function the xml will be loaded correctly (i guess because it has time to finish the thread) but otherwise they end up parsing the same thing somehow.
mRootState = ParseContext(mNode);
mRootState.IsRoot = true;
foreach (XmlNode mChildNode in mNode.ChildNodes)
{
if (mChildNode.Name == "State")
{
if (mChildNode.Attributes["type"].Value == "Context")
{
Context mNewContext = new Context();
mRootState.Children.Add(mNewContext);
Thread t = new Thread(delegate() { mNewContext.Parse(mChildNode); });
t.Start();
mThreads.Add(t);
}
}
}
I am not sure why the keep ending up with the same xml node because they are supposed to be passed a different child node each time. Do I need to lock something? Or what is the problem?
|
|
|
|
|
I want to create a control on the form when the MouseDown event on the form fires and then use the MouseMove event on the newly created control to drag the control around the form. Unfortunately the MouseMove event doesn't appear to fire on the new control until the mouse button is released! ... This is the simplest cut down of the issue I could create.
private void button1_MouseMove(object sender, MouseEventArgs e)
{
this.Text = "Button: e.x=" + e.X.ToString() + " e.y=" + e.Y;
}
private void Form2_MouseMove(object sender, MouseEventArgs e)
{
this.Text = "Form: e.x=" + e.X.ToString() + " e.y=" + e.Y;
}
private void Form2_MouseDown(object sender, MouseEventArgs e)
{
Button button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
button1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.button1_MouseMove);
this.Controls.Add(button1);
this.ResumeLayout(false);
}
Is it possible to 'wire up' the MouseMove event so that it will fire on the new control before the mouse button is released ?
Michael
modified on Tuesday, July 22, 2008 11:35 AM
|
|
|
|
|
private bool Draged = false;
private int clickOffsetX;
private int clickOffsetY;
private void Sensor_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
this.Draged = true;
clickOffsetX = e.X;
clickOffsetY = e.Y;
}
}
private void Sensor_MouseMove(object sender, MouseEventArgs e)
{
if (this.Draged && e.Button.Equals(MouseButtons.Left))
{
this.Left += e.X - this.clickOffsetX;
this.Top += e.Y - this.clickOffsetY;
}
}
use the above
it works fine to me with a user control i've built that acts like a sensor
and can be moved around in an area of deployment
hope it helps
Have Fun
Never forget it
|
|
|
|
|
Thanks for sharing your code Half-life! thats the most elegant implementation of the 'moving control' solution I have seen It still doesn't solve my problem though, which is getting that MouseMove event to fire on the newly created control before the Mouse button has been released
|
|
|
|
|
I figured it out!
My problem had nothing to do with the control being new at all. When you MouseDown on the form, the form 'Captures' all subsequent mouse events until the next MouseUp... That is why my button control was not getting any events, the Form was stealing them!
The solution was to force the parent form to 'release' the capture so that the new button could receive the MouseMove event...
private void Form2_MouseDown(object sender, MouseEventArgs e)
{
Button button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
this.Controls.Add(button1);
button1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.button1_MouseMove);
this.Capture = false;
this.ResumeLayout(false);
}
|
|
|
|
|
HI All,
Sorry for the vague title, but I have a scenario as below, which I am hoping to automate – but not really sure where to begin!
We have two c# windows applications:-
1) Creates XML files for order entry & places them on the network.
2) A user manually navigates to a section in another c# windows app to see if there are any xml orders to import.
I am wanting to write a new routine, which could be running in the background, that would check to see if any new xml files are placed on the network - if so can it mimic the steps which the user takes to import these xml orders?
I'm sure it can - I just dont know what to search for on google - any help would be much appreciated
Lady Programmers are a rare breed!
|
|
|
|
|
Hi,
FileSystemWatcher class would help in detecting new files automatically.
Easiest would be to amend your second program, so it gets the option to import
automatically. Creating a third program that manipulates the second's GUI is doable
but could be tricky, depends on what Controls the user has to manipulate when doing
it interactively. If the source of program 2 is available, I would modify it, and
not create a third program.
|
|
|
|
|
Thx - FileSystemWatcher certainly sounds like the way to go. And, yes I do have the source for the 2nd solution, so I am able to modify it.
Lady Programmers are a rare breed!
|
|
|
|
|
Well if you want this code to run in the background, the best solution is to create a service (New Project -> C# -> Windows -> 'Windows Service' template). The most robust way to get your service to 'watch' for new files is to employ a kind of 'find, move and process' strategy.
you need a
1) a 'drop' folder where the files will be initially written.
2) a 'process' folder where the files will sit between being found and being processed
3) an 'archive' folder where the files will go when your finished processing
The pseudo code for this looks a bit like this...
- list files in the 'drop' folder (keep this 'list' in memory somehow)
- move any found files to the 'process' folder
- process each found file in turn and move to the 'archive' folder when finished.
This is just one approach. Hope this helps.
Michael
|
|
|
|
|
Thx for this - I will prob implement FileSystemWatcher following your steps for moving and archiving.
Janet
Lady Programmers are a rare breed!
|
|
|
|
|
Hi,
I have managed to populated a treeview with items and subitems.
Icons are used for items and subitems...
i.e.
item1
subitemA
SubitemB
subitemC
item2
subitemA
SubitemB
subitemC
item3
subitemA
SubitemB
subitemC
...
...
...
How is it possible to allow the results in this treeview control to be viewed/ordered either by items or by subitems. So that one can see all subitems for a particular item, or all items for a particular subitem?
Thanks
|
|
|
|
|
u will need to clear the tree view each time u change the view type
and save all item in a hashtables that has
hastable 1 view type 1
[key = subitem ,value array list of ref to items ]
and :
hastable 2 view type 2
[key = item ,value array list of ref to subitems ]
this is called mirroring
and then re insert them your self using those hastables
Have Fun
Never forget it
|
|
|
|
|
I see.
How about using a dataset or a datatable instead?
Thanks
|
|
|
|
|
u can but why?
hashtable gives u the ultimate key to value without "asking"
the datatable inside a dataset to give u information
here u just get the value u want from the hashtable Like :
hastable[key] and that it
where in a datatable u need to u use the select method
hastable are designed to be fast and one way in purpose
Have Fun
Never forget it
|
|
|
|
|
In that case, would a generic collection be a good decision for this purpose?
Thanks
|
|
|
|
|