Changeset 974
- Timestamp:
- 5/5/2009 10:01:38 AM (4 years ago)
- Location:
- branches/eraser6/Eraser
- Files:
-
- 3 edited
-
LogForm.Designer.cs (modified) (3 diffs)
-
LogForm.cs (modified) (5 diffs)
-
LogForm.resx (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eraser6/Eraser/LogForm.Designer.cs
r972 r974 58 58 this.close = new System.Windows.Forms.Button(); 59 59 this.copy = new System.Windows.Forms.Button(); 60 this.separator = new Trustbridge.Windows.Controls.BevelLine();61 60 this.SuspendLayout(); 62 61 // … … 108 107 this.copy.Click += new System.EventHandler(this.copy_Click); 109 108 // 110 // separator111 //112 resources.ApplyResources(this.separator, "separator");113 this.separator.Angle = 90;114 this.separator.Name = "separator";115 //116 109 // LogForm 117 110 // 118 111 resources.ApplyResources(this, "$this"); 119 112 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; 120 this.Controls.Add(this.separator);121 113 this.Controls.Add(this.copy); 122 114 this.Controls.Add(this.close); … … 142 134 private System.Windows.Forms.ColumnHeader message; 143 135 private System.Windows.Forms.Button copy; 144 private Trustbridge.Windows.Controls.BevelLine separator;145 136 } 146 137 } -
branches/eraser6/Eraser/LogForm.cs
r972 r974 41 41 UxThemeAPI.UpdateControlTheme(this); 42 42 this.task = task; 43 Rectangle r;44 43 45 44 //Update the title … … 56 55 } 57 56 58 clear.Enabled = copy.Enabled = log.Count > 0;59 57 //Register our event handler to get live log messages 60 58 task.Log.Logged += task_Logged; 61 59 this.log.EndUpdate(); 60 EnableButtons(); 62 61 } 63 62 … … 103 102 break; 104 103 } 104 105 //Enable the clear and copy log buttons only if we have entries to copy. 106 EnableButtons(); 105 107 } 106 108 107 109 private void clear_Click(object sender, EventArgs e) 108 110 { 109 t his.task.Log.Clear();111 task.Log.Clear(); 110 112 log.Items.Clear(); 111 copy.Enabled = clear.Enabled = log.Items.Count > 0;113 EnableButtons(); 112 114 } 113 115 … … 127 129 } 128 130 129 Clipboard.SetText(text.ToString(), TextDataFormat.CommaSeparatedValue); 131 if (text.Length > 0) 132 Clipboard.SetText(text.ToString(), TextDataFormat.CommaSeparatedValue); 130 133 } 131 134 … … 135 138 } 136 139 140 /// <summary> 141 /// Enables/disables buttons based on the current system state. 142 /// </summary> 143 private void EnableButtons() 144 { 145 clear.Enabled = copy.Enabled = task.Log.Entries.Count > 0; 146 } 147 148 /// <summary> 149 /// The task which this log is displaying entries for 150 /// </summary> 137 151 private Task task; 138 152 } -
branches/eraser6/Eraser/LogForm.resx
r972 r974 143 143 </data> 144 144 <data name="log.Size" type="System.Drawing.Size, System.Drawing"> 145 <value> 414, 361</value>145 <value>600, 391</value> 146 146 </data> 147 147 <data name="log.TabIndex" type="System.Int32, mscorlib"> … … 158 158 </data> 159 159 <data name=">>log.ZOrder" xml:space="preserve"> 160 <value> 4</value>160 <value>3</value> 161 161 </data> 162 162 <data name="clear.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms"> 163 <value>Bottom, Left</value>163 <value>Bottom, Right</value> 164 164 </data> 165 165 <data name="clear.Location" type="System.Drawing.Point, System.Drawing"> 166 <value>12, 392</value>166 <value>12, 409</value> 167 167 </data> 168 168 <data name="clear.Size" type="System.Drawing.Size, System.Drawing"> … … 185 185 </data> 186 186 <data name=">>clear.ZOrder" xml:space="preserve"> 187 <value> 3</value>187 <value>2</value> 188 188 </data> 189 189 <data name="close.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms"> … … 191 191 </data> 192 192 <data name="close.Location" type="System.Drawing.Point, System.Drawing"> 193 <value> 351, 392</value>193 <value>537, 409</value> 194 194 </data> 195 195 <data name="close.Size" type="System.Drawing.Size, System.Drawing"> … … 212 212 </data> 213 213 <data name=">>close.ZOrder" xml:space="preserve"> 214 <value>2</value> 215 </data> 216 <data name="copy.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms"> 217 <value>Bottom, Left</value> 214 <value>1</value> 218 215 </data> 219 216 <data name="copy.Location" type="System.Drawing.Point, System.Drawing"> 220 <value>96, 392</value>217 <value>96, 409</value> 221 218 </data> 222 219 <data name="copy.Size" type="System.Drawing.Size, System.Drawing"> … … 239 236 </data> 240 237 <data name=">>copy.ZOrder" xml:space="preserve"> 241 <value>1</value>242 </data>243 <data name="separator.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">244 <value>Bottom, Left, Right</value>245 </data>246 <data name="separator.Location" type="System.Drawing.Point, System.Drawing">247 <value>9, 387</value>248 </data>249 <data name="separator.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">250 <value>0, 11, 0, 0</value>251 </data>252 <data name="separator.Size" type="System.Drawing.Size, System.Drawing">253 <value>420, 2</value>254 </data>255 <data name="separator.TabIndex" type="System.Int32, mscorlib">256 <value>7</value>257 </data>258 <data name=">>separator.Name" xml:space="preserve">259 <value>separator</value>260 </data>261 <data name=">>separator.Type" xml:space="preserve">262 <value>Trustbridge.Windows.Controls.BevelLine, BevelLine, Version=1.0.3240.33061, Culture=neutral, PublicKeyToken=552aec48acab06da</value>263 </data>264 <data name=">>separator.Parent" xml:space="preserve">265 <value>$this</value>266 </data>267 <data name=">>separator.ZOrder" xml:space="preserve">268 238 <value>0</value> 269 239 </data> … … 275 245 </data> 276 246 <data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing"> 277 <value> 438, 427</value>247 <value>624, 444</value> 278 248 </data> 279 249 <data name="$this.Font" type="System.Drawing.Font, System.Drawing"> 280 <value>Microsoft Sans Serif, 9pt</value> 281 </data> 282 <data name="$this.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms"> 283 <value>NoControl</value> 284 </data> 285 <data name="$this.MinimumSize" type="System.Drawing.Size, System.Drawing"> 286 <value>274, 197</value> 250 <value>Segoe UI, 9pt</value> 287 251 </data> 288 252 <data name="$this.Text" xml:space="preserve">
Note: See TracChangeset
for help on using the changeset viewer.
