Exemplo n.º 1
0
 private void DisplayAutoConfigureSettings()
 {
     _autoConfigureSettingsContainer = new AutoConfigureContainer(_folderPath, _backgroundStrippingParams, _invalidColor);
     _autoConfigureSettingsContainer.AutoConfigured += AutoConfigureEventHandler;
     BaseGrid.Children.Add(_autoConfigureSettingsContainer);
     Grid.SetRow(_autoConfigureSettingsContainer, 1);
     CancelButton.Content    = "Cancel";
     CancelButton.Visibility = Visibility.Visible;
     HelpButton.Visibility   = Visibility.Visible;
     ScreenTypeStatusHelper.CurrentScreenTypesEnum = ScreenTypesEnum.AutoConfigure;
 }
Exemplo n.º 2
0
        private void AutoConfigureEventHandler(object sender, AutoConfigureSettingsEventArgs args)
        {
            var autoconfiguredClickInputs = args.ClickInputs;

            if (_autoConfigureSettingsContainer != null)
            {
                //remove existing display
                BaseGrid.Children.Remove(_autoConfigureSettingsContainer);
                _autoConfigureSettingsContainer = null;
            }
            DisplayClickCanvasContainer(autoconfiguredClickInputs);
        }
Exemplo n.º 3
0
        private void Cancel(object sender, RoutedEventArgs e)
        {
            if (!ConfirmExit())
            {
                return;
            }

            if (_stripBackgroundContainer != null)
            {
                //remove existing display
                BaseGrid.Children.Remove(_stripBackgroundContainer);
                _stripBackgroundContainer = null;

                if (_backgroundStrippingParams != null)
                {
                    DisplayModelSettingsContainer();
                }
                else
                {
                    DisplaySelectFolderContainer();
                }
                return;
            }

            if (_processContainer != null)
            {
                _processContainer.Cancel();
                return;
            }

            if (_clickCanvasContainer != null)
            {
                //remove existing display
                BaseGrid.Children.Remove(_clickCanvasContainer);
                _clickCanvasContainer = null;

                if (_clickInputs != null)
                {
                    DisplayModelSettingsContainer();
                }
                else
                {
                    DisplaySelectFolderContainer();
                }

                return;
            }

            if (_modelSettingsContainer != null)
            {
                //remove existing display
                BaseGrid.Children.Remove(_modelSettingsContainer);
                _modelSettingsContainer = null;
                DisplaySelectFolderContainer();
                return;
            }

            if (_modelContainer != null)
            {
                BaseGrid.Children.Remove(_modelContainer);
                _modelContainer = null;
                DisplaySelectFolderContainer();
                return;
            }

            if (_autoConfigureSettingsContainer != null)
            {
                BaseGrid.Children.Remove(_autoConfigureSettingsContainer);
                _autoConfigureSettingsContainer = null;
                DisplayClickCanvasContainer(_clickInputs);
                return;
            }
        }