comparison FrmMain.cs @ 128:98189a6db18a

Fixed #257: Undo/Redo toolbar "dropdown" arrow triggers button * Swap "click" event for "Button click" - split buttons have different events to normal buttons! Click is any click. Button click is clicking the button half.
author IBBoard <dev@ibboard.co.uk>
date Sun, 07 Mar 2010 20:21:00 +0000
parents c89d0cb4b893
children 5f21ecd030d0
comparison
equal deleted inserted replaced
127:c89d0cb4b893 128:98189a6db18a
268 this.statusBarTimer.Tick += new System.EventHandler(this.statusBarTimer_Tick); 268 this.statusBarTimer.Tick += new System.EventHandler(this.statusBarTimer_Tick);
269 // 269 //
270 // menuStrip 270 // menuStrip
271 // 271 //
272 this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 272 this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
273 this.menuFile, 273 this.menuFile,
274 this.menuEdit, 274 this.menuEdit,
275 this.menuHelp}); 275 this.menuHelp});
276 this.menuStrip.Location = new System.Drawing.Point(0, 0); 276 this.menuStrip.Location = new System.Drawing.Point(0, 0);
277 this.menuStrip.Name = "menuStrip"; 277 this.menuStrip.Name = "menuStrip";
278 this.menuStrip.Size = new System.Drawing.Size(790, 24); 278 this.menuStrip.Size = new System.Drawing.Size(790, 24);
279 this.menuStrip.TabIndex = 6; 279 this.menuStrip.TabIndex = 6;
280 this.menuStrip.Text = "menuStrip1"; 280 this.menuStrip.Text = "menuStrip1";
281 // 281 //
282 // menuFile 282 // menuFile
283 // 283 //
284 this.menuFile.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { 284 this.menuFile.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
285 this.miNewArmy, 285 this.miNewArmy,
286 this.miOpenArmy, 286 this.miOpenArmy,
287 this.miSaveArmy, 287 this.miSaveArmy,
288 this.miSaveArmyAs, 288 this.miSaveArmyAs,
289 this.miExportArmyAs, 289 this.miExportArmyAs,
290 this.miCloseArmy, 290 this.miCloseArmy,
291 this.toolStripSeparator1, 291 this.toolStripSeparator1,
292 this.miReloadFiles, 292 this.miReloadFiles,
293 this.toolStripSeparator2, 293 this.toolStripSeparator2,
294 this.miExit}); 294 this.miExit});
295 this.menuFile.Name = "menuFile"; 295 this.menuFile.Name = "menuFile";
296 this.menuFile.Size = new System.Drawing.Size(33, 20); 296 this.menuFile.Size = new System.Drawing.Size(33, 20);
297 this.menuFile.Text = "&file"; 297 this.menuFile.Text = "&file";
298 // 298 //
299 // miNewArmy 299 // miNewArmy
327 this.miSaveArmyAs.Click += new System.EventHandler(this.miSaveArmyAs_Click); 327 this.miSaveArmyAs.Click += new System.EventHandler(this.miSaveArmyAs_Click);
328 // 328 //
329 // miExportArmyAs 329 // miExportArmyAs
330 // 330 //
331 this.miExportArmyAs.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { 331 this.miExportArmyAs.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
332 this.miExportArmyAsBasicHTML}); 332 this.miExportArmyAsBasicHTML});
333 this.miExportArmyAs.Enabled = false; 333 this.miExportArmyAs.Enabled = false;
334 this.miExportArmyAs.Name = "miExportArmyAs"; 334 this.miExportArmyAs.Name = "miExportArmyAs";
335 this.miExportArmyAs.Size = new System.Drawing.Size(164, 22); 335 this.miExportArmyAs.Size = new System.Drawing.Size(164, 22);
336 this.miExportArmyAs.Text = "export army as..."; 336 this.miExportArmyAs.Text = "export army as...";
337 // 337 //
375 this.miExit.Click += new System.EventHandler(this.miExit_Click); 375 this.miExit.Click += new System.EventHandler(this.miExit_Click);
376 // 376 //
377 // menuEdit 377 // menuEdit
378 // 378 //
379 this.menuEdit.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { 379 this.menuEdit.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
380 this.miUndo, 380 this.miUndo,
381 this.miRedo}); 381 this.miRedo});
382 this.menuEdit.Name = "menuEdit"; 382 this.menuEdit.Name = "menuEdit";
383 this.menuEdit.Size = new System.Drawing.Size(36, 20); 383 this.menuEdit.Size = new System.Drawing.Size(36, 20);
384 this.menuEdit.Text = "&edit"; 384 this.menuEdit.Text = "&edit";
385 // 385 //
386 // miUndo 386 // miUndo
400 this.miRedo.Click += new System.EventHandler(this.miRedo_Click); 400 this.miRedo.Click += new System.EventHandler(this.miRedo_Click);
401 // 401 //
402 // menuHelp 402 // menuHelp
403 // 403 //
404 this.menuHelp.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { 404 this.menuHelp.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
405 this.miAbout}); 405 this.miAbout});
406 this.menuHelp.Name = "menuHelp"; 406 this.menuHelp.Name = "menuHelp";
407 this.menuHelp.Size = new System.Drawing.Size(39, 20); 407 this.menuHelp.Size = new System.Drawing.Size(39, 20);
408 this.menuHelp.Text = "&help"; 408 this.menuHelp.Text = "&help";
409 // 409 //
410 // miAbout 410 // miAbout
416 // 416 //
417 // mainToolStrip 417 // mainToolStrip
418 // 418 //
419 this.mainToolStrip.Dock = System.Windows.Forms.DockStyle.None; 419 this.mainToolStrip.Dock = System.Windows.Forms.DockStyle.None;
420 this.mainToolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 420 this.mainToolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
421 this.bttnNewArmy, 421 this.bttnNewArmy,
422 this.bttnOpenArmy, 422 this.bttnOpenArmy,
423 this.bttnSaveArmy, 423 this.bttnSaveArmy,
424 this.toolStripSeparator3, 424 this.toolStripSeparator3,
425 this.bttnUndo, 425 this.bttnUndo,
426 this.bttnRedo}); 426 this.bttnRedo});
427 this.mainToolStrip.Location = new System.Drawing.Point(0, 24); 427 this.mainToolStrip.Location = new System.Drawing.Point(0, 24);
428 this.mainToolStrip.Name = "mainToolStrip"; 428 this.mainToolStrip.Name = "mainToolStrip";
429 this.mainToolStrip.Size = new System.Drawing.Size(151, 25); 429 this.mainToolStrip.Size = new System.Drawing.Size(182, 25);
430 this.mainToolStrip.TabIndex = 8; 430 this.mainToolStrip.TabIndex = 8;
431 // 431 //
432 // bttnNewArmy 432 // bttnNewArmy
433 // 433 //
434 this.bttnNewArmy.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; 434 this.bttnNewArmy.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
472 this.bttnUndo.Image = global::IBBoard.WarFoundry.GUI.WinForms.Properties.Resources.edit_undo; 472 this.bttnUndo.Image = global::IBBoard.WarFoundry.GUI.WinForms.Properties.Resources.edit_undo;
473 this.bttnUndo.ImageTransparentColor = System.Drawing.Color.Magenta; 473 this.bttnUndo.ImageTransparentColor = System.Drawing.Color.Magenta;
474 this.bttnUndo.Name = "bttnUndo"; 474 this.bttnUndo.Name = "bttnUndo";
475 this.bttnUndo.Size = new System.Drawing.Size(32, 22); 475 this.bttnUndo.Size = new System.Drawing.Size(32, 22);
476 this.bttnUndo.Text = "undo"; 476 this.bttnUndo.Text = "undo";
477 this.bttnUndo.Click += new System.EventHandler(this.miUndo_Click); 477 this.bttnUndo.ButtonClick += new System.EventHandler(this.miUndo_Click);
478 // 478 //
479 // bttnRedo 479 // bttnRedo
480 // 480 //
481 this.bttnRedo.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; 481 this.bttnRedo.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
482 this.bttnRedo.Enabled = false; 482 this.bttnRedo.Enabled = false;
483 this.bttnRedo.Image = global::IBBoard.WarFoundry.GUI.WinForms.Properties.Resources.edit_redo; 483 this.bttnRedo.Image = global::IBBoard.WarFoundry.GUI.WinForms.Properties.Resources.edit_redo;
484 this.bttnRedo.ImageTransparentColor = System.Drawing.Color.Magenta; 484 this.bttnRedo.ImageTransparentColor = System.Drawing.Color.Magenta;
485 this.bttnRedo.Name = "bttnRedo"; 485 this.bttnRedo.Name = "bttnRedo";
486 this.bttnRedo.Size = new System.Drawing.Size(32, 22); 486 this.bttnRedo.Size = new System.Drawing.Size(32, 22);
487 this.bttnRedo.Text = "redo"; 487 this.bttnRedo.Text = "redo";
488 this.bttnRedo.Click += new System.EventHandler(this.miRedo_Click); 488 this.bttnRedo.ButtonClick += new System.EventHandler(this.miRedo_Click);
489 // 489 //
490 // catToolStrip 490 // catToolStrip
491 // 491 //
492 this.catToolStrip.Dock = System.Windows.Forms.DockStyle.None; 492 this.catToolStrip.Dock = System.Windows.Forms.DockStyle.None;
493 this.catToolStrip.Location = new System.Drawing.Point(161, 24); 493 this.catToolStrip.Location = new System.Drawing.Point(161, 24);
499 // statusBar 499 // statusBar
500 // 500 //
501 this.statusBar.Location = new System.Drawing.Point(0, 586); 501 this.statusBar.Location = new System.Drawing.Point(0, 586);
502 this.statusBar.Name = "statusBar"; 502 this.statusBar.Name = "statusBar";
503 this.statusBar.Panels.AddRange(new System.Windows.Forms.StatusBarPanel[] { 503 this.statusBar.Panels.AddRange(new System.Windows.Forms.StatusBarPanel[] {
504 this.sbMainPanel, 504 this.sbMainPanel,
505 this.sbErrorPanel, 505 this.sbErrorPanel,
506 this.sbPointsPanel}); 506 this.sbPointsPanel});
507 this.statusBar.ShowPanels = true; 507 this.statusBar.ShowPanels = true;
508 this.statusBar.Size = new System.Drawing.Size(790, 22); 508 this.statusBar.Size = new System.Drawing.Size(790, 22);
509 this.statusBar.TabIndex = 1; 509 this.statusBar.TabIndex = 1;
510 this.statusBar.PanelClick += new System.Windows.Forms.StatusBarPanelClickEventHandler(this.statusBar_PanelClick); 510 this.statusBar.PanelClick += new System.Windows.Forms.StatusBarPanelClickEventHandler(this.statusBar_PanelClick);
511 this.statusBar.DrawItem += new System.Windows.Forms.StatusBarDrawItemEventHandler(this.statusBar_DrawItem); 511 this.statusBar.DrawItem += new System.Windows.Forms.StatusBarDrawItemEventHandler(this.statusBar_DrawItem);
565 ((System.ComponentModel.ISupportInitialize)(this.sbMainPanel)).EndInit(); 565 ((System.ComponentModel.ISupportInitialize)(this.sbMainPanel)).EndInit();
566 ((System.ComponentModel.ISupportInitialize)(this.sbErrorPanel)).EndInit(); 566 ((System.ComponentModel.ISupportInitialize)(this.sbErrorPanel)).EndInit();
567 ((System.ComponentModel.ISupportInitialize)(this.sbPointsPanel)).EndInit(); 567 ((System.ComponentModel.ISupportInitialize)(this.sbPointsPanel)).EndInit();
568 this.ResumeLayout(false); 568 this.ResumeLayout(false);
569 this.PerformLayout(); 569 this.PerformLayout();
570
570 } 571 }
571 #endregion 572 #endregion
572 573
573 private void FileLoadingFinished(List<FileLoadFailure> failures) 574 private void FileLoadingFinished(List<FileLoadFailure> failures)
574 { 575 {