GetBoolProperty() public method

Gets the boolean value of property in the best settings group (trying local first then global) and creates the (global) property with the default value if it doesn't exist yet.
public GetBoolProperty ( string name, bool defaultValue ) : bool
name string
defaultValue bool
return bool
Example #1
0
        /// 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());
                }
            }
        }
Example #2
0
        /// 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;
            }
        }
Example #3
0
        /// <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);
        }