Exemplo n.º 1
0
        public void Apply(object sender, RoutedEventArgs e)
        {
            WindowOrderManager wom = WindowOrderManager.getWOM();

            wom.Apply();

            this.Visibility         = Visibility.Hidden;
            tasktrayProcess.Visible = true;
        }
Exemplo n.º 2
0
        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;
            }
        }
Exemplo n.º 3
0
        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);
            }
        }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 5
0
        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;
            }
        }