示例#1
0
        public override string ToString()
        {
            string s = _index + " : ";

            if (_plc != null)
            {
                s += _plc.ToString() + " : ";
            }
            else
            {
                s += "[NO PLC SELECTED] : ";
            }
            s += _type.ToString() + " : " + _name;
            return(s);
        }
示例#2
0
 private void button_status_Click(object sender, EventArgs e)
 {
     MessageBox.Show(_plc.getClient().GetSendFrames(), _plc.ToString() + _plc.getClient().GetStatus());
 }
示例#3
0
        private void button_plc_delete_Click(object sender, EventArgs e)
        {
            DialogResult dialogResult = MessageBox.Show("plc is linked to " + selected_plc.ListAktuator.Count + " actuators!", "do you really want to delete " + selected_plc.ToString() + "?",
                                                        MessageBoxButtons.YesNo,
                                                        MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2);

            if (dialogResult == DialogResult.Yes) //plc löschen
            {
                //foreach (aktuator a in _list_aktuator)
                //    if (a.isPlc(selected_plc))
                //        a.change_plc(null);
                _list_plc.Remove(selected_plc);
                listBox_plc_refresh();
                panel_edit_plc.Visible = false;
            }
        }