public WindowView(ImageSource Icon, string Title, MtbWindow window) { InitializeComponent(); icon.Source = Icon; title.Text = Title; Window = window; shot.Fill = new VisualBrush { Visual = window }; }
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(); }
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); }
public void ShowWindow(MtbWindow Window) { Window.Visibility = Visibility.Visible; }