protected override void OnFormClosing(FormClosingEventArgs e) { if (e.CloseReason == CloseReason.UserClosing) { HostWindowSettings settings = new HostWindowSettings(Text) {Location = Location, Size = Size}; settings.Save(); } base.OnFormClosing(e); }
protected override void OnLoad(EventArgs e) { HostWindowSettings settings = new HostWindowSettings(Text); SetLocation(settings.Location, settings.Size); base.OnLoad(e); }