//override public void onRecieveResult(Dictionary<String, Object> bundle) { Object senderName; Object senderValue; bundle.TryGetValue( PageDataExchange.KEY_SENDER_NAME, out senderName); bundle.TryGetValue( PageDataExchange.KEY_SENDER_VALUE, out senderValue); PageDataExchange context = PageDataExchange.getInstance(); String observerName = senderName.ToString(); if (ACTIONBAR_REGISTER.Equals(senderValue)) { mActoinbarObserver = context.getResultObserverByTag(observerName); } else if (ACTIONBAR_UNREGISTER.Equals(senderValue)) { mActoinbarObserver = null; } else if (ACTIONBAR_SETTING_SHOW.Equals(senderValue)) { this.btn_setting.Visibility = Visibility.Visible; } else if (ACTIONBAR_SETTING_HIDE.Equals(senderValue)) { this.btn_setting.Visibility = Visibility.Hidden; } //UpdateHelpState(); }
//override public void onRecieveResult(Dictionary <String, Object> bundle) { Object senderName; Object senderValue; bundle.TryGetValue(PageDataExchange.KEY_SENDER_NAME, out senderName); bundle.TryGetValue(PageDataExchange.KEY_SENDER_VALUE, out senderValue); PageDataExchange context = PageDataExchange.getInstance(); String observerName = senderName.ToString(); if (ACTIONBAR_REGISTER.Equals(senderValue)) { mActoinbarObserver = context.getResultObserverByTag(observerName); } else if (ACTIONBAR_UNREGISTER.Equals(senderValue)) { mActoinbarObserver = null; } else if (ACTIONBAR_SETTING_SHOW.Equals(senderValue)) { this.btn_setting.Visibility = Visibility.Visible; } else if (ACTIONBAR_SETTING_HIDE.Equals(senderValue)) { this.btn_setting.Visibility = Visibility.Hidden; } //UpdateHelpState(); }
public void CommandObserver(String ObserverTag, String senderKey, Object command) { Dictionary <String, Object> bundle = new Dictionary <string, object>(); bundle.Add(PageDataExchange.KEY_SENDER_NAME, senderKey); bundle.Add(PageDataExchange.KEY_SENDER_VALUE, command); IObserverResult observer = this.getResultObserverByTag(ObserverTag); if (observer != null) { observer.onRecieveResult(bundle); } }
public void NotifyObserverChanged(String ObserverName, String senderName, Object value) { Dictionary <String, Object> bundle = new Dictionary <string, object>(); bundle.Add(PageDataExchange.KEY_SENDER_NAME, senderName); bundle.Add(PageDataExchange.KEY_SENDER_VALUE, value); IObserverResult observer = this.getResultObserverByTag(ObserverName); if (observer != null) { observer.onRecieveResult(bundle); } }
private void DispatchChanges(String plcVarName) { Dictionary <String, Object> bundle = new Dictionary <string, object>(); bundle.Add(PageDataExchange.KEY_SENDER_NAME, TAG); bundle.Add(PageDataExchange.KEY_SENDER_VALUE, plcVarName); //notify observers foreach (KeyValuePair <String, IObserverResult> item in mObserverCache) { IObserverResult observer = item.Value; observer.onRecieveResult(bundle); } }
public void NotifyAllObeservers(String senderKey, Object command) { Dictionary <String, Object> bundle = new Dictionary <string, object>(); bundle.Add(PageDataExchange.KEY_SENDER_NAME, senderKey); bundle.Add(PageDataExchange.KEY_SENDER_VALUE, command); foreach (KeyValuePair <String, IObserverResult> entry in mResultObserverCache) { IObserverResult observer = entry.Value; if (observer != null) { observer.onRecieveResult(bundle); } } }
private void NotifyObservers(String info) { PageDataExchange context = PageDataExchange.getInstance(); String[] logoutObservers = new String[] { PageUserRegister.TAG, PageLogin.TAG, PageStatus.TAG }; Dictionary <String, Object> bundle = new Dictionary <string, object>(); bundle.Add(PageDataExchange.KEY_SENDER_NAME, TAG); bundle.Add(PageDataExchange.KEY_SENDER_VALUE, info); foreach (String tag in logoutObservers) { IObserverResult observer = context.getResultObserverByTag(tag); if (observer != null) { observer.onRecieveResult(bundle); } } }
private void help_MouseUp(object sender, RoutedEventArgs e) { //Utils.NavigateToPage(MainWindow.sFrameReportName, Utils.uriPagePopup); String name = ToolbarMain.BUTTON_HELP; Dictionary <String, Object> bundle = new Dictionary <string, object>(); bundle.Add(PageDataExchange.KEY_SENDER_NAME, TAG); bundle.Add(PageDataExchange.KEY_SENDER_VALUE, name); PageDataExchange context = PageDataExchange.getInstance(); String[] observerTags = new String[] { ToolTipHelper.TAG, PageParameterHelper.TAG }; foreach (String tag in observerTags) { IObserverResult tooltiphelper = context.getResultObserverByTag(tag); if (tooltiphelper != null) { tooltiphelper.onRecieveResult(bundle); } } }
public void RegisterObeserver(IObserverResult observer) { mToolControl.RegisterObeserver(observer); }
public void RegisterObeserver(IObserverResult observer) { mObserver = observer; }
public void addResultObserver(string pageTag, IObserverResult observer) { mResultObserverCache.Add(pageTag, observer); }
public void RegisterActionBarObserver(IObserverResult observer) { mActoinbarObserver = observer; }
public void RegisterObserver(String pageTag, IObserverResult observer) { mObserverCache.Add(pageTag, observer); }
public void UnregisterActionBarObserver() { mActoinbarObserver = null; }
public void RegisterObserver(String pageTag, IObserverResult observer) { mObserverCache.Add(pageTag, observer); }
public void registerObserver(IObserverResult observer) { mObserver = observer; }
public void UnregisterActionBarObserver() { mActoinbarObserver = null; }
public void RegisterActionBarObserver(IObserverResult observer) { mActoinbarObserver = observer; }
public void RegisterObeserver(IObserverResult observer) { mToolControlObserver.RegisterObeserver(observer); }
public void addResultObserver(string pageTag, IObserverResult observer) { mResultObserverCache.Add(pageTag, observer); }