Exemplo n.º 1
0
        private void _btnGroup_Click(object sender, RoutedEventArgs e)
        {
            var uc = new AddGroupsView();

            ViewManager.AddUserControl(uc);
            ViewManager.OpenUserControl(uc);
        }
Exemplo n.º 2
0
        private void _btnManual_Click(object sender, RoutedEventArgs e)
        {
            var uc = new ManuallyOperationsView();

            ViewManager.AddUserControl(uc);
            ViewManager.OpenUserControl(uc);
        }
Exemplo n.º 3
0
        private void _btnAdd_Click(object sender, RoutedEventArgs e)
        {
            var view = new EditFiltersGroup();

            ViewManager.AddUserControl(view);
            ViewManager.OpenUserControl(view);
        }
Exemplo n.º 4
0
        private void Edit_Click(object sender, RoutedEventArgs e)
        {
            var button    = sender as ButtonWithObject;
            var parameter = button?.Object;

            switch (parameter)
            {
            case Operation operation:
            {
                var view = new ManuallyOperationsView(operation);
                ViewManager.AddUserControl(view);
                ViewManager.OpenUserControl(view);
                break;
            }

            case OperationsGroup group:
            {
                var view = new AddGroupsView(group);
                ViewManager.AddUserControl(view);
                ViewManager.OpenUserControl(view);
                break;
            }
            }

            e.Handled = true;
        }
Exemplo n.º 5
0
        private void BtnAdd_Click(object sender, RoutedEventArgs e)
        {
            var view = new AddConsumerView();

            ViewManager.AddUserControl(view);
            ViewManager.OpenUserControl(view);

            e.Handled = true;
        }
Exemplo n.º 6
0
        private void BtnAdd_Click(object sender, RoutedEventArgs e)
        {
            var view = new CreateInvoiceItemView(_invoice.Items);

            ViewManager.AddUserControl(view);
            ViewManager.OpenUserControl(view);

            e.Handled = true;
        }
Exemplo n.º 7
0
        private void Edit_Click(object sender, RoutedEventArgs e)
        {
            var obj      = (ButtonWithObject)sender;
            var consumer = (Consumer)obj.Object;

            var view = new AddConsumerView(consumer);

            ViewManager.AddUserControl(view);
            ViewManager.OpenUserControl(view);
        }
Exemplo n.º 8
0
        private void Edit_Click(object sender, RoutedEventArgs e)
        {
            var obj     = (ButtonWithObject)sender;
            var invoice = (Invoice)obj.Object;

            var view = new GeneratorView(invoice);

            ViewManager.AddUserControl(view);
            ViewManager.OpenUserControl(view);
        }
Exemplo n.º 9
0
        private void OpenEditMode(object sender, RoutedEventArgs e)
        {
            var button = (sender as ButtonWithObject);
            var group  = button?.Object as FiltersGroup;
            var view   = new EditFiltersGroup(group);

            ViewManager.AddUserControl(view);
            ViewManager.OpenUserControl(view);

            e.Handled = true;
        }
Exemplo n.º 10
0
        private void OpenEditMode(object sender, RoutedEventArgs e)
        {
            var button = (sender as ButtonWithObject);
            var filter = button?.Object as Filter;
            var view   = new ShowOperations(filter);

            ViewManager.AddUserControl(view);
            ViewManager.OpenUserControl(view);

            e.Handled = true;
        }
Exemplo n.º 11
0
        private void Edit_Click(object sender, RoutedEventArgs e)
        {
            var button    = sender as ButtonWithObject;
            var parameter = button?.Object;

            switch (parameter)
            {
            case Operation operation:
            {
                var view = new ManuallyOperationsView(operation);
                ViewManager.AddUserControl(view);
                ViewManager.OpenUserControl(view);
                break;
            }

            case OperationsGroup group:
            {
                var view = new AddGroupsView(group);
                ViewManager.AddUserControl(view);
                ViewManager.OpenUserControl(view);
                break;
            }

            case Group _:
            {
                if (button.Context is StackPanel stackPanel)
                {
                    stackPanel.Children[0].Visibility = stackPanel.Children[0].Visibility == Visibility.Visible
                            ? Visibility.Collapsed
                            : Visibility.Visible;
                }

                break;
            }
            }

            e.Handled = true;
        }