Beispiel #1
0
		private void WatchPropertyOfButton(PanelButton button)
		{
			//for now, only handles Boolean properties
			BoolPropertyChoice choice = button.Tag as XCore.BoolPropertyChoice;
			if (choice != null)
				m_propertiesToWatch.Add(choice.BoolPropertyName, button);
		}
Beispiel #2
0
        protected void  AddHotlink(XCore.ChoiceBase choice)
        {
            PanelButton button = new PanelButton(choice, m_smallImages);

            m_panelMain.Controls.Add(button);
            button.Dock = DockStyle.Right;

            WatchPropertyOfButton(button);
        }
Beispiel #3
0
		protected  void  AddHotlink(XCore.ChoiceBase choice)
		{
			PanelButton button = new PanelButton(choice, m_smallImages);

			m_panelMain.Controls.Add(button);
			button.Dock=DockStyle.Right;

			WatchPropertyOfButton(button);
		}
Beispiel #4
0
        private void WatchPropertyOfButton(PanelButton button)
        {
            //for now, only handles Boolean properties
            BoolPropertyChoice choice = button.Tag as XCore.BoolPropertyChoice;

            if (choice != null)
            {
                m_propertiesToWatch.Add(choice.BoolPropertyName, button);
            }
        }
Beispiel #5
0
 /// <summary>
 ///
 /// </summary>
 public void RefreshPane()
 {
     foreach (Control c in m_panelMain.Controls)
     {
         PanelButton b = c as PanelButton;
         if (b != null)
         {
             b.UpdateDisplay();
         }
     }
 }
Beispiel #6
0
 /// <summary>
 /// XCore will call us whenever a property has changed.
 /// </summary>
 /// <param name="name"></param>
 public void OnPropertyChanged(string name)
 {
     //decide if something we are showing is affected by this property
     //foreach(PanelButton panel in m_propertiesToWatch)
     foreach (DictionaryEntry e in m_propertiesToWatch)
     {
         PanelButton panel = e.Value as PanelButton;
         if (panel.IsRelatedProperty(name))
         {
             panel.UpdateDisplay();
         }
     }
 }