public MainForm() { operationsProxy = new PluginMenuProxy(this); InitializeComponent(); renderPanel = new FlickerFreePanel(); renderPanel.Dock = System.Windows.Forms.DockStyle.Fill; renderPanel.Name = "panel"; renderPanel.TabIndex = 1; renderPanel.MouseMove += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseMove); renderPanel.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown); renderPanel.MouseUp += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseUp); renderPanel.KeyUp += new System.Windows.Forms.KeyEventHandler(this.MainForm_KeyUp); renderPanel.KeyDown += new System.Windows.Forms.KeyEventHandler(this.MainForm_KeyDown); renderPanel.OnRender += new FlickerFreePanel.RenderEventHandler(panel_Render); renderPanel.MouseWheel += new MouseEventHandler(panel_MouseWheel); mainPanel.Controls.Add(renderPanel); renderer.renderStack.Add(backgroundRenderer); renderer.renderStack.Add(primitiveRenderer); renderer.renderStack.Add(scientificRenderer); renderer.renderStack.Add(labelOverlayRenderer); renderContext.Location = new Vector2D(renderPanel.Width / 2, renderPanel.Height / 2); SetStyle(ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true); SetupUI(); UpdateGUI(); }
public MenuExtender(ToolStripMenuItem baseMenuItem, PluginMenuProxy proxy, Type baseClass) { executeProxy = proxy; parentMenuItem = baseMenuItem; baseClassInterface = baseClass; }