You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
982 B
36 lines
982 B
using SunlightAggregationTerminal.Class;
|
|
using SunlightAggregationTerminal.Models;
|
|
using SunlightAggregationTerminal.View;
|
|
|
|
namespace SunlightAggregationTerminal
|
|
{
|
|
public partial class AppShell : Shell
|
|
{
|
|
public AppShell()
|
|
{
|
|
InitializeComponent();
|
|
this.BindingContext = new AppModels();
|
|
}
|
|
|
|
|
|
private async void Shell_Loaded(object sender, EventArgs e)
|
|
{
|
|
//打开登录
|
|
if (!App.GlobalData.LogNo)
|
|
{
|
|
var logpage = new View.LogPage();
|
|
await Navigation.PushModalAsync(new NavigationPage(logpage));
|
|
}
|
|
else
|
|
{
|
|
|
|
//发送登录请求
|
|
if (await AppModels.LogIn())
|
|
{//拒绝登陆时打开登录页面
|
|
var logpage = new View.LogPage();
|
|
await Navigation.PushModalAsync(logpage);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|