public MasterDto() { Config = new MasterConfig(); Controls = new List <SerializableMap> (); Serial = new SerialSettings(); Name = "New Session"; }
public MasterConfig Edit(MasterConfig oldObject) { Text = "Master Setup"; var newObject = oldObject.Clone(); propertyGrid.SelectedObject = newObject; if (ShowDialog() == DialogResult.OK) { return(newObject); } return(oldObject); }
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); }
void ButtonOkClick(object sender, EventArgs e) { Config = (MasterConfig)propertyGrid.SelectedObject; }