Example #1
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            StartPosition = FormStartPosition.CenterScreen;

            var sc = Screen.GetWorkingArea(this);

            Size     = new Size(sc.Width / 2, sc.Height);
            Location = new Point(sc.Width / 2, 0);
            //WindowState = FormWindowState.Maximized;
            BringToFront();

            //Text = MotionWrapperExtension.IsSimulate ? "仿真模式" : Machine.Machine.Ins.Settings.Name;
            Text = Machine.Ins.Settings.Name;
            Text = $"{Machine.Ins.Settings.Name} {Machine.Ins.Settings.Version}";

            _devAlarmForm = new DevAlarmForm()
            {
                MainPanel = mainPanel,
            };
            _devLogForm    = new DevLogForm();
            _devConfigForm = new DevConfigForm();
            _devMainForm   = new DevMainForm
            {
                MainPanel     = mainPanel,
                DevConfigForm = _devConfigForm,
                DevAlarmForm  = _devAlarmForm,
                DevLogForm    = _devLogForm,
            };


            _devMainForm.Show(mainPanel, DockState.Document);

            _devLogForm.Show(mainPanel, DockState.Document);
            _devLogForm.Hide();
            _devAlarmForm.Show(mainPanel, DockState.Document);
            _devAlarmForm.Hide();
            _devConfigForm.Show(mainPanel, DockState.Document);
            _devConfigForm.Hide();


            _verForm = new VersionForm();
        }
Example #2
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            StartPosition = FormStartPosition.CenterScreen;
            if (!FrameworkExtenion.IsSimulate)
            {
                WindowState = FormWindowState.Maximized;
                BringToFront();
            }

            //Text = MotionWrapperExtension.IsSimulate ? "仿真模式" : Machine.Machine.Ins.Settings.Name;
            Text = Machine.Ins.Settings.Name;
            Text = $"{Machine.Ins.Settings.Name} {Machine.Ins.Settings.Version}";

            _devAlarmForm = new DevAlarmForm()
            {
                MainPanel = mainPanel,
            };
            _devLogForm    = new DevLogForm();
            _devConfigForm = new DevConfigForm();
            _devMainForm   = new DevMainForm
            {
                MainPanel     = mainPanel,
                DevConfigForm = _devConfigForm,
                DevAlarmForm  = _devAlarmForm,
                DevLogForm    = _devLogForm,
            };


            _devMainForm.Show(mainPanel, DockState.Document);

            _devLogForm.Show(mainPanel, DockState.Document);
            _devLogForm.Hide();
            _devAlarmForm.Show(mainPanel, DockState.Document);
            _devAlarmForm.Hide();
            _devConfigForm.Show(mainPanel, DockState.Document);
            _devConfigForm.Hide();


            _verForm = new VersionForm();
        }
Example #3
0
 private void 报警ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     _devAlarmForm.Show(mainPanel, DockState.Document);
 }