public FormOmronTypeNX1P(PlcOmronTypeNX1PData plcData) : this()
        {
            _plcData              = plcData;
            _plcDriver            = (PlcOmronTypeNX1P)HardwareManage.dicHardwareDriver[_plcData.Name];
            this.panelConfig.Text = plcData.Name;

            ViewInit();
        }
示例#2
0
        public FormSetValue(PlcOmronTypeNX1P plcDriver, PlcOmronTypeNX1PData plcData, string strItemName)
        {
            InitializeComponent();

            if (plcDriver == null || plcData == null)
            {
                MessageBox.Show("Can not find the plc driver !", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1, MessageBoxOptions.ServiceNotification);
                this.Close();
            }
            if (!plcData.dicScanItems.ContainsKey(strItemName))
            {
                MessageBox.Show("Can not find the item !", "", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1, MessageBoxOptions.ServiceNotification);
                this.Close();
            }

            _plcDriver   = plcDriver;
            _strItemName = strItemName;
            _plcData     = plcData;
        }
示例#3
0
 public PlcOmronTypeNX1P(PlcOmronTypeNX1PData plcData)
 {
     omronFinsAPI = new OmronFinsAPI();
     this.plcData = plcData;
 }