Пример #1
0
        private void RestartWorkflow(object sender, EventArgs eventArgs)
        {
            for (var i = 1; i < MainTabControl.Items.Count; i++)
            {
                var tabItem = (TabItem)MainTabControl.Items[i];
                //tabItem.IsEnabled = false;
            }

            ProductView.Reset();
            UpdateView.Reset();
            DisplayView.Reset();

            ProductView.LoadXml();
            DisplayView.LoadXml();
            UpdateView.LoadXml();
        }
Пример #2
0
 private void XmlImported(object sender, EventArgs eventArgs)
 {
     try
     {
         GlobalObjects.ViewModel.PropertyChangeEventEnabled = false;
         ProductView.LoadXml();
         DisplayView.LoadXml();
         UpdateView.LoadXml();
     }
     catch (Exception ex)
     {
         ex.LogException();
     }
     finally
     {
         GlobalObjects.ViewModel.PropertyChangeEventEnabled = true;
     }
 }
Пример #3
0
        public MainWindow()
        {
            try
            {
                GlobalObjects.ViewModel = new MainWindowViewModel(DialogCoordinator.Instance)
                {
                    ConfigXmlParser        = new OfficeInstallGenerator.ConfigXmlParser(GlobalObjects.DefaultXml),
                    AllowMultipleDownloads = true,
                    UseFolderShortNames    = true
                };

                DataContext = GlobalObjects.ViewModel;
                GlobalObjects.ViewModel.ApplicationMode = ApplicationMode.InstallGenerator;

                InitializeComponent();

                ProductView.LoadXml();
                DisplayView.LoadXml();
                UpdateView.LoadXml();

                ThemeManager.TransitionsEnabled = false;

                MainTabControl.SelectionChanged += MainTabControl_SelectionChanged;

                StartView.TransitionTab += TransitionTab;
                StartView.XmlImported   += XmlImported;

                ProductView.TransitionTab  += TransitionTab;
                UpdateView.TransitionTab   += TransitionTab;
                DisplayView.TransitionTab  += TransitionTab;
                GenerateView.TransitionTab += TransitionTab;
                DownloadView.TransitionTab += TransitionTab;
                LocalView.TransitionTab    += TransitionTab;


                LocalView.BranchChanged += BranchChanged;
                LocalView.MainWindow     = this;

                GenerateView.InfoMessage  += GenerateViewInfoMessage;
                GenerateView.ErrorMessage += GenerateView_ErrorMessage;

                DisplayView.InfoMessage  += GenerateViewInfoMessage;
                DisplayView.ErrorMessage += GenerateView_ErrorMessage;

                ProductView.InfoMessage  += GenerateViewInfoMessage;
                ProductView.ErrorMessage += GenerateView_ErrorMessage;

                UpdateView.InfoMessage  += GenerateViewInfoMessage;
                UpdateView.ErrorMessage += GenerateView_ErrorMessage;

                StartView.InfoMessage  += GenerateViewInfoMessage;
                StartView.ErrorMessage += GenerateView_ErrorMessage;

                DownloadView.InfoMessage  += GenerateViewInfoMessage;
                DownloadView.ErrorMessage += GenerateView_ErrorMessage;

                LocalView.InfoMessage  += GenerateViewInfoMessage;
                LocalView.ErrorMessage += GenerateView_ErrorMessage;

                RemoteView.ErrorMessage += GenerateView_ErrorMessage;
            }
            catch (Exception ex)
            {
                ex.LogException();
            }
        }