public ExchangeSnapInHelper(NamespaceSnapInBase snapIn, IExchangeSnapIn exchangeSnapIn) { this.snapIn = snapIn; this.exchangeSnapIn = exchangeSnapIn; Thread.CurrentThread.Priority = ThreadPriority.AboveNormal; Application.EnableVisualStyles(); this.snapInName = this.snapIn.GetType().Name; try { Thread.CurrentThread.Name = this.snapInName; } catch (InvalidOperationException) { } SynchronizationContext synchronizationContext = new SynchronizeInvokeSynchronizationContext(this.snapIn); SynchronizationContext.SetSynchronizationContext(synchronizationContext); ManagementGUICommon.RegisterAssembly(0, "Microsoft.Exchange.ManagementGUI, Version=15.00.0000.000, Culture=neutral, PublicKeyToken=31bf3856ad364e35", "ObjectPickerSchema.xml"); ManagementGUICommon.RegisterAssembly(1, "Microsoft.Exchange.ManagementGUI, Version=15.00.0000.000, Culture=neutral, PublicKeyToken=31bf3856ad364e35", "ResultPaneSchema.xml"); ManagementGUICommon.RegisterAssembly(2, "Microsoft.Exchange.ManagementGUI, Version=15.00.0000.000, Culture=neutral, PublicKeyToken=31bf3856ad364e35", "StrongTypeEditorSchema.xml"); Assembly assembly = Assembly.Load("Microsoft.Exchange.ManagementGUI, Version=15.00.0000.000, Culture=neutral, PublicKeyToken=31bf3856ad364e35"); ManagementGUICommon.RegisterResourcesAssembly(ExchangeResourceManager.GetResourceManager("Microsoft.Exchange.ManagementGUI.Resources.Strings", assembly), ExchangeResourceManager.GetResourceManager("Microsoft.Exchange.ManagementGUI.Resources.Icons", assembly)); this.uiService = new UIService(null); this.settingsProvider = new ExchangeSettingsProvider(); this.services = new ServiceContainer(); this.services.AddService(typeof(IUIService), this.uiService); this.services.AddService(typeof(SynchronizationContext), synchronizationContext); this.services.AddService(typeof(ISettingsProviderService), this.settingsProvider); this.components = new ServicedContainer(this.services); this.LoadTestStub(); }
public CollectionObserver(ScopeNode parent, AsyncStatus status, Func <TModel, ScopeNode> mapper) { _snapIn = parent.SnapIn; _children = parent.Children; _status = status; _mapper = mapper; _status.ReportProgress(0, 0, "Fetching..."); }
public SingleObserver(ScopeNode parent, AsyncStatus status, Func <TModel, ScopeNode[]> builder) { _snapIn = parent.SnapIn; _children = parent.Children; _status = status; _builder = builder; _status.ReportProgress(0, 0, "Fetching..."); }
public static void Show(NamespaceSnapInBase owner, Exception ex) { string text = string.Format(Properties.Resources.ErrorMessage, ex.Message); MsgBoxUtil.Show(owner, text, MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1); }
public static void Show(NamespaceSnapInBase owner, string message) { MsgBoxUtil.Show(owner, message, MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1); }
public static bool Confirm(NamespaceSnapInBase owner, string message) { DialogResult ret = MsgBoxUtil.Show(owner, message, MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1); return(ret == DialogResult.Yes); }
public SnapInUIService(NamespaceSnapInBase snapIn) : base(null) { this.snapIn = snapIn; }
public SnapInUIService(NamespaceSnapInBase snapIn, Control control) : base(control) { this.snapIn = snapIn; }