/// <summary> /// Constructor /// </summary> /// <param name="parent"> the frame this dialog was shown over</param> /// <param name="ip">the ip address of the Manager</param> /// <param name="waitingForManagerPage">the Page this dialog was shown over</param> public AcceptManagerDialog(Frame parent, IPEndPoint ip, WaitingForManagerPage waitingForManagerPage) { InitializeComponent(); _parent = parent; _waitingForManagerPage = waitingForManagerPage; ManagerLabel.Content = ip.Address.ToString(); Focus(); PwTextbox.Focus(); OKButton.IsEnabled = false; Title = "Accept Manager"; }
/// <summary> /// Initializes a new instance of the <see cref="AcceptManagerDialog"/> class. /// Constructor /// </summary> /// <param name="parent"> /// the frame this dialog was shown over /// </param> /// <param name="ip"> /// the ip address of the Manager /// </param> /// <param name="waitingForManagerPage"> /// the Page this dialog was shown over /// </param> public AcceptManagerDialog(Frame parent, string name, WaitingForManagerPage waitingForManagerPage) { InitializeComponent(); _parent = parent; _waitingForManagerPage = waitingForManagerPage; ManagerLabel.Content = ManagerLabel.Content.ToString().Replace("NAME", name); Activate(); PwTextbox.Focus(); OKButton.IsEnabled = false; Title = "Accept Manager"; }