private void signinButton_Click(object sender, EventArgs e) { vrcUser.ID = iDTextBox.Text; vrcUser.Password = passwordTextBox.Text; signinButton.Enabled = false; try { userFriendList = new VRCWebAPI.UserFriendList(vrcUser.ID, vrcUser.Password); NotoIto.Utility.ClassSerializer.WriteXML <Config.VRCUserModel>(vrcUser, Path.Combine(vrcLog.FolderPath, "VRCUser.xml")); signinedPanel.Visible = true; } catch { loginErrorLabel.Visible = true; signinButton.Enabled = true; } }
public Configurator() { InitializeComponent(); NotoIto.Utility.ClassSerializer.ReadXML <Config.VRCUserModel>(Path.Combine(vrcLog.FolderPath, "VRCUser.xml")).Match( (x) => { try { userFriendList = new VRCWebAPI.UserFriendList(x.ID, x.Password); vrcUser = x; signinedPanel.Visible = true; } catch { vrcUser = new Config.VRCUserModel(); } }, () => vrcUser = new Config.VRCUserModel()); VRCLogParser.OnPlayerJoined += OnPlayerJoined; VRCLogParser.OnFriendRequestReceived += OnFriendRequestReceived; }