AddScreen() public method

public AddScreen ( Screen Screen ) : void
Screen System.Windows.Forms.Screen
return void
示例#1
0
        public Wizard()
        {
            instance = this;

            InitializeComponent();

            Utilities.ThemeManager.ApplyThemeTo(this);

            config.Clear();

            wiz_main = new MainSwitcher(this.panel1);

            AccelCalib = new _5AccelCalib();
            finish = new Finish();
            
            wiz_main.AddScreen(new MainSwitcher.Screen("Intro", new _1Intro(), true));
            wiz_main.AddScreen(new MainSwitcher.Screen("Connect", new _3ConnectAP(), true));
            wiz_main.AddScreen(new MainSwitcher.Screen("AccelCalib", AccelCalib, true)); // сделано чтобы иметь доступ к методам
            wiz_main.AddScreen(new MainSwitcher.Screen("CompassCalib", new _6CompassCalib(), true));
            wiz_main.AddScreen(new MainSwitcher.Screen("OptionalAP", new _8OptionalItemsAP(), true));
            wiz_main.AddScreen(new MainSwitcher.Screen("StabilCheckJoystic", new DS_Check(), true));
            wiz_main.AddScreen(new MainSwitcher.Screen("StabilCheckAutomatic", new DS_Check_Automatic(), true));
            wiz_main.AddScreen(new MainSwitcher.Screen("Finish", finish, true));


            wiz_main.ShowScreen("Intro");
            history.Add(wiz_main.current.Name);

            progressStep1.Maximum = wiz_main.screens.Count;
            progressStep1.Step = 0;
        }
示例#2
0
        public Wizard()
        {
            instance = this;

            InitializeComponent();

            Utilities.ThemeManager.ApplyThemeTo(this);

            config.Clear();

            wiz_main = new MainSwitcher(this.panel1);

            wiz_main.AddScreen(new MainSwitcher.Screen("Intro", new _1Intro(), true));
            wiz_main.AddScreen(new MainSwitcher.Screen("FrameFW", new _2FrameFW(), true));
            wiz_main.AddScreen(new MainSwitcher.Screen("Connect", new _3ConnectAP(), true));
            wiz_main.AddScreen(new MainSwitcher.Screen("FrameType", new _4FrameType(), true));
            wiz_main.AddScreen(new MainSwitcher.Screen("AccelCalib", new _5AccelCalib(), true));
            wiz_main.AddScreen(new MainSwitcher.Screen("CompassCalib", new _6CompassCalib(), true));
            wiz_main.AddScreen(new MainSwitcher.Screen("BatteryMonitor", new _7BatteryMonitor(), true));
            wiz_main.AddScreen(new MainSwitcher.Screen("OptionalAC", new _8OptionalItemsAC(), true));
            wiz_main.AddScreen(new MainSwitcher.Screen("OptionalAP", new _8OptionalItemsAP(), true));
            wiz_main.AddScreen(new MainSwitcher.Screen("Radio Calib", new _9RadioCalibration(), true));
            wiz_main.AddScreen(new MainSwitcher.Screen("Flight Modes",new _10FlightModes(), true));
            wiz_main.AddScreen(new MainSwitcher.Screen("Verify", new _11Verify(), true));
            wiz_main.AddScreen(new MainSwitcher.Screen("Failsafe", new _12FailSafe(), true));
            wiz_main.AddScreen(new MainSwitcher.Screen("GeoFence", new _13GeoFence(), true));

            wiz_main.AddScreen(new MainSwitcher.Screen("DontForget", new _98DontForget(), true));

            wiz_main.ShowScreen("Intro");

            history.Add(wiz_main.current.Name);

            progressStep1.Maximum = wiz_main.screens.Count + 1;
            progressStep1.Step = 1;
        }
示例#3
0
        public Wizard()
        {
            instance = this;

            InitializeComponent();

            Utilities.ThemeManager.ApplyThemeTo(this);

            config.Clear();

            wiz_main = new MainSwitcher(this.panel1);

            wiz_main.AddScreen(new MainSwitcher.Screen("Intro", new _1Intro(), true));
            wiz_main.AddScreen(new MainSwitcher.Screen("FrameFW", new _2FrameFW(), true));
            wiz_main.AddScreen(new MainSwitcher.Screen("Connect", new _3ConnectAP(), true));
            wiz_main.AddScreen(new MainSwitcher.Screen("FrameType", new _4FrameType(), true));
            wiz_main.AddScreen(new MainSwitcher.Screen("AccelCalib", new _5AccelCalib(), true));
            wiz_main.AddScreen(new MainSwitcher.Screen("CompassCalib", new _6CompassCalib(), true));
            wiz_main.AddScreen(new MainSwitcher.Screen("BatteryMonitor", new _7BatteryMonitor(), true));
            wiz_main.AddScreen(new MainSwitcher.Screen("OptionalAC", new _8OptionalItemsAC(), true));
            wiz_main.AddScreen(new MainSwitcher.Screen("OptionalAP", new _8OptionalItemsAP(), true));
            wiz_main.AddScreen(new MainSwitcher.Screen("Radio Calib", new _9RadioCalibration(), true));
            wiz_main.AddScreen(new MainSwitcher.Screen("Flight Modes",new _10FlightModes(), true));
            wiz_main.AddScreen(new MainSwitcher.Screen("Verify", new _11Verify(), true));
            wiz_main.AddScreen(new MainSwitcher.Screen("Failsafe", new _12FailSafe(), true));
            wiz_main.AddScreen(new MainSwitcher.Screen("GeoFence", new _13GeoFence(), true));

            wiz_main.AddScreen(new MainSwitcher.Screen("DontForget", new _98DontForget(), true));

            if (MainV2.comPort.BaseStream.IsOpen)
            {
                if (MainV2.comPort.MAV.aptype == MAVLink.MAV_TYPE.FIXED_WING)
                {
                    wiz_main.ShowScreen("AccelCalib");
                }
                else if (MainV2.comPort.MAV.aptype == MAVLink.MAV_TYPE.HELICOPTER ||
                      MainV2.comPort.MAV.aptype == MAVLink.MAV_TYPE.HEXAROTOR ||
                      MainV2.comPort.MAV.aptype == MAVLink.MAV_TYPE.OCTOROTOR ||
                      MainV2.comPort.MAV.aptype == MAVLink.MAV_TYPE.QUADROTOR ||
                      MainV2.comPort.MAV.aptype == MAVLink.MAV_TYPE.TRICOPTER)
                {
                    wiz_main.ShowScreen("FrameType");
                }
                else
                {
                    wiz_main.ShowScreen("Intro");
                }
            }
            else
            {
                wiz_main.ShowScreen("Intro");
            }

            history.Add(wiz_main.current.Name);

            progressStep1.Maximum = wiz_main.screens.Count + 1;
            progressStep1.Step = 1;
        }