Exemple #1
0
        private void onlineAllListView_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            ListViewHitTestInfo info = onlineAllListView.HitTest(e.X, e.Y);
            if (info.Item != null)
            {
                int index = info.Item.Index;
                BaseDevice device = deviceManager.getDevice(index);

                switch (device.CurrentDeviceType)
                {
                    case DeviceType.Dispen:
                        AutoDispenDeviceForm form = new AutoDispenDeviceForm();
                        form.FatherForm = this;
                        form.IsSocket = true;
                        if (device is AutoDispenVirtualDevice)
                            form.DispenDevice = (AutoDispenVirtualDevice)device;
                        else
                        {
                            form.DispenTwincatDevice = (AutoDispenTwincatDevice)device;
                            form.IsSocket = false;
                        }
                        form.Show();
                        break;
                    case DeviceType.Plate:
                        AutoPlateDeviceForm pform = new AutoPlateDeviceForm();
                        pform.FatherForm = this;
                        pform.IsSocket = true;
                        pform.PlateDevice = (AutoPlateVirtualDevice)device;
                        pform.Show();
                        break;
                    case DeviceType.Analysis:
                        MultiTunnelDeviceForm mForm = new MultiTunnelDeviceForm();
                        mForm.FatherForm = this;
                        mForm.DeviceInfo = (MultiTunnelVirtualDevice)device;
                        mForm.Show();
                        break;
                    case DeviceType.Clone:
                        CloneSelectionDeviceForm cForm = new CloneSelectionDeviceForm();
                        cForm.FatherForm = this;
                        cForm.IsSocket = true;
                        cForm.DeviceInfo = (CloneSelectionVirtualDevice)device;
                        cForm.Show();
                        break;
                    case DeviceType.Liquid:
                        LiquidProcessForm forml = new LiquidProcessForm();
                        forml.FatherForm = this;
                        forml.DeviceInfo = device;
                        forml.Show();
                        break;
                    case DeviceType.Matrix:
                        MatrixSystemDeviceForm maForm = new MatrixSystemDeviceForm();
                        maForm.FatherForm = this;
                        maForm.IsSocket = true;
                        maForm.DeviceInfo = (MatrixSystemVirtualDevice)device;
                        maForm.Show();
                        break;
                    case DeviceType.Storage:
                        MicroReactorForm mmForm = new MicroReactorForm();
                        mmForm.FatherForm = this;
                        mmForm.mrDevice = (MicroStorageVirtualDevice)device;
                        mmForm.Show();
                        break;
                    default:
                        DeviceInfoForm form2 = new DeviceInfoForm();
                        form2.FatherForm = this;
                        form2.DeviceInfo = device;
                        form2.Show();
                        break;

                }
            }
        }
Exemple #2
0
        private void onlineAllListView_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            ListViewHitTestInfo info = onlineAllListView.HitTest(e.X, e.Y);

            if (info.Item != null)
            {
                int        index  = info.Item.Index;
                BaseDevice device = deviceManager.getDevice(index);

                switch (device.CurrentDeviceType)
                {
                case DeviceType.Dispen:
                    AutoDispenDeviceForm form = new AutoDispenDeviceForm();
                    form.FatherForm = this;
                    form.IsSocket   = true;
                    if (device is AutoDispenVirtualDevice)
                    {
                        form.DispenDevice = (AutoDispenVirtualDevice)device;
                    }
                    else
                    {
                        form.DispenTwincatDevice = (AutoDispenTwincatDevice)device;
                        form.IsSocket            = false;
                    }
                    form.Show();
                    break;

                case DeviceType.Plate:
                    AutoPlateDeviceForm pform = new AutoPlateDeviceForm();
                    pform.FatherForm  = this;
                    pform.IsSocket    = true;
                    pform.PlateDevice = (AutoPlateVirtualDevice)device;
                    pform.Show();
                    break;

                case DeviceType.Analysis:
                    MultiTunnelDeviceForm mForm = new MultiTunnelDeviceForm();
                    mForm.FatherForm = this;
                    mForm.DeviceInfo = (MultiTunnelVirtualDevice)device;
                    mForm.Show();
                    break;

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

                case DeviceType.Liquid:
                    LiquidProcessForm forml = new LiquidProcessForm();
                    forml.FatherForm = this;
                    forml.DeviceInfo = device;
                    forml.Show();
                    break;

                case DeviceType.Matrix:
                    MatrixSystemDeviceForm maForm = new MatrixSystemDeviceForm();
                    maForm.FatherForm = this;
                    maForm.IsSocket   = true;
                    maForm.DeviceInfo = (MatrixSystemVirtualDevice)device;
                    maForm.Show();
                    break;

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

                default:
                    DeviceInfoForm form2 = new DeviceInfoForm();
                    form2.FatherForm = this;
                    form2.DeviceInfo = device;
                    form2.Show();
                    break;
                }
            }
        }