Exemple #1
0
 private void onFanControlButtonClick(object sender, EventArgs e)
 {
     mControlForm = new ControlForm();
     mControlForm.onApplyCallback += (sender2, e2) =>
     {
         mEnableToolStripMenuItem.Checked      = ControlManager.getInstance().IsEnable;
         mNormalToolStripMenuItem.Checked      = (ControlManager.getInstance().ModeType == MODE_TYPE.NORMAL);
         mSilenceToolStripMenuItem.Checked     = (ControlManager.getInstance().ModeType == MODE_TYPE.SILENCE);
         mPerformanceToolStripMenuItem.Checked = (ControlManager.getInstance().ModeType == MODE_TYPE.PERFORMANCE);
         mGameToolStripMenuItem.Checked        = (ControlManager.getInstance().ModeType == MODE_TYPE.GAME);
     };
     mControlForm.ShowDialog();
     mControlForm = null;
 }
Exemple #2
0
 private void onFanControlButtonClick(object sender, EventArgs e)
 {
     mControlForm = new ControlForm();
     mControlForm.onApplyCallback += (sender2, e2) =>
     {
         mEnableToolStripMenuItem.Checked      = ControlManager.getInstance().IsEnable;
         mNormalToolStripMenuItem.Checked      = (ControlManager.getInstance().ModeIndex == 0);
         mSilenceToolStripMenuItem.Checked     = (ControlManager.getInstance().ModeIndex == 1);
         mPerformanceToolStripMenuItem.Checked = (ControlManager.getInstance().ModeIndex == 2);
         mGameToolStripMenuItem.Checked        = (ControlManager.getInstance().ModeIndex == 3);
     };
     mControlForm.ShowDialog();
     mControlForm = null;
 }
Exemple #3
0
        private void onClosing(object sender, FormClosingEventArgs e)
        {
            if (mControlForm != null)
            {
                mControlForm.Close();
                mControlForm = null;
            }

            if (mIsExit == false)
            {
                this.Visible = false;
                e.Cancel     = true;
            }
        }
Exemple #4
0
        private void onTrayMenuExit(object sender, EventArgs e)
        {
            if (mControlForm != null)
            {
                mControlForm.Close();
                mControlForm = null;
            }

            HardwareManager.getInstance().stop();

            mFanIconTimer.Stop();
            mTrayIcon.Visible = false;

            mIsExit = true;
            Application.ExitThread();
            Application.Exit();
        }
Exemple #5
0
 private void onFanControlButtonClick(object sender, EventArgs e)
 {
     mControlForm = new ControlForm();
     mControlForm.onApplyCallback += (sender2, e2) =>
     {
         mEnableToolStripMenuItem.Checked      = ControlManager.getInstance().IsEnable;
         mNormalToolStripMenuItem.Checked      = (ControlManager.getInstance().ModeIndex == 0);
         mSilenceToolStripMenuItem.Checked     = (ControlManager.getInstance().ModeIndex == 1);
         mPerformanceToolStripMenuItem.Checked = (ControlManager.getInstance().ModeIndex == 2);
         mGameToolStripMenuItem.Checked        = (ControlManager.getInstance().ModeIndex == 3);
     };
     mControlForm.StartPosition = FormStartPosition.Manual;
     mControlForm.Location      = new Point(this.Location.X + 100, this.Location.Y + 100);
     mControlForm.ShowDialog();
     mControlForm.Dispose();
     mControlForm = null;
 }
Exemple #6
0
        private void onRestartProgram(object sender, EventArgs e)
        {
            if (mControlForm != null)
            {
                mControlForm.Close();
                mControlForm = null;
            }

            HardwareManager.getInstance().stop();

            mFanIconTimer.Stop();
            mTrayIcon.Visible = false;

            Program.releaseMutex();
            Program.executeProgram();

            mIsExit = true;
            Environment.Exit(0);
        }