예제 #1
0
 private void OnZoomChanged(object sender, EventArgs e)
 {
     if (!m_ignoreZoomEvents && this.ZoomChange != null)
     {
         ZoomItem            zoomItem = (ZoomItem)zoom.SelectedItem;
         ZoomChangeEventArgs e2       = new ZoomChangeEventArgs(zoomItem.ZoomMode, zoomItem.ZoomPercent);
         this.ZoomChange(this, e2);
     }
 }
예제 #2
0
        private static ToolStripMenuItem CreateMenuItem(ZoomMode mode, int zoomPercent, EventHandler handler, bool selected)
        {
            ToolStripMenuItem toolStripMenuItem = new ToolStripMenuItem();

            toolStripMenuItem.Click  += handler;
            toolStripMenuItem.Checked = selected;
            ZoomItem zoomItem = new ZoomItem(mode, zoomPercent);

            toolStripMenuItem.Text = zoomItem.ToString();
            toolStripMenuItem.Tag  = zoomItem;
            return(toolStripMenuItem);
        }