示例#1
0
 public IOHelper(CardHelper card, IOSetInfo ioSet, AxisSetInfo axisSet, AbsolutePosSetInfo apSet, PortHelper plcHelper, PortHelper _232Helper)
 {
     this.card = card;
     this.ioSet = ioSet;
     this.axisSet = axisSet;
     this.apSet = apSet;
     this.plcHelper = plcHelper;
     this._232Helper = _232Helper;
 }
示例#2
0
 public FormMain()
 {
     card = new CardHelper(this);
     plcHelper = new PortHelper("COM1");
     if (AbsolutePosSet.UseAbsolutePos || AbsolutePosSet.UseFushiAbsolutePos)
         _232Helper = new PortHelper("COM2");
     jiagongHistory = new List<JiagongHistoryInfo>();
     IOHelper = new IOHelper(card, setting.Set.IOSet, setting.Set.AxisSet, setting.Set.AbsolutePosSet, plcHelper, _232Helper, this);
     ar = new AutoResetEvent(false);
     thread = new Thread(() => OnShowWait());
     thread.Start();
     Thread.Sleep(100);
     InitializeComponent();
     RefreshButton();
     this.KeyPreview = true;
     waitFrm.Ar.Set();
     ar.WaitOne();
 }
示例#3
0
 public IOHelper(CardHelper card, IOSetInfo ioSet, AxisSetInfo axisSet, AbsolutePosSetInfo apSet, PortHelper plcHelper, PortHelper _232Helper)
 {
     this.card       = card;
     this.ioSet      = ioSet;
     this.axisSet    = axisSet;
     this.apSet      = apSet;
     this.plcHelper  = plcHelper;
     this._232Helper = _232Helper;
 }
示例#4
0
        public FrmSet(SetInfo info, CardHelper cardHelper, PortHelper _232Helper)
        {
            InitializeComponent();
            var newInfo = info.Clone();
            this.cardHelper = cardHelper;
            this._232Helper = _232Helper;
            this.bindingSourceAxis.DataSource = newInfo;
            this.bindingSourceIO.DataSource = newInfo;
            this.bindingSourceOther.DataSource = newInfo;
            this.bindingSourceAbsolutePos.DataSource = newInfo;
            this.bindingSourceButton.DataSource = newInfo;

            var table = new DataTable();
            table.Columns.Add("ID", typeof(int));
            table.Columns.Add("Name");
            table.Rows.Add(1, L.R("FrmSet.SimpleWheel", "普通手轮"));
            table.Rows.Add(2, L.R("FrmSet.AdvWheel", "多功能键手轮"));
            this.cmbShouLunType.Properties.DataSource = table;
            this.cmbShouLunType.Properties.DisplayMember = "Name";
            this.cmbShouLunType.Properties.ValueMember = "ID";

            table = new DataTable();
            table.Columns.Add("ID", typeof(int));
            table.Columns.Add("Name");
            table.Rows.Add(1, L.R("FrmSet.UpLimit", "上负限位"));
            table.Rows.Add(2, L.R("FrmSet.DownLimit", "下负限位"));

            this.cmbMinusLimitMode.Properties.DataSource = table;
            this.cmbMinusLimitMode.Properties.DisplayMember = "Name";
            this.cmbMinusLimitMode.Properties.ValueMember = "ID";

            table = new DataTable();
            table.Columns.Add("ID");
            table.Columns.Add("Name");
            table.Rows.Add("zh-CN", "中文");
            table.Rows.Add("en-US", "English");

            this.lueLanguage.Properties.DataSource = table;
            this.lueLanguage.Properties.DisplayMember = "Name";
            this.lueLanguage.Properties.ValueMember = "ID";

            table = new DataTable();
            table.Columns.Add("ID");
            table.Columns.Add("Name");
            table.Rows.Add("1", L.R("FrmSet.ScriptMode1", "模式1(多行)"));
            table.Rows.Add("2", L.R("FrmSet.ScriptMode2", "模式2(单行)"));

            this.lueScriptMode.Properties.DataSource = table;
            this.lueScriptMode.Properties.DisplayMember = "Name";
            this.lueScriptMode.Properties.ValueMember = "ID";

            table = new DataTable();
            table.Columns.Add("ID", typeof(int));
            table.Columns.Add("Name");
            table.Rows.Add(0,  L.R("FrmSet.ThrowMode1", "普通穿透"));
            table.Rows.Add(1, L.R("FrmSet.ThrowMode2", "位置模式穿透"));

            this.lueThrowMode.Properties.DataSource = table;
            this.lueThrowMode.Properties.DisplayMember = "Name";
            this.lueThrowMode.Properties.ValueMember = "ID";

            table = new DataTable();
            table.Columns.Add("ID", typeof(int));
            table.Columns.Add("Name");
            table.Rows.Add(0, L.R("FrmSet.ThrowStartMode1", "穿透信号"));
            table.Rows.Add(1, L.R("FrmSet.ThrowStartMode2", "最低位置"));

            this.lueThrowStartMode.Properties.DataSource = table;
            this.lueThrowStartMode.Properties.DisplayMember = "Name";
            this.lueThrowStartMode.Properties.ValueMember = "ID";
        }