Пример #1
0
        //特效控制器
        private void ICONEffect_Click(object sender, EventArgs e)
        {
            switch (currentIconEffect)//判断当前效果
            {
            case EffectFlickOrSpin.Effect_Spin:
                currentIconEffect = EffectFlickOrSpin.Effect_Flick; //旋转切换为闪烁
                ICONEffect.Text   = "当前图标效果: 闪烁";                   //修改按钮文本显示
                Timer_IconEffect.Stop();                            //停止计时器
                Timer_IconEffect.Interval = 300;                    //设置定时器时间间隔
                Timer_IconEffect.Start();                           //开启计时器
                break;

            case EffectFlickOrSpin.Effect_Flick:
                currentIconEffect = EffectFlickOrSpin.Effect_Still; //闪烁切换为静止
                ICONEffect.Text   = "当前图标效果: 无";                    //修改按钮文本显示
                break;

            case EffectFlickOrSpin.Effect_Still:
                currentIconEffect = EffectFlickOrSpin.Effect_Spin; //静止切换为旋转
                ICONEffect.Text   = "当前图标效果: 旋转";                  //修改按钮文本显示
                Timer_IconEffect.Stop();                           //停止计时器
                Timer_IconEffect.Interval = 50;                    //设置定时器时间间隔
                Timer_IconEffect.Start();                          //开启计时器
                break;

            default:
                break;
            }
        }
Пример #2
0
        private void ApplicationQuit()
        {
            //退出前把所有的图标显示关闭
            notifyIcon_360.Visible       = false;
            notifyIcon_360bug.Visible    = false;
            NotifyIcon_TrayCheat.Visible = false;

            //关闭定时器
            Timer_IconEffect.Stop();

            Dispose(true);      //释放资源
            Application.Exit(); //退出程序
        }