|
You are correct. I should have re-read the question first.
|
|
|
|
|
Gerry Schmitz wrote: I prefer he find it out for himself (based on any discussion). If he wanted to find out himself, would he have been here?
Gerry Schmitz wrote: (OP NEVER said he was dealing with updates from MULTIPLE sources). Not directly, no. Now why would a single client need to see his own updates live propagated through the system?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
As Andy said to the warden...
|
|
|
|
|
I know you asked this a long time ago, but since this question originally triggered me in writing the article: What You See Is What You Update , you could find it interesting.
|
|
|
|
|
I am trying to use wizard in windows app but cannot found any Wizard control.
Please let me know if any one know the answer.
Thank you in advance.
|
|
|
|
|
Windows Forms? WPF? Universal Windows app?
This space for rent
|
|
|
|
|
|
This[^] is available for free.
This space for rent
|
|
|
|
|
..then why is there ASP.NET in your subject?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
|
I am new to this concept and i am looking for control in toolbox which is similar to wizard functionality or you can say same as Multi-view(in web)
|
|
|
|
|
Take a look at the Panel and Tab controls in the toolbox.
|
|
|
|
|
If you are just trying to hold multiple controls under one parent control, then did you look into the TabControl [^]? It indeed is the toolbox for Windows Forms.
This Introduction to the Windows Forms TabControl[^] will help you to get started.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Do you mean the installer Wizard? If that is the case, then just use the Publish feature of Visual Studio. Publish Wizard[^].
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Good evening; I'm looking for a source code to make a datagridView with Multi Header Columns and Multi Cell Header As shown
image
All that is in gray is the head that I am trying to code
|
|
|
|
|
And?
What have you tried?
Where are you stuck?
What help do you need?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
|
I have dynamically created controls that I want to use to create and write an output file with.
How can I organize the controls values based on their name?
private TextBox txtBox1 = new TextBox();
private ComboBox cmbx1 = new ComboBox();
private TextBox txtBox2 = new TextBox();
private TextBox txtBox3 = new TextBox();
private Button btn1 = new Button();
int configLineIndex = 1;
private void btnCuRepairConfigAddLine_Click(object sender, EventArgs e)
{
configLineIndex++;
tbxHorizontalIndex = 21;
txtBox1 = new TextBox();
txtBox1.Name = "line" + configLineIndex + "a";
int tbxWidth = 285;
this.txtBox1.Location = new System.Drawing.Point(tbxHorizontalIndex, tbxVerticalIndex + 30);
this.txtBox1.Size = new System.Drawing.Size(tbxWidth, 20);
this.Controls.Add(txtBox1);
cmbx1 = new ComboBox();
cmbx1.Name = "line" + configLineIndex + "b";
this.cmbx1.Location = new Point(tbxHorizontalIndex + 299, tbxVerticalIndex + 30);
this.cmbx1.Size = new Size(121, 21);
this.cmbx1.Items.Add("addAfter");
this.cmbx1.Items.Add("addBefore");
this.cmbx1.Items.Add("Replace");
this.Controls.Add(cmbx1);
txtBox2 = new TextBox();
txtBox2.Name = "line" + configLineIndex + "c";
tbxWidth = 320;
this.txtBox2.Location = new System.Drawing.Point(tbxHorizontalIndex + 435, tbxVerticalIndex + 30);
this.txtBox2.Size = new System.Drawing.Size(tbxWidth, 20);
this.Controls.Add(txtBox2);
txtBox3 = new TextBox();
txtBox3.Name = "line" + configLineIndex + "d";
tbxWidth = 320;
this.txtBox3.Location = new System.Drawing.Point(tbxHorizontalIndex + 770, tbxVerticalIndex + 30);
this.txtBox3.Size = new System.Drawing.Size(tbxWidth, 20);
this.Controls.Add(txtBox3);
btn1 = new Button();
btn1.Name = "line" + configLineIndex + "e";
this.btn1.Location = new Point(tbxHorizontalIndex + 1110, tbxVerticalIndex + 30);
this.btn1.Size = new Size(20, 20);
this.btn1.Text = "X";
this.Controls.Add(btn1);
tbxVerticalIndex = tbxVerticalIndex + 30;
}
|
|
|
|
|
you could start by giving your controls meaningful names so anyone can better guess what they are used for. You can list all the controls on your form by something like:
foreach (Control cc in Controls)
{
}
See Control Class (System.Windows.Forms)[^] for Properties, Methods etc.
|
|
|
|
|
Suppose I want to allow users of my app to rank holidays by attaching a number to each of them, then I want my app to sort them, what is the easiest way of achieving this? Please see below
"Christmas"
"New Year"
"July Fourth"
"Thanksgiving"
"Veteran's Day"
"Valentine's Day"
I thought about concatenating a number to each string and then placing the strings in an array.
Then loop through the array, checking if the string in each array index contains a number.
Next sort the strings using bubble sort.
Finally remove the numbers from these strings.
Is this the easiest way of ranking and then sorting them or is there a better way?
modified 22-Nov-16 11:47am.
|
|
|
|
|
Don't stick with a string. If I were doing this, I would look to put this in a structure something like this:
public struct DaySort
{
public string ImportantDate { get; set; }
public int SortOrder { get; set; }
public override string ToString()
{
return ImportantDate;
}
} By supplying an override of ToString, I can still just write out the item without having to specify ImportantDate outside of this structure, so I would still appear to be following the semantics of the string type that you are used to. Now, sorting is as simple as:
IOrderedEnumerable<DaySort> sortedList = myListOfDays.OrderBy(ds => ds.SortOrder);
This space for rent
|
|
|
|
|
Hi, thank you for replying. Your solution will work great as it allows two or more holidays to have the same ranking value.
I can use guard clauses to prevent duplicate ranking values if there is a need for them to be unique.
modified 22-Nov-16 17:22pm.
|
|
|
|
|
Another easy way to do this is using Dictionary<int, string> [^] type. This type will hold the weight assigned to vacation, as well as the name of it in string. Then you can easily sort them using their key.
You need to store both of values (name + weight given) to the dictionary, no additional type generation is required as the dictionary object is a generic type.
This[^] link has a wonderful example of what you are trying to achieve.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
IIRC, a dictionary can't have duplicate keys. This would mean that two holidays cannot be ranked "equal".
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack.
--Winston Churchill
|
|
|
|
|
Oh.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|