Esempio n. 1
0
 private void createDeviceButton_Click(object sender, EventArgs e)
 {
     DeviceType selectType = EnumHelper.TypeEnums[typeComboBox.SelectedIndex];
     bool isSocket = true;
     /*此处是为了都走Socket的方式,如需有TwinCAT支持请加上这句话
         if (communicateComboBox.SelectedIndex == 1) isSocket = false;
      */
     //if (selectType == DeviceType.Dispen)
     if (false)
     {
         CreateDispenForm form = new CreateDispenForm();
         form.FatherForm = FatherForm;
         form.IsSocket = isSocket;
         this.Close();
         form.Show();
     }
     else
     {
         DeviceForm form = new DeviceForm();
         form.IsCreating = true;
         form.FatherForm = FatherForm;
         form.Type = selectType;
         form.IsSocket = isSocket;
         this.Close();
         form.Show();
     }
 }
Esempio n. 2
0
        private void createDeviceButton_Click(object sender, EventArgs e)
        {
            DeviceType selectType = EnumHelper.TypeEnums[typeComboBox.SelectedIndex];
            bool       isSocket   = true;

            /*此处是为了都走Socket的方式,如需有TwinCAT支持请加上这句话
             *  if (communicateComboBox.SelectedIndex == 1) isSocket = false;
             */
            //if (selectType == DeviceType.Dispen)
            if (false)
            {
                CreateDispenForm form = new CreateDispenForm();
                form.FatherForm = FatherForm;
                form.IsSocket   = isSocket;
                this.Close();
                form.Show();
            }
            else
            {
                DeviceForm form = new DeviceForm();
                form.IsCreating = true;
                form.FatherForm = FatherForm;
                form.Type       = selectType;
                form.IsSocket   = isSocket;
                this.Close();
                form.Show();
            }
        }
Esempio n. 3
0
        private void deviceListView_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            ListViewHitTestInfo info = deviceListView.HitTest(e.X, e.Y);

            if (info.Item != null)
            {
                int        index  = info.Item.Index;
                BaseDevice device = virtualDeviceManager.getDevice(index);
                DeviceForm form   = new DeviceForm();
                form.FatherForm = this;
                form.DeviceInfo = device;
                form.Show();
            }
        }
Esempio n. 4
0
 private void button1_Click(object sender, EventArgs e)
 {
     DeviceForm form = new DeviceForm();
     form.IsCreating = true;
     form.FatherForm = FatherForm;
     form.Type = DeviceType.Dispen;
     form.IsSocket = IsSocket;
     if (comboBox1.SelectedIndex == 0)
     {
         //form.DispenType = AutoDispenDevice.AutoDispenType.PeiYangMin;
         form.DispenTwincatType = AutoDispenTwincatDevice.AutoDispenType.PeiYangMin;
     }
     else
     {
         //form.DispenType = AutoDispenDevice.AutoDispenType.ShenKongBan;
         form.DispenTwincatType = AutoDispenTwincatDevice.AutoDispenType.ShenKongBan;
     }
     this.Close();
     form.Show();
 }
Esempio n. 5
0
        private void button1_Click(object sender, EventArgs e)
        {
            DeviceForm form = new DeviceForm();

            form.IsCreating = true;
            form.FatherForm = FatherForm;
            form.Type       = DeviceType.Dispen;
            form.IsSocket   = IsSocket;
            if (comboBox1.SelectedIndex == 0)
            {
                //form.DispenType = AutoDispenDevice.AutoDispenType.PeiYangMin;
                form.DispenTwincatType = AutoDispenTwincatDevice.AutoDispenType.PeiYangMin;
            }
            else
            {
                //form.DispenType = AutoDispenDevice.AutoDispenType.ShenKongBan;
                form.DispenTwincatType = AutoDispenTwincatDevice.AutoDispenType.ShenKongBan;
            }
            this.Close();
            form.Show();
        }