Пример #1
0
        private void ASFui_FormClosing(object sender, FormClosingEventArgs e)
        {
            switch (WindowState)
            {
            case FormWindowState.Maximized:
                Properties.Settings.Default.Location  = RestoreBounds.Location;
                Properties.Settings.Default.Size      = RestoreBounds.Size;
                Properties.Settings.Default.Maximized = true;
                break;

            case FormWindowState.Normal:
                Properties.Settings.Default.Location  = Location;
                Properties.Settings.Default.Size      = Size;
                Properties.Settings.Default.Maximized = false;
                break;

            case FormWindowState.Minimized:
                break;

            default:
                Properties.Settings.Default.Location  = RestoreBounds.Location;
                Properties.Settings.Default.Size      = RestoreBounds.Size;
                Properties.Settings.Default.Maximized = false;
                break;
            }
            Properties.Settings.Default.Save();
            if (!_asfRunning || !Properties.Settings.Default.IsLocal)
            {
                return;
            }
            _asf.Stop();
            Logging.Info(@"Closing ASFui.");
        }
Пример #2
0
 private void ASFui_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (!_asfRunning || !Properties.Settings.Default.IsLocal)
     {
         return;
     }
     _asf.Stop();
 }