示例#1
0
 public MasterDto()
 {
     Config   = new MasterConfig();
     Controls = new List <SerializableMap> ();
     Serial   = new SerialSettings();
     Name     = "New Session";
 }
示例#2
0
        public MasterConfig Edit(MasterConfig oldObject)
        {
            Text = "Master Setup";
            var newObject = oldObject.Clone();

            propertyGrid.SelectedObject = newObject;
            if (ShowDialog() == DialogResult.OK)
            {
                return(newObject);
            }
            return(oldObject);
        }
示例#3
0
        public MasterConfig Clone()
        {
            var clone = new MasterConfig();

            clone.TimeoutMs      = TimeoutMs;
            clone.ConnectMs      = ConnectMs;
            clone.DelayMs        = DelayMs;
            clone.TimerMs        = TimerMs;
            clone.Reconnect      = Reconnect;
            clone.ShowStacktrace = ShowStacktrace;
            clone.ShowPackets    = ShowPackets;
            clone.RtuOverSocket  = RtuOverSocket;
            return(clone);
        }
示例#4
0
 void ButtonOkClick(object sender, EventArgs e)
 {
     Config = (MasterConfig)propertyGrid.SelectedObject;
 }