Skip to content

Commit

Permalink
[A]更改LoginPage名称
Browse files Browse the repository at this point in the history
  • Loading branch information
yang-er committed Sep 11, 2018
1 parent 99f39ce commit 465f0e9
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion HandSchool/HandSchool.UWP/Views/LoginDialog.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Title="登录教务系统"
Title="{x:Bind ViewModel.Title}"
PrimaryButtonText="登录"
Closing="ContentDialog_Closing"
PrimaryButtonClick="ContentDialog_PrimaryButtonClick"
Expand Down
1 change: 1 addition & 0 deletions HandSchool/HandSchool/Blank/School.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class BlankSchool : NotifyPropertyChanged, ISchoolSystem

private string feedUrl = "";
private string weatherLoc = "长春";
public string FormName => "";

public BlankSchool()
{
Expand Down
1 change: 1 addition & 0 deletions HandSchool/HandSchool/JLU/SchoolCard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class SchoolCard : NotifyPropertyChanged, ILoginField
public byte[] CaptchaSource { get; set; }

public string Tips => "校园卡查询密码默认为身份证最后六位数字。";
public string FormName => "校园卡服务中心";
public bool NeedLogin => !_islogin;
public bool IsLogin { get => _islogin; private set => SetProperty(ref _islogin, value); }
public bool AutoLogin { get => _autologin; set => SetProperty(ref _autologin, value); }
Expand Down
8 changes: 5 additions & 3 deletions HandSchool/HandSchool/JLU/UIMS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ class UIMS : NotifyPropertyChanged, ISchoolSystem
public string Username { get; set; }
public string Password { get; set; }
public bool NeedLogin { get; private set; }
public bool Confrimed { get; set; } = false;


[Settings("提示", "保存使设置永久生效,部分设置重启后生效。", -233)]
public string Tips => "用户名为教学号,新生默认密码为身份证后六位(x小写)。";

[Settings("访问选择", "如果您觉得当前网络访问UIMS较慢,可以将服务器地址设置为10.60.65.8并开启SSL连接。", -233)]
public string FormName => "UIMS教务管理系统";

private string proxy_server;
[Settings("服务器", "通过此域名访问UIMS,但具体路径地址不变。")]
public string ProxyServer
Expand Down Expand Up @@ -281,7 +283,7 @@ public async Task<bool> PrepareLogin()
class SettingsJSON
{
public string ProxyServer { get; set; } = "uims.jlu.edu.cn";
public bool UseHttps { get; set; } = false;
public bool UseHttps { get; set; } = true;
}
}
}
5 changes: 5 additions & 0 deletions HandSchool/HandSchool/Models/LoginField.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ public interface ILoginField : INotifyPropertyChanged
/// </summary>
bool NeedLogin { get; }

/// <summary>
/// 表单的名称
/// </summary>
string FormName { get; }

/// <summary>
/// 登录函数
/// </summary>
Expand Down
1 change: 1 addition & 0 deletions HandSchool/HandSchool/ViewModels/LoginViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public class LoginViewModel : BaseViewModel
private LoginViewModel(ILoginField form)
{
Form = form;
Title = "登录" + form.FormName;
}

public static async Task<bool> RequestAsync(ILoginField form)
Expand Down
2 changes: 1 addition & 1 deletion HandSchool/HandSchool/Views/LoginPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="HandSchool.Views.LoginPage"
xmlns:w="clr-namespace:HandSchool.Views"
Title="登录教务系统">
Title="{Binding Title}">
<ContentPage.ToolbarItems>
<ToolbarItem Text="登录" Command="{Binding LoginCommand}" />
</ContentPage.ToolbarItems>
Expand Down

0 comments on commit 465f0e9

Please sign in to comment.