示例#1
0
        public static HostingForm ShowHostingForm(Control control, string controlName)
        {
            HostingForm form = CreateHostingFormControl(control, controlName);

            form.Show();
            return(form);
        }
示例#2
0
        /// <summary>
        ///
        /// </summary>
        public static HostingForm CreateHostingFormControl(Control control, string controlName)
        {
            Size        requiredSize = control.Size;
            HostingForm hostingForm  = new HostingForm(controlName);

            hostingForm.Controls.Add(control);
            control.Dock     = System.Windows.Forms.DockStyle.Fill;
            hostingForm.Size = requiredSize;
            return(hostingForm);
        }
 private void rSIToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (fxAnalyzerControl.ASession != null)
     {
         AnalyzerSessionIndicatorsControl control = new AnalyzerSessionIndicatorsControl(fxAnalyzerControl.ASession, fxAnalyzerControl.OpChartControl.Panes);
         control.AddIndicatorEvent += new AnalyzerSessionIndicatorsControl.AddIndicatorDelegate(((AnalyzerSessionControl)(fxAnalyzerControl.ControlButton.Tag)).control_AddIndicatorEvent);
         HostingForm form = new HostingForm("Session " + fxAnalyzerControl.ASession.SessionInfo.Id + " Indicators", control);
         form.FormBorderStyle = FormBorderStyle.FixedDialog;
         form.ShowDialog();
     }
 }
 /// <summary>
 /// 
 /// </summary>
 public static HostingForm CreateHostingFormControl(Control control, string controlName)
 {
     Size requiredSize = control.Size;
     HostingForm hostingForm = new HostingForm(controlName);
     hostingForm.Controls.Add(control);
     control.Dock = System.Windows.Forms.DockStyle.Fill;
     hostingForm.Size = requiredSize;
     return hostingForm;
 }
 private void toolStripButton2_Click(object sender, EventArgs e)
 {
     if (asession != null)
     {
         AnalyzerSessionIndicatorsControl control = new AnalyzerSessionIndicatorsControl(asession, OpChartControl.Panes);
         control.AddIndicatorEvent += new AnalyzerSessionIndicatorsControl.AddIndicatorDelegate(((AnalyzerSessionControl)(ControlButton.Tag)).control_AddIndicatorEvent);
         HostingForm form = new HostingForm("Session " + asession.SessionInfo.Id + " Indicators", control);
         form.FormBorderStyle = FormBorderStyle.FixedDialog;
         form.ShowDialog();
     }
 }
 void seriesPropertiesMenuItem_Click(object sender, EventArgs e)
 {
     ChartSeries series = (ChartSeries)(((ToolStripItem)sender).Tag);
     CustomPropertiesControl control = new CustomPropertiesControl();
     control.SelectedObject = series;
     HostingForm form = new HostingForm(series.Name + " Properties", control);
     form.MaximizeBox = false;
     form.ShowCloseButton = true;
     form.FormBorderStyle = FormBorderStyle.FixedSingle;
     form.Show();
 }
 void SelectedObjectsChartContextMenuItem_Click(object param, EventArgs e)
 {
     ToolStripItem item = (ToolStripItem)param;
     DynamicCustomObject dynamicObject = (DynamicCustomObject)item.Tag;
     CustomPropertiesControl control = new CustomPropertiesControl();
     control.SelectedObject = dynamicObject;
     control.AutoSize = true;
     HostingForm form = new HostingForm("Properties", control);
     form.Width = 400;
     form.Height = 600;
     form.Show();
     //this.Refresh();
 }