完善事件框架

This commit is contained in:
Mattuy
2018-12-15 17:54:19 +08:00
parent 145c242d4b
commit 0e6d1922e0
10 changed files with 124 additions and 40 deletions
+4 -3
View File
@@ -36,16 +36,17 @@ namespace StormChat
}
//登录结果处理
private void LoginDone(JObject head, User user)
private void LoginDone(ResultHead head, User user)
{
Action f = delegate ()
{
btnLogin.Enabled = true;
if (head[Strings.Error].ToString() != "")
if (head.Error != "")
{
MessageBox.Show("登录失败:" + head[Strings.Error].ToString());
MessageBox.Show("登录失败:" + head.Error);
return;
}
User.Me = user;
_mainForm.Opacity = 1;
_mainForm.Show();
this.Close();
+1 -2
View File
@@ -44,8 +44,7 @@
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Reference Include="Newtonsoft.Json">
<HintPath>..\Interact\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />