public void Apply(object sender, RoutedEventArgs e) { WindowOrderManager wom = WindowOrderManager.getWOM(); wom.Apply(); this.Visibility = Visibility.Hidden; tasktrayProcess.Visible = true; }
public void Move(object sender, RoutedEventArgs e) { WindowOrderManager wom = WindowOrderManager.getWOM(); if (GetSelectedItf() != null) { this.Visibility = Visibility.Hidden; wom.Move(GetSelectedItf()); this.Visibility = Visibility.Visible; } }
public ScaleOverlay(WindowOrderManager wom, WinInterface itf) { this.itf = itf; InitializeComponent(); this.Topmost = true; this.KeyDown += new KeyEventHandler(MainWindow_KeyDown); this.Width = SystemParameters.PrimaryScreenWidth; this.Height = SystemParameters.PrimaryScreenHeight; this.Top = SystemParameters.VirtualScreenTop; this.Left = SystemParameters.VirtualScreenLeft; this.Activate(); }
private void ListBoxItem_Drop(object sender, DragEventArgs e) { Console.WriteLine("Item"); if (sender is ListBoxItem) { this.IgnoreEvent = true; var source = e.Data.GetData(typeof(WinInterface)) as WinInterface; var target = ((ListBoxItem)(sender)).DataContext as WinInterface; WindowOrderManager.getWOM().MoveItfBetweenItf(source, target); } }
private void Init_ListBox() { WindowOrderManager wom = WindowOrderManager.getWOM(); listNotAssing.ItemsSource = wom.ListNotAssing; listBackground.ItemsSource = wom.ListBackground; listBottom.ItemsSource = wom.ListBottom; listForeground.ItemsSource = wom.ListForeground; MouseButtonEventHandler buttonDownHandler = new MouseButtonEventHandler(ListBoxItem_PreviewMouseLeftButtonDown); ListBoxFactory.InitAllListBox(listNotAssing, listBackground, listBottom, listForeground, List_PreviewMouseMove, buttonDownHandler, ListBoxItem_Drop, ListBox_PreviewMouseLeftButtonDown, ListBox_Drop); }
private void ListBox_Drop(object sender, DragEventArgs e) { Console.WriteLine("List"); if (sender is ListBox) { WindowOrderManager wom = WindowOrderManager.getWOM(); var source = e.Data.GetData(typeof(WinInterface)) as WinInterface; var target = ((ListBox)(sender)) as ListBox; wom.RemoveItfInList(source); ((IList <WinInterface>)target.ItemsSource).Add(source); //Add elem to destination IgnoreEvent = false; } }