コード例 #1
0
        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;
                }
            }
        }
コード例 #2
0
        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;
        }
コード例 #3
0
ファイル: Form1.cs プロジェクト: xuchuansheng/GenXSource
        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;
        }
コード例 #4
0
ファイル: MainForm.cs プロジェクト: xuchuansheng/GenXSource
		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;
				}
			}
		}