Ejemplo n.º 1
0
        public FormOmronTypeNJ(PlcOmronTypeNJData plcData) : this()
        {
            _plcData              = plcData;
            _plcDriver            = (PlcOmronTypeNJ)HardwareManage.dicHardwareDriver[_plcData.Name];
            this.panelConfig.Text = plcData.Name;

            ViewInit();
        }
Ejemplo n.º 2
0
        public FormSetValue(PlcOmronTypeNJ plcDriver, PlcOmronTypeNJData 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;
        }