Exemplo n.º 1
0
 public WindowView(ImageSource Icon, string Title, MtbWindow window)
 {
     InitializeComponent();
     icon.Source = Icon;
     title.Text  = Title;
     Window      = window;
     shot.Fill   = new VisualBrush {
         Visual = window
     };
 }
Exemplo n.º 2
0
        public void CloseWindow(MtbWindow window)
        {
            window.Task.WindowItems.Children.Remove(window.View);
            int count = window.Task.WindowItems.Children.Count;

            window.Task.Badge.Badge = count != 0 ? count + "" : null;
            windows.Children.Remove(window);

            SetProcessWorkingSetSize(System.Diagnostics.Process.GetCurrentProcess().Handle, -1, -1);
            GC.Collect();
        }
Exemplo n.º 3
0
 public MtbWindow AddWindow(ImageSource Icon, object Content, string Title, MtbPlugin Plugin)
 {
     foreach (TaskBarButton task in tasks.Children)
     {
         if (task.Plugin == Plugin)
         {
             MtbWindow window = new MtbWindow(Icon, Content, Title, task);
             ShowWindow(window);
             windows.Children.Add(window);
             window.Height = windows.ActualHeight;
             window.Width  = windows.ActualWidth;
             return(window);
         }
     }
     return(null);
 }
Exemplo n.º 4
0
 public void ShowWindow(MtbWindow Window)
 {
     Window.Visibility = Visibility.Visible;
 }