Ejemplo n.º 1
0
        public Proportioner SetProportionor(int id, ControlType controlType, ProportionerSetting setting)
        {
            switch (id)
            {
            case 1:
                setting.ControlType1 = controlType;
                break;

            case 2:
                setting.ControlType2 = controlType;
                break;
            }
            switch (controlType)
            {
            case ControlType.Direct:
                this.Proportional = new ProportionorAnda(setting.EasySerialPort);
                break;

            case ControlType.PLC:
                this.Proportional = new ProportionorPLC(setting.EasySerialPort);
                break;

            case ControlType.Disable:
                this.Proportional = new ProportionorDisable(setting.EasySerialPort);
                break;
            }
            return(this);
        }
Ejemplo n.º 2
0
 public SettingProportionerControl Setup()
 {
     this.ReadLanguageResources();
     this.cbxControlType1.SelectedItem = SensorMgr.Instance.Proportioners.ControlType1;
     this.cbxControlType2.SelectedItem = SensorMgr.Instance.Proportioners.ControlType2;
     this.cbxChn1.SelectedItem         = SensorMgr.Instance.Proportioners.Channel1;
     this.cbxChn2.SelectedItem         = SensorMgr.Instance.Proportioners.Channel2;
     if (SensorMgr.Instance.Proportioners != null)
     {
         this.settingBackUp = (ProportionerSetting)SensorMgr.Instance.Proportioners.Clone();
     }
     return(this);
 }