예제 #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);
 }
 // 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);
 }
예제 #4
0
 // Enable / disable buttons
 void _windowManager_CommandStateChanged(object sender, CommandStateEventArgs e)
 {
     try
     {
         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);
     }
     catch (Exception ex)
     {
         Program.ShowMessageBox("FrmWebBrowser", ex);
     }
 }
예제 #5
0
 protected virtual void OnCommandStateChanged(CommandStateEventArgs e)
 {
   if (CommandStateChanged != null)
     CommandStateChanged(this, e);
 }