public RenameRuleObjectDialog(IServiceProvider serviceProvider, string oldName, NameValidatorDelegate nameValidator, BasicBrowserDialog parent) { if (oldName == null) { throw new ArgumentNullException("oldName"); } if (serviceProvider == null) { throw new ArgumentNullException("serviceProvider"); } if (nameValidator == null) { throw new ArgumentNullException("nameValidator"); } this.serviceProvider = serviceProvider; this.name = oldName; this.nameValidator = nameValidator; this.parent = parent; this.InitializeComponent(); this.ruleNameTextBox.Text = oldName; this.Text = parent.RenameTitleText; this.newNamelabel.Text = parent.NewNameLabelText; base.Icon = null; IUIService service = (IUIService) this.serviceProvider.GetService(typeof(IUIService)); if (service != null) { this.Font = (Font) service.Styles["DialogFont"]; } }
public RenameRuleObjectDialog(IServiceProvider serviceProvider, string oldName, NameValidatorDelegate nameValidator, BasicBrowserDialog parent) { if (oldName == null) { throw new ArgumentNullException("oldName"); } if (serviceProvider == null) { throw new ArgumentNullException("serviceProvider"); } if (nameValidator == null) { throw new ArgumentNullException("nameValidator"); } this.serviceProvider = serviceProvider; this.name = oldName; this.nameValidator = nameValidator; this.parent = parent; this.InitializeComponent(); this.ruleNameTextBox.Text = oldName; this.Text = parent.RenameTitleText; this.newNamelabel.Text = parent.NewNameLabelText; base.Icon = null; IUIService service = (IUIService)this.serviceProvider.GetService(typeof(IUIService)); if (service != null) { this.Font = (Font)service.Styles["DialogFont"]; } }
private static MessageBoxOptions DetermineOptions(object sender) { MessageBoxOptions options = 0; Control parent = sender as Control; RightToLeft inherit = RightToLeft.Inherit; while ((inherit == RightToLeft.Inherit) && (parent != null)) { inherit = parent.RightToLeft; parent = parent.Parent; } if (inherit == RightToLeft.Yes) { options = MessageBoxOptions.RtlReading | MessageBoxOptions.RightAlign; } return options; }
private static MessageBoxOptions DetermineOptions(object sender) { MessageBoxOptions options = 0; Control parent = sender as Control; RightToLeft inherit = RightToLeft.Inherit; while ((inherit == RightToLeft.Inherit) && (parent != null)) { inherit = parent.RightToLeft; parent = parent.Parent; } if (inherit == RightToLeft.Yes) { options = MessageBoxOptions.RtlReading | MessageBoxOptions.RightAlign; } return(options); }