Example #1
0
 private void InstallationMachineViewModel_OnSPWebTeplateSelection(object sender, SPWebTeplateEventArgs e)
 {
     try
     {
         ValidationListBox.AddMessage((string)e.UserState);
         SPWebTemplate _selectedTemplate = null;
         foreach (SPWebTemplate _tmplt in e.WebTemplates)
         {
             if (!m_MainWindowStateMachine.InstallationDescription.SiteTemplate.Contains(_tmplt.Name))
             {
                 continue;
             }
             _selectedTemplate = _tmplt;
             break;
         }
         if (_selectedTemplate == null)
         {
             Controls.WebTemplateDialog _dialog = new WebTemplateDialog();
             _dialog.TemplatesCollection = e.WebTemplates;
             _dialog.ShowDialog();
             if (!_dialog.DialogResult.GetValueOrDefault(false))
             {
                 Tracing.TraceEvent.TraceWarning(97, "OnSPWebTeplateSelection", "Canceled template selection");
                 return;
             }
             _selectedTemplate = _dialog.WebTemplate;
         }
         m_MainWindowStateMachine.InstallationDescription.SiteTemplate  = _selectedTemplate.Name;
         m_MainWindowStateMachine.InstallationDescription.SPWebTemplate = _selectedTemplate;
         string _msg = String.Format("New template selected: {0}", Controls.WebTemplateDialog.SPWebTemplateToString(_selectedTemplate));
         Tracing.TraceEvent.TraceInformation(97, "OnSPWebTeplateSelection", _msg);
     }
     finally
     {
         e.SPWebTeplateSelected();
     }
 }
Example #2
0
 private void ValidationMachineViewModel_ProgressChanged(object sender, ProgressChangedEventArgs e)
 {
     ValidationListBox.AddMessage((string)e.UserState);
 }
Example #3
0
 private void SetupValidationDialog()
 {
     ValidationListBox.AddMessage(Properties.Resources.ValidationProcessStarting);
 }