Exemple #1
0
        public override string ToString()
        {
            string id = "ID:" + PID + "\r\n";

            string current = "电流值:" + CurrentVal.ToString() + "\r\n";

            string pass = "******" + Pass.ToString() + "\r\n";

            return(id + current + pass);
        }
Exemple #2
0
        private void SaveParameter()
        {
            if (CurrentColIdx == 1)
            {
                string val = CurrentVal.ToString();

                var key = Info.DesParameterMap.First(x => x.Value == val).Key;
                dataGridView1.Rows[dataGridView1.CurrentCell.RowIndex].Cells[0].Value = key;

                Owner.UpdateSelected("DestParameter" + (CurrentRowIdx + 1), key);
            }

            if (CurrentColIdx == 2)
            {
                var val = float.Parse(CurrentVal.ToString());

                Owner.UpdateSelected("ParameterValue" + (CurrentRowIdx + 1), val);
            }
        }