public GetBoolProperty ( string name, bool defaultValue ) : bool | ||
name | string | |
defaultValue | bool | |
return | bool |
/// summary> /// Receives the broadcast message "PropertyChanged." If it is the ShowFirstPane /// property, adjust. /// /summary> public void OnPropertyChanged(string name) { CheckDisposed(); if (m_propertyTable.GetStringProperty("ToolForAreaNamed_lexicon", null) != toolName) { return; } if (name == "ActiveClerkSelectedObject" || name == "ToolForAreaNamed_lexicon") { SetFocusInDefaultControl(); } if (name == m_propertyControllingVisibilityOfFirstPane) { bool fShowFirstPane = m_propertyTable.GetBoolProperty(m_propertyControllingVisibilityOfFirstPane, true); if (fShowFirstPane == m_showingFirstPane) { return; // just in case it didn't really change } m_showingFirstPane = fShowFirstPane; Panel1Collapsed = !fShowFirstPane; if (ShowFirstPaneChanged != null) { ShowFirstPaneChanged(this, new EventArgs()); } } }
/// summary> /// Receives the broadcast message "PropertyChanged" /// /summary> public void OnPropertyChanged(string name) { CheckDisposed(); // Debug.WriteLine("record clerk ("+this.m_vectorName + ") saw OnPropertyChanged " + name); switch (name) { case "ShowBalloonHelp": ShowAlways = m_propertyTable.GetBoolProperty(name, true); break; default: break; } }
/// <summary/> public void Init(Mediator mediator, PropertyTable propertyTable, XmlNode configurationParameters) { CheckDisposed(); m_mediator = mediator; m_propertyTable = propertyTable; mediator.AddColleague(this); m_propertyTable.SetProperty("ContextHelper", this, false); m_propertyTable.SetPropertyPersistence("ContextHelper", false); ParentControl = m_propertyTable.GetValue <Control>("window"); m_document = new XmlDocument(); //we use the directory of the file which held are parameters as the starting point //of the path we were given. string path = XmlUtils.GetMandatoryAttributeValue(configurationParameters, "contextHelpPath"); var configParamatersBasePath = FileUtils.StripFilePrefix(configurationParameters.BaseURI); path = Path.Combine(Path.GetDirectoryName(configParamatersBasePath), path); m_document.Load(path); //m_items = m_document.SelectNodes("strings/item"); ShowAlways = m_propertyTable.GetBoolProperty("ShowBalloonHelp", true); }