Changeset 513

Show
Ignore:
Timestamp:
03/07/10 15:21:00 (6 months ago)
Author:
ibboard
Message:

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.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • IBBoard.WarFoundry.GUI.WinForms/trunk/FrmMain.cs

    r512 r513  
    271271            //  
    272272            this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 
    273                                     this.menuFile, 
    274                                     this.menuEdit, 
    275                                     this.menuHelp}); 
     273            this.menuFile, 
     274            this.menuEdit, 
     275            this.menuHelp}); 
    276276            this.menuStrip.Location = new System.Drawing.Point(0, 0); 
    277277            this.menuStrip.Name = "menuStrip"; 
     
    283283            //  
    284284            this.menuFile.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { 
    285                                     this.miNewArmy, 
    286                                     this.miOpenArmy, 
    287                                     this.miSaveArmy, 
    288                                     this.miSaveArmyAs, 
    289                                     this.miExportArmyAs, 
    290                                     this.miCloseArmy, 
    291                                     this.toolStripSeparator1, 
    292                                     this.miReloadFiles, 
    293                                     this.toolStripSeparator2, 
    294                                     this.miExit}); 
     285            this.miNewArmy, 
     286            this.miOpenArmy, 
     287            this.miSaveArmy, 
     288            this.miSaveArmyAs, 
     289            this.miExportArmyAs, 
     290            this.miCloseArmy, 
     291            this.toolStripSeparator1, 
     292            this.miReloadFiles, 
     293            this.toolStripSeparator2, 
     294            this.miExit}); 
    295295            this.menuFile.Name = "menuFile"; 
    296296            this.menuFile.Size = new System.Drawing.Size(33, 20); 
     
    330330            //  
    331331            this.miExportArmyAs.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { 
    332                                     this.miExportArmyAsBasicHTML}); 
     332            this.miExportArmyAsBasicHTML}); 
    333333            this.miExportArmyAs.Enabled = false; 
    334334            this.miExportArmyAs.Name = "miExportArmyAs"; 
     
    378378            //  
    379379            this.menuEdit.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { 
    380                                     this.miUndo, 
    381                                     this.miRedo}); 
     380            this.miUndo, 
     381            this.miRedo}); 
    382382            this.menuEdit.Name = "menuEdit"; 
    383383            this.menuEdit.Size = new System.Drawing.Size(36, 20); 
     
    403403            //  
    404404            this.menuHelp.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { 
    405                                     this.miAbout}); 
     405            this.miAbout}); 
    406406            this.menuHelp.Name = "menuHelp"; 
    407407            this.menuHelp.Size = new System.Drawing.Size(39, 20); 
     
    419419            this.mainToolStrip.Dock = System.Windows.Forms.DockStyle.None; 
    420420            this.mainToolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 
    421                                     this.bttnNewArmy, 
    422                                     this.bttnOpenArmy, 
    423                                     this.bttnSaveArmy, 
    424                                     this.toolStripSeparator3, 
    425                                     this.bttnUndo, 
    426                                     this.bttnRedo}); 
     421            this.bttnNewArmy, 
     422            this.bttnOpenArmy, 
     423            this.bttnSaveArmy, 
     424            this.toolStripSeparator3, 
     425            this.bttnUndo, 
     426            this.bttnRedo}); 
    427427            this.mainToolStrip.Location = new System.Drawing.Point(0, 24); 
    428428            this.mainToolStrip.Name = "mainToolStrip"; 
    429             this.mainToolStrip.Size = new System.Drawing.Size(151, 25); 
     429            this.mainToolStrip.Size = new System.Drawing.Size(182, 25); 
    430430            this.mainToolStrip.TabIndex = 8; 
    431431            //  
     
    475475            this.bttnUndo.Size = new System.Drawing.Size(32, 22); 
    476476            this.bttnUndo.Text = "undo"; 
    477             this.bttnUndo.Click += new System.EventHandler(this.miUndo_Click); 
     477            this.bttnUndo.ButtonClick += new System.EventHandler(this.miUndo_Click); 
    478478            //  
    479479            // bttnRedo 
     
    486486            this.bttnRedo.Size = new System.Drawing.Size(32, 22); 
    487487            this.bttnRedo.Text = "redo"; 
    488             this.bttnRedo.Click += new System.EventHandler(this.miRedo_Click); 
     488            this.bttnRedo.ButtonClick += new System.EventHandler(this.miRedo_Click); 
    489489            //  
    490490            // catToolStrip 
     
    502502            this.statusBar.Name = "statusBar"; 
    503503            this.statusBar.Panels.AddRange(new System.Windows.Forms.StatusBarPanel[] { 
    504                                     this.sbMainPanel, 
    505                                     this.sbErrorPanel, 
    506                                     this.sbPointsPanel}); 
     504            this.sbMainPanel, 
     505            this.sbErrorPanel, 
     506            this.sbPointsPanel}); 
    507507            this.statusBar.ShowPanels = true; 
    508508            this.statusBar.Size = new System.Drawing.Size(790, 22); 
     
    568568            this.ResumeLayout(false); 
    569569            this.PerformLayout(); 
     570 
    570571        } 
    571572        #endregion