/// <summary> /// The show password on manager. /// </summary> /// <param name="password"> /// The password. /// </param> public void ShowPasswordOnManager(string password, IPEndPoint station) { string name = IdentifyingStringForStation(station); if (OverviewPage != null) { OverviewPage.Dispatcher.Invoke( System.Windows.Threading.DispatcherPriority.Normal, new Action( delegate { OverviewPage.SetPasswordLabel("Enter this password at Station " + name + ": " + password); })); } if (ManagerOverviewPage != null) { ManagerOverviewPage.Dispatcher.Invoke( System.Windows.Threading.DispatcherPriority.Normal, new Action( delegate { ManagerOverviewPage.SetPasswordLabel("Enter this password at Station " + name + ":\n" + password); })); } }
public string StationExchangingKey(IPEndPoint ip) { if (OverviewPage != null) { OverviewPage.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal, new Action(delegate { OverviewPage.SetPasswordLabel(""); })); return(OverviewPage.IncomingReply(ip)); } if (ManagerOverviewPage != null) { ManagerOverviewPage.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal, new Action(delegate { ManagerOverviewPage.SetPasswordLabel(""); })); return(ManagerOverviewPage.IncomingReply(ip)); } return(""); }