Esempio n. 1
0
        /* ----------------------------------------------------------------- */
        ///
        /// OnFormClosing
        ///
        /// <summary>
        /// フォームが閉じると直前に実行されます。
        /// </summary>
        ///
        /* ----------------------------------------------------------------- */
        protected override void OnFormClosing(FormClosingEventArgs e)
        {
            try
            {
                base.OnFormClosing(e);

                if (WindowState != FormWindowState.Normal)
                {
                    return;
                }
                Settings.User.X      = Location.X;
                Settings.User.Y      = Location.Y;
                Settings.User.Width  = Width;
                Settings.User.Height = Height;
            }
            finally { Saver?.Dispose(); }
        }