Skip to content
This repository has been archived by the owner on Oct 9, 2020. It is now read-only.

Commit

Permalink
优化逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
MonoLogueChi committed Feb 26, 2018
1 parent 4885664 commit b533dac
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions Drcom/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,13 @@ private void LoginNet(object sender, RoutedEventArgs e)
if (GetIp.IsChecked == true)
{
TextIp.Text = CsuNet.LoginIP();
nip = TextIp.Text;
}
//保存IP,账号和密码
Setting.UpdateSetting("nip", nip);
if (TextIp.Text != null & TextIp.Text != "")
{
Setting.UpdateSetting("nip", nip);
}
if (SaveUid.IsChecked == true)
{
Setting.UpdateSetting("uid", uid);
Expand All @@ -71,12 +75,6 @@ private void LoginNet(object sender, RoutedEventArgs e)
//注销按钮
private void LogoutNet(object sender, RoutedEventArgs e)
{
//获取登陆IP
if (GetIp.IsChecked == true)
{
TextIp.Text = CsuNet.LoginIP();
}

string nip = TextIp.Text;

var relust = CsuNet.LogoutCsuNet(nip);
Expand Down

0 comments on commit b533dac

Please sign in to comment.