コード例 #1
0
ファイル: Login.xaml.cs プロジェクト: De-Os/Selectel-UWP
        private async void DoLogin(object btn, RoutedEventArgs args)
        {
            if (this.Token.Text.Length == 0)
            {
                return;
            }
            var client = new SelectelApi(this.Token.Text);

            try
            {
                if (!client.Servers.Dashboard.Maintenance().Status)
                {
                    var vault = new PasswordVault();
                    vault.Add(new PasswordCredential("selectel", "default", this.Token.Text));
                    this.OnSuccess?.Invoke();
                }
                else
                {
                    await new MessageDialog("Error").ShowAsync();
                }
            }
            catch (Exception)
            {
                await new MessageDialog(Utils.LocString("Login/Error")).ShowAsync();
            }
        }
コード例 #2
0
ファイル: Servers.cs プロジェクト: De-Os/Selectel-UWP
 internal PowerMethod(SelectelApi api) => this._api = api;
コード例 #3
0
ファイル: Servers.cs プロジェクト: De-Os/Selectel-UWP
 internal ResourcesMethod(SelectelApi api) => this._api = api;
コード例 #4
0
ファイル: Servers.cs プロジェクト: De-Os/Selectel-UWP
 internal ServiceMethod(SelectelApi api) => this._api = api;
コード例 #5
0
ファイル: Servers.cs プロジェクト: De-Os/Selectel-UWP
 internal DashboardMethod(SelectelApi api) => this._api = api;
コード例 #6
0
ファイル: Servers.cs プロジェクト: De-Os/Selectel-UWP
 internal BootMethod(SelectelApi api) => this._api = api;
コード例 #7
0
ファイル: Servers.cs プロジェクト: De-Os/Selectel-UWP
 internal NetworkMethod(SelectelApi api) => this._api = api;
コード例 #8
0
ファイル: Servers.cs プロジェクト: De-Os/Selectel-UWP
 internal ConsumptionMethod(SelectelApi api) => this._api = api;
コード例 #9
0
ファイル: Servers.cs プロジェクト: De-Os/Selectel-UWP
 internal LocationMethod(SelectelApi api) => this._api = api;
コード例 #10
0
ファイル: Servers.cs プロジェクト: De-Os/Selectel-UWP
 internal Servers(SelectelApi api) => this._api = api;
コード例 #11
0
ファイル: App.xaml.cs プロジェクト: De-Os/Selectel-UWP
 private void LoadMain()
 {
     App.Selectel       = new SelectelApi(new PasswordVault().Retrieve("selectel", "default").Password);
     App.Main           = new MainPage();
     App.Main.OnLogout += this.Logout;
 }
コード例 #12
0
ファイル: Billing.cs プロジェクト: De-Os/Selectel-UWP
 internal BalanceMethod(SelectelApi api) => this._api = api;
コード例 #13
0
ファイル: Billing.cs プロジェクト: De-Os/Selectel-UWP
 internal TransactionsMethod(SelectelApi api) => this._api = api;
コード例 #14
0
ファイル: Billing.cs プロジェクト: De-Os/Selectel-UWP
 internal Billing(SelectelApi api) => this._api = api;