private void GraphicDocmentViewForm_Load(object sender, EventArgs e) { //Rectangle rect = pictureBox1.ClientRectangle; _toolBarManager = new ToolBarManager(this, this); _toolBarManager.AddControl(toolBar1, DockStyle.Top); _toolBarManager.AddControl(toolStrip1, DockStyle.Top); //this.zedGraphControl1.BackColor this.zedGraphControl1.GraphPane.Title.Text = "遥测值"; this.zedGraphControl1.GraphPane.XAxis.Title.Text = "时间"; this.zedGraphControl1.GraphPane.YAxis.Title.Text = "数值"; this.zedGraphControl1.GraphPane.XAxis.Type = ZedGraph.AxisType.DateAsOrdinal; this.zedGraphControl1.GraphPane.XAxis.Scale.Format = "HH:mm:ss"; this.zedGraphControl1.IsShowPointValues = true; this.zedGraphControl1.PointDateFormat = "HH:mm:ss"; //this.zedGraphControl1. for (int j = 0; j < PublicDataClass.SaveText.Cfg[0].YccfgNum; j++) { comboBox1.Items.Add(16385 + j); } comboBox1.SelectedIndex = 0; curvemy = new LineItem[PublicDataClass.SaveText.Cfg[0].YccfgNum]; radioButton1.Checked = true; textBox1.Enabled = false; dateTimePickerbegindata.Enabled = false; dateTimePickerbegintime.Enabled = false; dateTimePickerenddata.Enabled = false; dateTimePickerendtime.Enabled = false; }
public ToolBarDockArea(ToolBarManager dockManager, DockStyle dockStyle) { InitializeComponent(); this.SetStyle( ControlStyles.AllPaintingInWmPaint | ControlStyles.DoubleBuffer, true); _dockManager = dockManager; DockManager.DockStation.Controls.Add(this); if (dockStyle == DockStyle.Fill || dockStyle == DockStyle.None) { dockStyle = DockStyle.Top; } this.Dock = dockStyle; this.SendToBack(); FitHolders(); this.Layout += new LayoutEventHandler(LayoutHandler); }
public ToolBarDockHolder(ToolBarManager dm, Control c, DockStyle style) { InitializeComponent(); this.SetStyle( ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.DoubleBuffer, true); _panel.Controls.AddRange(new Control[] { c }); DockManager = dm; if (style == DockStyle.Left) { _preferredDockedArea = dm.Left; } else if (style == DockStyle.Right) { _preferredDockedArea = dm.Right; } else if (style == DockStyle.Bottom) { _preferredDockedArea = dm.Bottom; } else { _preferredDockedArea = dm.Top; } _control = c; FloatForm.Visible = false; FloatForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; FloatForm.MaximizeBox = false; FloatForm.MinimizeBox = false; FloatForm.ShowInTaskbar = false; FloatForm.ClientSize = new Size(10, 10); // Added by mav DockManager.MainForm.AddOwnedForm(FloatForm); DockStyle = style; ToolbarTitle = c.Text; // _control.TextChanged += new EventHandler(control_TextChanged); }