Example #1
0
 private void frmFetchingVirtual_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (e.CloseReason != CloseReason.UserClosing)
     {
         // Завершение
         FetchVirtualFunctions.StopFetch();
     }
     else
     {
         e.Cancel    = true;
         WindowState = FormWindowState.Minimized;
     }
 }
Example #2
0
        private void LoadFirst()
        {
            // Проверка авторизации
            Properties.Settings settings = Properties.Settings.Default;
            Registered = Data.Authorization(settings.CopyOwner, settings.CopyKey);
            Bonus      = !Registered;

            string configfilename = Application.StartupPath + "\\config.ini";

            if (File.Exists(configfilename))
            {
                MemIniFile mif     = new MemIniFile(configfilename);
                string     section = "Application";
                mif.WriteInteger(section, "Station", Properties.Settings.Default.Station);
                mif.WriteString(section, "StartupPath", Application.StartupPath);
                mif.WriteBool(section, "Registered", Registered);
                mif.WriteBool(section, "Bonus", Bonus);
                FetchVirtualFunctions.StartFetch(new Tuple <int, string, exitApp>(
                                                     Properties.Settings.Default.Station, mif.ToString(), closeServer));
            }
        }