Exemplo n.º 1
0
        private void MaterialForm1_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (!shouldClose)
            {
                BLIO.Log("lblExit_Click (X) (kinda)");
                this.Opacity = 0;
                this.Hide();

                e.Cancel = true;
                return;
            }

            BLIO.Log("MaterialForm1_FormClosing   [" + e.CloseReason + "]");
            BLIO.DumpLogTxt();

            if (MUCTimer.RunningTimers.Count > 0)
            {
                if (MaterialRemindMeBox.Show("You have (" + MUCTimer.RunningTimers.Count + ") active timers running.\r\n\r\nAre you sure you wish to close RemindMe? These timers will not be saved\r\n\r\nClick here to convert these Timers into Reminders and close RemindMe", RemindMeBoxReason.YesNo, false, FormStartPosition.CenterScreen) == DialogResult.No)
                {
                    e.Cancel    = true;
                    shouldClose = false;
                    return;
                }
            }

            //Makes the mouseclick a little bit less laggy
            new Thread(() =>
            {
                Environment.Exit(0);
            }).Start();
        }
Exemplo n.º 2
0
        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            BLIO.Log("Form1_FormClosing   [" + e.CloseReason + "]");
            BLIO.DumpLogTxt();

            if (UCTimer.RunningTimers.Count > 0)
            {
                if (RemindMeBox.Show("You have (" + UCTimer.RunningTimers.Count + ") active timers running.\r\n\r\nAre you sure you wish to close RemindMe? These timers will not be saved", RemindMeBoxReason.YesNo) == DialogResult.No)
                {
                    e.Cancel = true;
                }
            }
        }
Exemplo n.º 3
0
 private void tmrDumpLogTxtContents_Tick(object sender, EventArgs e)
 {
     try
     {
         if (BLIO.systemLog.Count != currentLogCount)
         {
             currentLogCount = BLIO.DumpLogTxt();
         }
     }
     catch (Exception ex)
     {
         BLIO.Log("DumpLogTxT FAILED. " + ex.GetType().ToString());
         BLIO.WriteError(ex, "Error in tmrDumpLogTxtContents_Tick");
     }
 }