Пример #1
0
        private void deviceButton_Click(object sender, EventArgs e)
        {
            switch (DeviceInfo.CurrentDeviceType)
            {
                case DeviceType.Dispen:
                    AutoDispenDeviceForm aForm = new AutoDispenDeviceForm();
                    aForm.FatherForm = this;
                    aForm.IsSocket = true;
                    /*
                    if (DeviceInfo is AutoDispenDevice) aForm.DispenDevice = (AutoDispenDevice)DeviceInfo;
                    else
                    {
                        aForm.TwincatDevice = (AutoDispenTwincatDevice)DeviceInfo;
                        aForm.IsSocket = false;
                    }*/
                    aForm.DispenDevice = (AutoDispenDevice)DeviceInfo;
                    aForm.Show();
                    break;
                case DeviceType.Plate:
                    AutoPlateDeviceForm pForm = new AutoPlateDeviceForm();
                    pForm.FatherForm = this;
                    pForm.IsSocket = true;
                    pForm.PlateDevice = (AutoPlateDevice)DeviceInfo;
                    pForm.Show();
                    break;
                case DeviceType.Analysis:
                    MultiTunnelDeviceForm mForm = new MultiTunnelDeviceForm();
                    mForm.FatherForm = this;
                    //mForm.IsSocket = true;
                    mForm.DeviceInfo = (MultiTunnelDevice)DeviceInfo;
                    mForm.Show();
                    break;
                case DeviceType.Clone:
                    CloneSelectionDeviceForm cForm = new CloneSelectionDeviceForm();
                    cForm.FatherForm = this;
                    cForm.IsSocket = true;
                    cForm.DeviceInfo = (CloneSelectionDevice)DeviceInfo;
                    cForm.Show();
                    break;
                case DeviceType.Liquid:
                    LiquidProcessForm lForm = new LiquidProcessForm();
                    lForm.FatherForm = this;
                    lForm.alcDevice = (LiquidProcessDevice)DeviceInfo;
                    lForm.Show();
                    break;

                case DeviceType.Matrix:
                    MatrixSystemDeviceForm maForm = new MatrixSystemDeviceForm();
                    maForm.FatherForm = this;
                    maForm.DeviceInfo = (MatrixSystemDevice)DeviceInfo;
                    maForm.Show();
                    break;
                case DeviceType.Storage:
                    MicroReactorForm mmForm = new MicroReactorForm();
                    mmForm.FatherForm = this;
                    mmForm.mrDevice = (MicroStorageDevice)DeviceInfo;
                    mmForm.Show();
                    break;
                default:
                    break;
            }
        }
Пример #2
0
        private void deviceButton_Click(object sender, EventArgs e)
        {
            switch (DeviceInfo.CurrentDeviceType)
            {
            case DeviceType.Dispen:
                AutoDispenDeviceForm aForm = new AutoDispenDeviceForm();
                aForm.FatherForm = this;
                aForm.IsSocket   = true;

                /*
                 * if (DeviceInfo is AutoDispenDevice) aForm.DispenDevice = (AutoDispenDevice)DeviceInfo;
                 * else
                 * {
                 *  aForm.TwincatDevice = (AutoDispenTwincatDevice)DeviceInfo;
                 *  aForm.IsSocket = false;
                 * }*/
                aForm.DispenDevice = (AutoDispenDevice)DeviceInfo;
                aForm.Show();
                break;

            case DeviceType.Plate:
                AutoPlateDeviceForm pForm = new AutoPlateDeviceForm();
                pForm.FatherForm  = this;
                pForm.IsSocket    = true;
                pForm.PlateDevice = (AutoPlateDevice)DeviceInfo;
                pForm.Show();
                break;

            case DeviceType.Analysis:
                MultiTunnelDeviceForm mForm = new MultiTunnelDeviceForm();
                mForm.FatherForm = this;
                //mForm.IsSocket = true;
                mForm.DeviceInfo = (MultiTunnelDevice)DeviceInfo;
                mForm.Show();
                break;

            case DeviceType.Clone:
                CloneSelectionDeviceForm cForm = new CloneSelectionDeviceForm();
                cForm.FatherForm = this;
                cForm.IsSocket   = true;
                cForm.DeviceInfo = (CloneSelectionDevice)DeviceInfo;
                cForm.Show();
                break;

            case DeviceType.Liquid:
                LiquidProcessForm lForm = new LiquidProcessForm();
                lForm.FatherForm = this;
                lForm.alcDevice  = (LiquidProcessDevice)DeviceInfo;
                lForm.Show();
                break;

            case DeviceType.Matrix:
                MatrixSystemDeviceForm maForm = new MatrixSystemDeviceForm();
                maForm.FatherForm = this;
                maForm.DeviceInfo = (MatrixSystemDevice)DeviceInfo;
                maForm.Show();
                break;

            case DeviceType.Storage:
                MicroReactorForm mmForm = new MicroReactorForm();
                mmForm.FatherForm = this;
                mmForm.mrDevice   = (MicroStorageDevice)DeviceInfo;
                mmForm.Show();
                break;

            default:
                break;
            }
        }