protected override void OnClosing(CancelEventArgs e) { HelpProvider hp = this.Site.GetService(typeof(HelpProvider)) as HelpProvider; HelpService hs = this.Site.GetService(typeof(HelpService)) as HelpService; if (hp != null && hs.DynamicHelpEnabled) { hp.HelpNamespace = hs.DefaultHelp; } base.OnClosing(e); }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); HelpProvider hp = this.Site.GetService(typeof(HelpProvider)) as HelpProvider; HelpService hs = this.Site.GetService(typeof(HelpService)) as HelpService; if (hp != null && hs.DynamicHelpEnabled) { hp.HelpNamespace = hs.OptionsHelp; } // now let the user resize it. this.AutoSize = false; }
protected override void OnLoad(EventArgs e) { HelpProvider hp = this.Site.GetService(typeof(HelpProvider)) as HelpProvider; HelpService hs = this.Site.GetService(typeof(HelpService)) as HelpService; if (hp != null && hs.DynamicHelpEnabled) { hp.HelpNamespace = hs.SchemaHelp; } UpdateMenuState(); LoadSchemas(); this.dataGridView1.CellValueChanged += new DataGridViewCellEventHandler(dataGridView1_CellValueChanged); this.dataGridView1.RowsAdded += new DataGridViewRowsAddedEventHandler(dataGridView1_RowsAdded); }
public void SaveSettings() { this._settings["SearchWindowLocation"] = this.Location; // save replace mode size, since we will shink the size next time findOnly is set. this._settings["SearchSize"] = this.ClientSize; this._settings["FindMode"] = this._findOnly; this._settings["SearchXPath"] = this.checkBoxXPath.Checked; this._settings["SearchWholeWord"] = this.checkBoxWholeWord.Checked; this._settings["SearchRegex"] = this.checkBoxRegex.Checked; this._settings["SearchMatchCase"] = this.checkBoxMatchCase.Checked; this._settings["RecentFindStrings"] = _recentFindStrings.GetLatestValues(); this._settings["RecentReplaceStrings"] = _recentReplaceStrings.GetLatestValues(); HelpProvider hp = this.Site.GetService(typeof(HelpProvider)) as HelpProvider; HelpService hs = this.Site.GetService(typeof(HelpService)) as HelpService; if (hp != null && hs.DynamicHelpEnabled) { hp.HelpNamespace = hs.DefaultHelp; } }
public virtual void OnSiteChanged() { HelpProvider hp = this.Site.GetService(typeof(HelpProvider)) as HelpProvider; HelpService hs = this.Site.GetService(typeof(HelpService)) as HelpService; if (hp != null && hs.DynamicHelpEnabled) { hp.HelpNamespace = hs.FindHelp; } this.SuspendLayout(); _settings = (Settings)this.Site.GetService(typeof(Settings)); SetCheckBoxValue(this.checkBoxXPath, "SearchXPath"); SetCheckBoxValue(this.checkBoxWholeWord, "SearchWholeWord"); SetCheckBoxValue(this.checkBoxRegex, "SearchRegex"); SetCheckBoxValue(this.checkBoxMatchCase, "SearchMatchCase"); _recentFindStrings.SetValues(this._settings["RecentFindStrings"] as string[]); _recentReplaceStrings.SetValues(this._settings["RecentReplaceStrings"] as string[]); Size s = this.ClientSize; object o = this._settings["FindMode"]; if (o != null) { this._findOnly = (bool)o; SetFindModeControls(!this._findOnly); } object size = this._settings["SearchSize"]; if (size != null && (Size)size != Size.Empty) { Size cs = (Size)size; s = new Size(cs.Width, cs.Height); } this.ClientSize = s; object location = this._settings["SearchWindowLocation"]; if (location != null && (Point)location != Point.Empty) { Control ctrl = this.Site as Control; if (ctrl != null) { Rectangle ownerBounds = ctrl.TopLevelControl.Bounds; if (IsSameScreen((Point)location, ownerBounds)) { this.Location = (Point)location; } else { this.Location = CenterPosition(ownerBounds); } this.StartPosition = FormStartPosition.Manual; } } this.ResumeLayout(); }