private void MainForm_Load(object sender, EventArgs e) { // Create draw area drawArea = new DrawArea(); drawArea.Location = new System.Drawing.Point(0, 0); drawArea.Size = new System.Drawing.Size(10, 10); //HAMID //drawArea.Owner = this; drawArea.BackColor = Color.Transparent; this.Controls.Add(drawArea); drawArea.AddViewer(new Genetibase2.NuGenMediImage2.UI2.Controls2.Viewer()); // Helper objects (DocManager and others) InitializeHelperObjects(); drawArea.Initialize(this, docManager); ResizeDrawArea(); LoadSettingsFromRegistry(); // Submit to Idle event to set controls state at idle time Application.Idle += delegate(object o, EventArgs a) { SetStateOfControls(); }; // Open file passed in the command line if (ArgumentFile.Length > 0) { OpenDocument(ArgumentFile); } // Subscribe to DropDownOpened event for each popup menu // (see details in MainForm_DropDownOpened) foreach (ToolStripItem item in menuStrip1.Items) { if (item.GetType() == typeof(ToolStripMenuItem)) { ((ToolStripMenuItem)item).DropDownOpened += MainForm_DropDownOpened; } } }
private void Form1_Load(object sender, EventArgs e) { // Create draw area drawArea = new DrawArea(); drawArea.Location = new System.Drawing.Point(0, 0); drawArea.Size = new System.Drawing.Size(10, 10); //HAMID //drawArea.Owner = this; drawArea.BackColor = Color.Transparent; this.panel1.Controls.Add(drawArea); //this.drawArea.BringToFront(); // Helper objects (DocManager and others) InitializeHelperObjects(); drawArea.Initialize(this, docManager); ResizeDrawArea(); this.drawArea.ActiveTool = DrawArea.DrawToolType.Ellipse; }
private void MainForm_Load(object sender, EventArgs e) { // Create draw area drawArea = new DrawArea(); drawArea.Location = new System.Drawing.Point(0, 0); drawArea.Size = new System.Drawing.Size(10, 10); //HAMID //drawArea.Owner = this; drawArea.BackColor = Color.Transparent; this.Controls.Add(drawArea); drawArea.AddViewer(new Genetibase2.NuGenMediImage2.UI2.Controls2.Viewer()); // Helper objects (DocManager and others) InitializeHelperObjects(); drawArea.Initialize(this, docManager); ResizeDrawArea(); LoadSettingsFromRegistry(); // Submit to Idle event to set controls state at idle time Application.Idle += delegate(object o, EventArgs a) { SetStateOfControls(); }; // Open file passed in the command line if (ArgumentFile.Length > 0) OpenDocument(ArgumentFile); // Subscribe to DropDownOpened event for each popup menu // (see details in MainForm_DropDownOpened) foreach (ToolStripItem item in menuStrip1.Items) { if (item.GetType() == typeof(ToolStripMenuItem)) { ((ToolStripMenuItem)item).DropDownOpened += MainForm_DropDownOpened; } } }