[csmaild-cvs] csmaild/src/TestClient Main.cs,1.4,1.5 Main.resx,1.4,1.5
Brought to you by:
tamc
From: <ta...@us...> - 2003-07-29 00:46:33
|
Update of /cvsroot/csmaild/csmaild/src/TestClient In directory sc8-pr-cvs1:/tmp/cvs-serv8950/src/TestClient Modified Files: Main.cs Main.resx Log Message: Updated 2002 project files for people using legacy IDE's ;) Added initial POP project, no code, just a project Changes to the mail store to support DELETE, RENAME, CREATE commands Nearly finished with said commands, more testing needed Moved NetworkManager to common, so POP can use it Index: Main.cs =================================================================== RCS file: /cvsroot/csmaild/csmaild/src/TestClient/Main.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Main.cs 26 Jul 2003 23:09:25 -0000 1.4 --- Main.cs 29 Jul 2003 00:46:29 -0000 1.5 *************** *** 16,19 **** --- 16,20 ---- ClientHelper mHelper; int mCounter = 0; + ArrayList mResponseCounts = new ArrayList(); private System.Windows.Forms.Button cmdLocalhost; *************** *** 111,114 **** --- 112,116 ---- this.lstCommunicationLog.Location = new System.Drawing.Point(8, 40); this.lstCommunicationLog.Name = "lstCommunicationLog"; + this.lstCommunicationLog.SelectionMode = System.Windows.Forms.SelectionMode.MultiSimple; this.lstCommunicationLog.Size = new System.Drawing.Size(600, 432); this.lstCommunicationLog.TabIndex = 3; *************** *** 194,198 **** // this.lstCommandsToProcess.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.lstCommandsToProcess.CheckOnClick = true; this.lstCommandsToProcess.Font = new System.Drawing.Font("Verdana", 8.25F); this.lstCommandsToProcess.Location = new System.Drawing.Point(616, 40); --- 196,199 ---- *************** *** 208,211 **** --- 209,213 ---- this.Controls.Add(this.lstCommandsToProcess); this.Controls.Add(this.label1); + this.Controls.Add(this.txtAddCommands); this.Controls.Add(this.numPause); this.Controls.Add(this.cmdDelete); *************** *** 213,217 **** this.Controls.Add(this.cmdMoveUp); this.Controls.Add(this.cmdAdd); - this.Controls.Add(this.txtAddCommands); this.Controls.Add(this.lstCommunicationLog); this.Controls.Add(this.cmdChegg); --- 215,218 ---- *************** *** 232,235 **** --- 233,238 ---- lstCommunicationLog.SelectedIndex = lstCommunicationLog.Items.Count-1; + mResponseCounts[mResponseCounts.Count-1] = (int)mResponseCounts[mResponseCounts.Count-1]+1; + Application.DoEvents(); } *************** *** 242,245 **** --- 245,249 ---- lstCommunicationLog.Items.Add(mCounter++.ToString().PadLeft(4, ' ') + " <- " + line); lstCommunicationLog.SelectedIndex = lstCommunicationLog.Items.Count-1; + mResponseCounts[mResponseCounts.Count-1] = (int)mResponseCounts[mResponseCounts.Count-1]+1; } Application.DoEvents(); *************** *** 277,280 **** --- 281,287 ---- lstCommunicationLog.Items.Clear(); + mResponseCounts.Clear(); + mResponseCounts.Add(0); + cmdAdd.Enabled = false; cmdDelete.Enabled = false; *************** *** 287,298 **** ReadLine(); // read welcome msg ! for(int idx = 0; idx < lstCommandsToProcess.Items.Count; ++idx) { ! if(lstCommandsToProcess.CheckedIndices.IndexOf(idx) != -1) ! { ! lstCommandsToProcess.SelectedIndex = idx; ! SendReceiveCommand(lstCommandsToProcess.SelectedItem as string); ! System.Threading.Thread.Sleep((int)numPause.Value * 100); ! } } --- 294,303 ---- ReadLine(); // read welcome msg ! for(int idx = 0; idx < lstCommandsToProcess.CheckedIndices.Count; ++idx) { ! mResponseCounts.Add(0); ! lstCommandsToProcess.SelectedIndex = lstCommandsToProcess.CheckedIndices[idx]; ! SendReceiveCommand(lstCommandsToProcess.SelectedItem as string); ! System.Threading.Thread.Sleep((int)numPause.Value * 100); } *************** *** 350,353 **** --- 355,370 ---- else { + lstCommunicationLog.SelectedIndex = -1; + int idx = lstCommandsToProcess.CheckedIndices.IndexOf(lstCommandsToProcess.SelectedIndex); + if(mResponseCounts.Count >= idx+2) + { + int pos = 0; + for(int iidx = idx; iidx >= 0; --iidx) + pos += (int)mResponseCounts[iidx]; + int cnt = (int)mResponseCounts[idx+1]-1; + for(; cnt >= 0; --cnt) + if(pos+cnt < lstCommunicationLog.Items.Count) + lstCommunicationLog.SetSelected(pos+cnt, true); + } cmdMoveUp.Enabled = (lstCommandsToProcess.SelectedIndex != 0); cmdMoveDown.Enabled = (lstCommandsToProcess.SelectedIndex != lstCommandsToProcess.Items.Count-1); Index: Main.resx =================================================================== RCS file: /cvsroot/csmaild/csmaild/src/TestClient/Main.resx,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Main.resx 26 Jul 2003 23:09:25 -0000 1.4 --- Main.resx 29 Jul 2003 00:46:29 -0000 1.5 *************** *** 215,218 **** --- 215,221 ---- <value>True</value> </data> + <data name="$this.Name"> + <value>MainF</value> + </data> <data name="$this.TrayHeight" type="System.Int32, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>80</value> *************** *** 220,226 **** <data name="$this.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> - </data> - <data name="$this.Name"> - <value>MainF</value> </data> <data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> --- 223,226 ---- |