public void OnValueChanged(GXDLMSViewArguments arg) { if (arg.Index == 5) { GXDLMSPppSetup target = Target as GXDLMSPppSetup; UserNameTB.TextChanged -= new System.EventHandler(this.UserNameTB_TextChanged); if (target.UserName != null) { UserNameTB.Text = ASCIIEncoding.ASCII.GetString(target.UserName); } else { UserNameTB.Text = ""; } UserNameTB.TextChanged += new System.EventHandler(this.UserNameTB_TextChanged); PasswordTB.TextChanged -= new System.EventHandler(this.PasswordTB_TextChanged); if (target.Password != null) { PasswordTB.Text = ASCIIEncoding.ASCII.GetString(target.Password); } else { PasswordTB.Text = ""; } PasswordTB.TextChanged += new System.EventHandler(this.PasswordTB_TextChanged); } else { throw new IndexOutOfRangeException("index"); } }
public void OnValueChanged(int index, object value, bool user) { if (index == 5) { GXDLMSPppSetup target = Target as GXDLMSPppSetup; if (target.UserName != null) { UserNameTB.Text = ASCIIEncoding.ASCII.GetString(target.UserName); } else { UserNameTB.Text = ""; } if (target.Password != null) { PasswordTB.Text = ASCIIEncoding.ASCII.GetString(target.Password); } else { PasswordTB.Text = ""; } } else { throw new IndexOutOfRangeException("index"); } }