private void InitializeMenu(ObserveType _type) { if (_type == ObserveType.BTTree) { InitializeMenuForBTTree(); } }
public void RemoveObserver(ObserveType type, Action <object> action) { if (m_Observers.ContainsKey(type)) { m_Observers[type].Remove(action); } }
public void AddObserver(ObserveType type, Action <object> action) { if (!m_Observers.ContainsKey(type)) { m_Observers[type] = new List <Action <object> >(); } m_Observers[type].Add(action); }
public void InvokeObservers(ObserveType type, object value) { if (m_Observers.ContainsKey(type)) { foreach (Action <object> action in m_Observers[type]) { action(value); } } }
public static string SelectResource(ObserveType _resourceType, string _defaultResourceName = "", IWin32Window _owner = null) { ResourceSelectorWindow resourceSelector = new ResourceSelectorWindow(); resourceSelector.SetType(_resourceType); resourceSelector.CanTypeModify(false); resourceSelector.UpdateList(); resourceSelector.Select(_defaultResourceName); resourceSelector.ShowDialog(_owner); if (resourceSelector.DialogResult == DialogResult.OK) { return(resourceSelector.GetSelectedString()); } else { return(""); } }
protected sealed override bool OnObserving(Request request, ObserveType observeType, int observeId) { return(true); }
/// <summary> /// Called on the observing event. /// </summary> /// <since_tizen> 3 </since_tizen> /// <param name="request">A request from client.</param> /// <param name="type">Observer type.</param> /// <param name="observeId">Observe identifier.</param> /// <returns>Returns true if it wants to be observed, else false.</returns> protected abstract bool OnObserving(Request request, ObserveType type, int observeId);
// called by user function public void SetType(ObserveType _type) { typeSelector.SelectedIndex = (int)_type; InitializeMenu(_type); }