示例#1
0
 protected virtual void OnCommandStateChanged(CommandStateEventArgs e)
 {
     if (CommandStateChanged != null)
     {
         CommandStateChanged(this, e);
     }
 }
示例#2
0
 // Enable / disable buttons
 void _windowManager_CommandStateChanged(object sender, CommandStateEventArgs e)
 {
     this.forwardToolStripButton.Enabled        = ((e.BrowserCommands & BrowserCommands.Forward) == BrowserCommands.Forward);
     this.backToolStripButton.Enabled           = ((e.BrowserCommands & BrowserCommands.Back) == BrowserCommands.Back);
     this.printPreviewToolStripButton.Enabled   = ((e.BrowserCommands & BrowserCommands.PrintPreview) == BrowserCommands.PrintPreview);
     this.printPreviewToolStripMenuItem.Enabled = ((e.BrowserCommands & BrowserCommands.PrintPreview) == BrowserCommands.PrintPreview);
     this.printToolStripButton.Enabled          = ((e.BrowserCommands & BrowserCommands.Print) == BrowserCommands.Print);
     this.printToolStripMenuItem.Enabled        = ((e.BrowserCommands & BrowserCommands.Print) == BrowserCommands.Print);
     this.homeToolStripButton.Enabled           = ((e.BrowserCommands & BrowserCommands.Home) == BrowserCommands.Home);
     this.searchToolStripButton.Enabled         = ((e.BrowserCommands & BrowserCommands.Search) == BrowserCommands.Search);
     this.refreshToolStripButton.Enabled        = ((e.BrowserCommands & BrowserCommands.Reload) == BrowserCommands.Reload);
     this.stopToolStripButton.Enabled           = ((e.BrowserCommands & BrowserCommands.Stop) == BrowserCommands.Stop);
 }