コード例 #1
0
        private void notify_MouseOverListener()
        {
            DispatcherTimer t = new DispatcherTimer();
            t.Interval = TimeSpan.FromMilliseconds(100);
            t.Tick += (s, _) =>
            {
                switch (Taskbar.Position())
                {
                    case Taskbar.ePosition.Bottom:
                        int[] rect = notify.GetRectangle();
                        Point mouse = WindowMethods.MousePositionOnScreen();

                        if (mouse.X >= rect[2] && mouse.X <= rect[3] && mouse.Y >= rect[1] && mouse.Y <= rect[0] && !drop.IsVisible && Taskbar.IsVisible())
                        {
                            drop = new DropArea(queue, notify);
                            WindowMethods.SetToNotifyIcon(drop, notify);
                            drop.Show();
                            drop.Visibility = System.Windows.Visibility.Visible;
                        }
                        break;
                }
            };
            t.Start();
        }
コード例 #2
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     notify_MouseOverListener();
     drop = new DropArea(queue);
     queue.Changed+=new TaskEventHandler(queue_Changed);
 }