Пример #1
0
        private void notifyIcon1_Click(object sender, EventArgs e)
        {
            Console.Out.WriteLine("system trey icon clicked");

            if (notifyIcon1.Icon.Size == Properties.Resources.icons8_survey_48_notif.Size)
            {
                /*
                 * if (Form1.staticMcq != null) {
                 *  Console.Out.WriteLine("staticMcq is being used");
                 *  notifyIcon1.Icon = Properties.Resources.icons8_survey_48;
                 *  Form1.staticMcq.Show();
                 * } else if (Form1.staticSubjective != null) {
                 *  Console.Out.WriteLine("staticSubjective is being used");
                 *  notifyIcon1.Icon = Properties.Resources.icons8_survey_48;
                 *  Form1.staticSubjective.Show();
                 * }
                 */
                Console.Out.WriteLine("staticQuestionView is being used");
                Form1.notifyIcon1.Icon = Properties.Resources.icons8_survey_48;
                Form1.staticQuestionView.Show();

                staticDummy.WindowState = FormWindowState.Minimized;
                FlashWindow.Stop(staticDummy);
                staticDummy.Hide();
            }
        }
Пример #2
0
        public void Drag_Leave()
        {
            FlashWindow.Stop(Main.Current);

            IDropTargetHelper _dropHelper = (IDropTargetHelper) new DragDropHelper();

            _dropHelper.DragLeave();
        }
Пример #3
0
        private void frmClient_Activated(object sender, EventArgs e)
        {
            BackColor = Color.DarkOrange;
            txtMessage.Focus();

            _focus = true;
            FlashWindow.Stop(this);
        }
Пример #4
0
        private void frmServer_Activated(object sender, EventArgs e)
        {
            //BackColor = Color.ForestGreen;
            txtMessage.Focus();

            _focus = true;
            FlashWindow.Stop(this);
        }
 private void StopFlashWindow()
 {
     if (!_flashWindowStarted)
     {
         return;
     }
     FlashWindow.Stop(Handle);
     _flashWindowStarted = false;
 }
Пример #6
0
        private void FlashWhileMinimized()
        {
            Invoke(new Action(() => FlashWindow.Start(this)));

            var minimized = true;

            while (minimized)
            {
                Thread.Sleep(100);
                Invoke(new Action(() => minimized = WindowState == FormWindowState.Minimized));
            }

            Invoke(new Action(() => FlashWindow.Stop(this)));
        }
Пример #7
0
        public void Drag_Drop(DragEventArgs e)
        {
            FlashWindow.Stop(Main.Current);

            try
            {
                Point      _p = Cursor.Position;
                Win32Point _wp;
                _wp.x = _p.X;
                _wp.y = _p.Y;
                IDropTargetHelper _dropHelper = (IDropTargetHelper) new DragDropHelper();
                _dropHelper.Drop((System.Runtime.InteropServices.ComTypes.IDataObject)e.Data, ref _wp, (int)e.Effect);
            }
            catch
            {
            }

            DoDataPaste(e.Data);
        }
Пример #8
0
 private void ChatInput_Click(object sender, EventArgs e)
 {
     FlashWindow.Stop(this);
 }