public void ShowMessage(string message) { if (this.defaultService != null) { this.defaultService.ShowMessage(message); } else { this.defaultService = this.GetDefaultService(); if (this.defaultService != null) { this.defaultService.ShowMessage(message); } } }
public void ShowError(Exception ex) { if (this.defaultService != null) { this.defaultService.ShowError(ex); } else { this.defaultService = this.GetDefaultService(); if (this.defaultService != null) { this.defaultService.ShowError(ex); } } }
public void SetUIDirty() { if (this.defaultService != null) { this.defaultService.SetUIDirty(); } else { this.defaultService = this.GetDefaultService(); if (this.defaultService != null) { this.defaultService.SetUIDirty(); } } }
protected override void OnLoad(EventArgs e) { ToolStripRenderer renderer = null; System.Windows.Forms.Design.IUIService ds = Context.GetService <System.Windows.Forms.Design.IUIService>(); if (ds != null) { renderer = ds.Styles["VsToolWindowRenderer"] as ToolStripRenderer; } if (renderer != null) { diffControl1.ToolStripRenderer = renderer; } base.OnLoad(e); }
protected override void OnThemeChanged(EventArgs e) { base.OnThemeChanged(e); ToolStripRenderer renderer = null; System.Windows.Forms.Design.IUIService ds = Context.GetService <System.Windows.Forms.Design.IUIService>(); if (ds != null) { renderer = ds.Styles["VsRenderer"] as ToolStripRenderer; } if (renderer != null) { pendingChangesTabs.Renderer = renderer; } if (VSVersion.VS2008OrOlder && !SystemInformation.HighContrast) { // We should use the VS colors instead of the ones provided by the OS IAnkhVSColor colorSvc = Context.GetService <IAnkhVSColor>(); Color color; if (colorSvc.TryGetColor(__VSSYSCOLOREX.VSCOLOR_COMMANDBAR_GRADIENT_MIDDLE, out color)) { pendingChangesTabs.BackColor = color; pendingChangesTabs.OverflowButton.BackColor = color; } if (renderer == null && colorSvc.TryGetColor(__VSSYSCOLOREX.VSCOLOR_COMMANDBAR_HOVEROVERSELECTED, out color)) { pendingChangesTabs.ForeColor = color; pendingChangesTabs.OverflowButton.ForeColor = color; } } foreach (PendingChangesPage p in _pages) { p.OnThemeChanged(e); } pendingChangesTabs.Invalidate(); }
public bool ShowToolWindow(Guid toolWindow) { if (this.defaultService != null) { return(this.defaultService.ShowToolWindow(toolWindow)); } else { this.defaultService = this.GetDefaultService(); if (this.defaultService != null) { return(this.defaultService.ShowToolWindow(toolWindow)); } else { return(false); } } }
public System.Windows.Forms.DialogResult ShowMessage(string message, string caption, System.Windows.Forms.MessageBoxButtons buttons) { if (this.defaultService != null) { return(this.defaultService.ShowMessage(message, caption, buttons)); } else { this.defaultService = this.GetDefaultService(); if (this.defaultService != null) { return(this.defaultService.ShowMessage(message, caption, buttons)); } else { return(System.Windows.Forms.DialogResult.Cancel); } } }
public bool ShowComponentEditor(object component, System.Windows.Forms.IWin32Window parent) { if (this.defaultService != null) { return(this.defaultService.ShowComponentEditor(component, parent)); } else { this.defaultService = this.GetDefaultService(); if (this.defaultService == null) { return(false); } else { return(this.defaultService.ShowComponentEditor(component, parent)); } } }
public System.Windows.Forms.IWin32Window GetDialogOwnerWindow() { if (this.defaultService != null) { return(this.defaultService.GetDialogOwnerWindow()); } else { this.defaultService = this.GetDefaultService(); if (this.defaultService == null) { return(null); } else { return(this.defaultService.GetDialogOwnerWindow()); } } }
public QueuePathDialog(System.Windows.Forms.Design.IUIService uiService) { throw new NotImplementedException(); }
public QueuePathDialog(System.Windows.Forms.Design.IUIService uiService) { }
public System.Windows.Forms.DialogResult ShowDialog(System.Windows.Forms.Form form) { Type propGridType = typeof(System.Windows.Forms.PropertyGrid); System.Reflection.FieldInfo gvInfo = propGridType.GetField("gridView", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance); //获取gridView实例 object gridViewRef = gvInfo.GetValue(this.markProperty); System.Reflection.FieldInfo edInfo = gvInfo.FieldType.GetField("errorDlg", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance); if (form.GetType() == edInfo.FieldType) { //获取errorDlg实例 object errorDlgRef = edInfo.GetValue(gridViewRef); System.Windows.Forms.MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("请正确设置数值")); if (this.defaultService != null) { return(this.defaultService.ShowDialog(form)); } else { this.defaultService = this.GetDefaultService(); if (this.defaultService == null) { return(System.Windows.Forms.DialogResult.Cancel); } else { return(this.defaultService.ShowDialog(form)); } } //return System.Windows.Forms.DialogResult.OK; //System.Reflection.PropertyInfo msgInfo = edInfo.FieldType.GetProperty("Message"); //System.Reflection.PropertyInfo detInfo = edInfo.FieldType.GetProperty("Details"); //string det = ""; detInfo.SetValue(errorDlgRef, "sfd", null);//(errorDlgRef, System.Reflection.BindingFlags.NonPublic, null, null, null); //string msg = ""; msgInfo.SetValue(errorDlgRef, "ss", null);//(errorDlgRef, null)); //IUIService iUI = m_PropertyGrid.GetServiceExInternal(typeof(IUIService)) as IUIService; //if (iUI == null) // return DialogResult.Cancel; //return iUI.ShowDialog(form); //MessageBox.Show(m_PropertyGrid, msg + ": " + det, "Invalid PropertyValue"); //return DialogResult.OK; } if (this.defaultService != null) { return(this.defaultService.ShowDialog(form)); } else { this.defaultService = this.GetDefaultService(); if (this.defaultService == null) { return(System.Windows.Forms.DialogResult.Cancel); } else { return(this.defaultService.ShowDialog(form)); } } }