Ejemplo n.º 1
0
 private void SetupFormWindow(FormWindow formWindow)
 {
     this.Width       = formWindow.Width;
     this.Height      = formWindow.Height;
     this.Top         = formWindow.Top;
     this.Left        = formWindow.Left;
     this.WindowState = formWindow.FormWindowState;
 }
Ejemplo n.º 2
0
        private void AppForm_Close(object sender, FormClosingEventArgs e)
        {
            string path = $"{nameof(FormWindow)}.xml";

            FormWindow formData = new FormWindow {
                Width           = this.Width,
                Height          = this.Height,
                Top             = this.Top,
                Left            = this.Left,
                FormWindowState = this.WindowState
            };

            SerializeObjectToFile(formData, path);
        }