public Display(Game game) { this.game = game; //Init display InitializeComponent(); //Init framebuffer DoubleBuffered = true; //Change cur //Cursor.Hide(); //Init events KeyDown += new System.Windows.Forms.KeyEventHandler(game.keyManager.KeyDown); KeyUp += new System.Windows.Forms.KeyEventHandler(game.keyManager.KeyUp); MouseDown += new System.Windows.Forms.MouseEventHandler(game.mouseManager.mouseDown); MouseMove += new System.Windows.Forms.MouseEventHandler(game.mouseManager.mouseMove); MouseUp += new System.Windows.Forms.MouseEventHandler(game.mouseManager.mouseUp); MouseWheel += new MouseEventHandler(game.mouseManager.mouseWheel); this.MouseEnter += new System.EventHandler(game.mouseManager.mouseEnter); this.MouseLeave += new System.EventHandler(game.mouseManager.mouseLeave); this.MouseHover += new System.EventHandler(game.mouseManager.mouseHover); Paint += new System.Windows.Forms.PaintEventHandler(game.render); FormClosed += new System.Windows.Forms.FormClosedEventHandler(game.displayClosed); }
void addEvents() { FormClosing += new FormClosingEventHandler(frmMain_FormClosing); FormClosed += new System.Windows.Forms.FormClosedEventHandler(frmMain_FormClosed); tsmiExit.Click += new EventHandler(tsmiExit_Click); tsmiMaximize.Click += new EventHandler(tsmiMaximize_Click); tsmiNewActDayReport.Click += new EventHandler(tsmiNewActDayReport_Click); daypicker.onDaySelected += new EventHandler <DaySelectedEventArgs>(daypicker_daychanged); riGUI.RatingChanged += new EventHandler(RatingChanged); riStability.RatingChanged += new EventHandler(RatingChanged); riSupport.RatingChanged += new EventHandler(RatingChanged); riUsability.RatingChanged += new EventHandler(RatingChanged); riFunctions.RatingChanged += new EventHandler(RatingChanged); }
/// <summary> /// Required method for Designer support - do not modify the contents of this method with the /// code editor. /// </summary> private void InitializeComponent() { components = new System.ComponentModel.Container(); System.Windows.Forms.Label label1; System.Windows.Forms.Label label2; System.Windows.Forms.Label label3; System.Windows.Forms.ContextMenuStrip contextMenuStrip; System.Windows.Forms.ToolStripMenuItem expandAllToolStripMenuItem; System.Windows.Forms.ToolStripMenuItem closeAllToolStripMenuItem; System.Windows.Forms.Label label4; m_TableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); m_ComboBoxID = new System.Windows.Forms.ComboBox(); m_ComboBoxParentID = new System.Windows.Forms.ComboBox(); m_TreeView = new CsvTools.MultiselectTreeView(); m_TextBoxValue = new System.Windows.Forms.TextBox(); m_ComboBoxDisplay2 = new System.Windows.Forms.ComboBox(); m_ComboBoxDisplay1 = new System.Windows.Forms.ComboBox(); label1 = new System.Windows.Forms.Label(); label2 = new System.Windows.Forms.Label(); label3 = new System.Windows.Forms.Label(); contextMenuStrip = new System.Windows.Forms.ContextMenuStrip(components); expandAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); closeAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); label4 = new System.Windows.Forms.Label(); contextMenuStrip.SuspendLayout(); m_TableLayoutPanel1.SuspendLayout(); SuspendLayout(); // // label1 // label1.Anchor = System.Windows.Forms.AnchorStyles.Right; label1.AutoSize = true; label1.Location = new System.Drawing.Point(49, 5); label1.Name = "label1"; label1.Size = new System.Drawing.Size(18, 13); label1.TabIndex = 3; label1.Text = "ID"; // // label2 // label2.Anchor = System.Windows.Forms.AnchorStyles.Right; label2.AutoSize = true; label2.Location = new System.Drawing.Point(26, 29); label2.Name = "label2"; label2.Size = new System.Drawing.Size(41, 13); label2.TabIndex = 5; label2.Text = "Display"; // // label3 // label3.Anchor = System.Windows.Forms.AnchorStyles.Right; label3.AutoSize = true; label3.Location = new System.Drawing.Point(15, 53); label3.Name = "label3"; label3.Size = new System.Drawing.Size(52, 13); label3.TabIndex = 7; label3.Text = "Parent ID"; // // contextMenuStrip // contextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { expandAllToolStripMenuItem, closeAllToolStripMenuItem }); contextMenuStrip.Name = "contextMenuStrip"; contextMenuStrip.Size = new System.Drawing.Size(125, 48); // // expandAllToolStripMenuItem // expandAllToolStripMenuItem.Name = "expandAllToolStripMenuItem"; expandAllToolStripMenuItem.Size = new System.Drawing.Size(124, 22); expandAllToolStripMenuItem.Text = "Expand All"; expandAllToolStripMenuItem.Click += new System.EventHandler(expandAllToolStripMenuItem_Click); // // closeAllToolStripMenuItem // closeAllToolStripMenuItem.Name = "closeAllToolStripMenuItem"; closeAllToolStripMenuItem.Size = new System.Drawing.Size(124, 22); closeAllToolStripMenuItem.Text = "Close All"; closeAllToolStripMenuItem.Click += new System.EventHandler(closeAllToolStripMenuItem_Click); // // label4 // label4.Anchor = System.Windows.Forms.AnchorStyles.Right; label4.AutoSize = true; label4.Location = new System.Drawing.Point(40, 77); label4.Name = "label4"; label4.Size = new System.Drawing.Size(27, 13); label4.TabIndex = 5; label4.Text = "Find"; // // m_TableLayoutPanel1 // m_TableLayoutPanel1.ColumnCount = 3; m_TableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 70F)); m_TableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); m_TableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); m_TableLayoutPanel1.Controls.Add(label1, 0, 0); m_TableLayoutPanel1.Controls.Add(label2, 0, 1); m_TableLayoutPanel1.Controls.Add(label3, 0, 2); m_TableLayoutPanel1.Controls.Add(m_ComboBoxID, 1, 0); m_TableLayoutPanel1.Controls.Add(m_ComboBoxParentID, 1, 2); m_TableLayoutPanel1.Controls.Add(m_TreeView, 0, 4); m_TableLayoutPanel1.Controls.Add(m_TextBoxValue, 1, 3); m_TableLayoutPanel1.Controls.Add(label4, 0, 3); m_TableLayoutPanel1.Controls.Add(m_ComboBoxDisplay2, 2, 1); m_TableLayoutPanel1.Controls.Add(m_ComboBoxDisplay1, 1, 1); m_TableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; m_TableLayoutPanel1.Location = new System.Drawing.Point(0, 0); m_TableLayoutPanel1.Name = "m_TableLayoutPanel1"; m_TableLayoutPanel1.RowCount = 5; m_TableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 24F)); m_TableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 24F)); m_TableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 24F)); m_TableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 24F)); m_TableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); m_TableLayoutPanel1.Size = new System.Drawing.Size(458, 443); m_TableLayoutPanel1.TabIndex = 10; // // m_ComboBoxID // m_TableLayoutPanel1.SetColumnSpan(m_ComboBoxID, 2); m_ComboBoxID.Dock = System.Windows.Forms.DockStyle.Top; m_ComboBoxID.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; m_ComboBoxID.FormattingEnabled = true; m_ComboBoxID.Location = new System.Drawing.Point(73, 3); m_ComboBoxID.Name = "m_ComboBoxID"; m_ComboBoxID.Size = new System.Drawing.Size(382, 21); m_ComboBoxID.TabIndex = 0; m_ComboBoxID.SelectedIndexChanged += new System.EventHandler(comboBox_SelectionChangeCommitted); // // m_ComboBoxParentID // m_TableLayoutPanel1.SetColumnSpan(m_ComboBoxParentID, 2); m_ComboBoxParentID.Dock = System.Windows.Forms.DockStyle.Top; m_ComboBoxParentID.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; m_ComboBoxParentID.FormattingEnabled = true; m_ComboBoxParentID.Location = new System.Drawing.Point(73, 51); m_ComboBoxParentID.Name = "m_ComboBoxParentID"; m_ComboBoxParentID.Size = new System.Drawing.Size(382, 21); m_ComboBoxParentID.TabIndex = 1; m_ComboBoxParentID.SelectedIndexChanged += new System.EventHandler(comboBox_SelectionChangeCommitted); // // m_TreeView // m_TableLayoutPanel1.SetColumnSpan(m_TreeView, 3); m_TreeView.ContextMenuStrip = contextMenuStrip; m_TreeView.Dock = System.Windows.Forms.DockStyle.Fill; m_TreeView.Location = new System.Drawing.Point(3, 99); m_TreeView.Name = "m_TreeView"; m_TreeView.Size = new System.Drawing.Size(452, 341); m_TreeView.TabIndex = 9; // // m_TextBoxValue // m_TextBoxValue.Dock = System.Windows.Forms.DockStyle.Top; m_TextBoxValue.Location = new System.Drawing.Point(73, 75); m_TextBoxValue.Name = "m_TextBoxValue"; m_TextBoxValue.Size = new System.Drawing.Size(188, 20); m_TextBoxValue.TabIndex = 2; m_TextBoxValue.TextChanged += new System.EventHandler(textBox1_TextChanged); // // m_ComboBoxDisplay2 // m_ComboBoxDisplay2.Dock = System.Windows.Forms.DockStyle.Top; m_ComboBoxDisplay2.FormattingEnabled = true; m_ComboBoxDisplay2.Location = new System.Drawing.Point(267, 27); m_ComboBoxDisplay2.Name = "m_ComboBoxDisplay2"; m_ComboBoxDisplay2.Size = new System.Drawing.Size(188, 21); m_ComboBoxDisplay2.TabIndex = 15; // // m_ComboBoxDisplay1 // m_ComboBoxDisplay1.Dock = System.Windows.Forms.DockStyle.Top; m_ComboBoxDisplay1.FormattingEnabled = true; m_ComboBoxDisplay1.Location = new System.Drawing.Point(73, 27); m_ComboBoxDisplay1.Name = "m_ComboBoxDisplay1"; m_ComboBoxDisplay1.Size = new System.Drawing.Size(188, 21); m_ComboBoxDisplay1.TabIndex = 16; // // FormHierachyDisplay // AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; ClientSize = new System.Drawing.Size(458, 443); Controls.Add(m_TableLayoutPanel1); FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow; MinimumSize = new System.Drawing.Size(384, 245); Name = "FormHierachyDisplay"; Text = "Hierarchy"; FormClosed += new System.Windows.Forms.FormClosedEventHandler(FormHierachyDisplay_FormClosed); Load += new System.EventHandler(HirachyDisplay_Load); contextMenuStrip.ResumeLayout(false); m_TableLayoutPanel1.ResumeLayout(false); m_TableLayoutPanel1.PerformLayout(); ResumeLayout(false); }