void ChangeUserPassword() { string user = ""; string pswd = ""; if (deviceParams != null) { user = deviceParams.GetValue <string>("user1_name"); pswd = deviceParams.GetValue <string>("user1_pwd"); } LogonPage login = new LogonPage() { Title = StringResources.LogonPromptCameraAccount, SignOnButtonCaption = StringResources.LogonUpdateCameraButton, UserName = user, Password = pswd }; if (DataStore.Instance.Cameras.Count > 1) { login.CheckboxVisibility = Windows.UI.Xaml.Visibility.Visible; login.CheckBoxAllCaption = StringResources.LogonUpdateCameraCheckbox; } login.Flyout(new Action(async() => { if (!login.Cancelled && user != login.UserName || pswd != login.Password) { await ChangeUserNamePassword(login.UserName, login.Password, login.CheckBoxAllIsChecked); } })); }
private void OnItemClick(object sender, ItemClickEventArgs e) { var info = e.ClickedItem as CameraInfo; if (info == noCamera) { return; } if (info.Unauthorized) { LogonPage login = new LogonPage() { UserName = info.UserName, Password = info.Password }; if (store.Cameras.Count > 1) { login.CheckboxVisibility = Windows.UI.Xaml.Visibility.Visible; } login.Flyout(new Action(() => { if (!login.Cancelled) { info.UserName = login.UserName; info.Password = login.Password; if (login.CheckBoxAllIsChecked) { PropagateLogonToAllCameras(info); } info.StaticError = "Logging in..."; Save(); } })); } else { this.Frame.Navigate(typeof(FoscamDetailsPage), info); } }