private void RbRightButtonDown(object sender, MouseButtonEventArgs e) { var rb = (RadioButton)sender; var userName = rb.Tag.ToString(); var udiw = new UserDataInputWindow { Title = "データ管理 -" + rb.Tag.ToString() + "-", Tag = userName, Owner = this }; this.InitializeUserDataInputWindow(userName, udiw); udiw.UserDataSaveButton.Click += this.UserDataSaveButtonClick; udiw.Show(); }
private void InitializeUserDataInputWindow(string userName, UserDataInputWindow udiw) { udiw.UserDataNameTextBox.Text = userName.Substring(0, 8); if (!this.UserData.ContainsKey(userName)) { return; } if (this.UserData[userName][this.UserDataPropertyName[0]] != string.Empty) { udiw.UserDataNameTextBox.Text = this.UserData[userName][this.UserDataPropertyName[0]]; } udiw.UserDataEmailTextBox.Text = this.UserData[userName][this.UserDataPropertyName[1]]; udiw.UserDataPassTextBox.Password = this.UserData[userName][this.UserDataPropertyName[2]]; }