Esempio n. 1
0
        private void image_MouseDown(object sender, MouseButtonEventArgs e)
        {
            count += 1;
            DispatcherTimer timer = new DispatcherTimer();

            timer.Interval  = new TimeSpan(0, 0, 0, 0, 100);
            timer.Tick     += (s, e1) => { timer.IsEnabled = false; count = 0; };
            timer.IsEnabled = true;
            if (count % 2 == 0)
            {
                talk_control talk_cont = new talk_control();

                talk_cont.Show();
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 鼠标单击
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void notifyIcon_MouseClick(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            //如果鼠标左键单击
            if (e.Button == MouseButtons.Left)
            {
                talk_control talk_cont = new talk_control();
                talk_cont.Show();

                //if (this.Visibility == Visibility.Visible)
                //{
                //    this.Visibility = Visibility.Hidden;
                //}
                //else
                //{
                //    this.Visibility = Visibility.Visible;
                //    this.Activate();
                //}
            }
        }
        /// <summary>  
        /// 鼠标单击  
        /// </summary>  
        /// <param name="sender"></param>  
        /// <param name="e"></param>  
        private void notifyIcon_MouseClick(object sender , System.Windows.Forms.MouseEventArgs e)
        {
            //如果鼠标左键单击
            if (e.Button == MouseButtons.Left)
            {
                talk_control talk_cont = new talk_control();
                talk_cont.Show();

                //if (this.Visibility == Visibility.Visible)
                //{
                //    this.Visibility = Visibility.Hidden;
                //}
                //else
                //{
                //    this.Visibility = Visibility.Visible;
                //    this.Activate();
                //}
            }
        }
        private void image_MouseDown(object sender , MouseButtonEventArgs e)
        {
            count += 1;
            DispatcherTimer timer = new DispatcherTimer();
            timer.Interval = new TimeSpan(0 , 0 , 0 , 0 , 100);
            timer.Tick += (s , e1) => { timer.IsEnabled = false; count = 0; };
            timer.IsEnabled = true;
            if (count % 2 == 0)
            {
                talk_control talk_cont = new talk_control();

                talk_cont.Show();
            }
        }