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); } }
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); }