diff --git a/azure_m/azure_m/azure_m.Android/Resources/Resource.designer.cs b/azure_m/azure_m/azure_m.Android/Resources/Resource.designer.cs index 2ce0df59cf55dc3469660f1b4a1e8699c5e39ec7..a8fbecc459fc4934269ffcce5c99fde4fdf60b81 100644 --- a/azure_m/azure_m/azure_m.Android/Resources/Resource.designer.cs +++ b/azure_m/azure_m/azure_m.Android/Resources/Resource.designer.cs @@ -14,7 +14,7 @@ namespace azure_m.Droid { - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "12.2.0.155")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "12.3.3.31")] public partial class Resource { diff --git a/azure_m/azure_m/azure_m/App.xaml.cs b/azure_m/azure_m/azure_m/App.xaml.cs index 488e78d75dc7d56513e643c45c735486799140d3..dfc29244650cb7c468e407457e27be9661aa332e 100644 --- a/azure_m/azure_m/azure_m/App.xaml.cs +++ b/azure_m/azure_m/azure_m/App.xaml.cs @@ -32,7 +32,7 @@ namespace azure_m private void App_LoginComplete(object sender,EventArgs e) { - + MainPage=new AppShell(); } diff --git a/azure_m/azure_m/azure_m/Models/RequestModels/Subscriptions.cs b/azure_m/azure_m/azure_m/Models/RequestModels/Subscriptions.cs new file mode 100644 index 0000000000000000000000000000000000000000..8ab75e9f42aad5f518d170684f9c3e6fe9e0d7c4 --- /dev/null +++ b/azure_m/azure_m/azure_m/Models/RequestModels/Subscriptions.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace azure_m.Models.RequestModels +{ + namespace SubscriptionsOperations + { + namespace List + { + public class ListSubscriptionsRequest : IRequest + { + + } + public class ListSubscriptionsBody + { + + } + public class ListSubscriptionsUri//api-version=2020-01-01 + { + + } + } + + } +} diff --git a/azure_m/azure_m/azure_m/Models/ResponseModels/Subscriptions.cs b/azure_m/azure_m/azure_m/Models/ResponseModels/Subscriptions.cs index e2909845b46dda9ed3d94fd0e70aff0ad8688490..df9adce9f2dad54d1b82a2865387f2fd50577eac 100644 --- a/azure_m/azure_m/azure_m/Models/ResponseModels/Subscriptions.cs +++ b/azure_m/azure_m/azure_m/Models/ResponseModels/Subscriptions.cs @@ -4,35 +4,45 @@ { public class SubscriptionsResponse { - public int count { get; set; } - - public SubscriptionId[] data { get; set; } - - /* - - public Facet[] facets; - - public string resultTruncated; - - */ + public string nextLink; + public Subscription[] value; } - public class SubscriptionId + public class Subscription { - public string id { get; set; } - - public string subscriptionId { get; set; } - - public string status { get; set; } - - /* - - public ManageGroup manageGroup; - - public string secureScore; - - */ - + public string authorizationSource; + public string displayName; + public string id; + public ManagedByTenant[] managedByTenants; + public SubscriptionState state; + public string subscriptionId; + public SubscriptionPolicies subscriptionPolicies; + public object tags; + public string tenantId; + } + public class ManagedByTenant + { + public string tenantId; + } + public class SubscriptionState + { + public string Deleted; + public string Disabled; + public string Enabled; + public string PastDue; + public string Warned; + } + public class SubscriptionPolicies + { + public string locationPlacementId; + public string quotaId; + public spendingLimit spendingLimit; + } + public class spendingLimit + { + public string CurrentPeriodOff; + public string Off; + public string On; } } } diff --git a/azure_m/azure_m/azure_m/Services/AzureQuery.cs b/azure_m/azure_m/azure_m/Services/AzureQuery.cs index 8228bee1f24f7e5d809e7719f9f893cbac2a1a2f..636e9c977c22dee3e77de1113f012565db4b8b04 100644 --- a/azure_m/azure_m/azure_m/Services/AzureQuery.cs +++ b/azure_m/azure_m/azure_m/Services/AzureQuery.cs @@ -107,8 +107,9 @@ namespace azure_m.Services query = subscriptionSql, }) .ReceiveJson(); + subscriptionId = res.value[0].subscriptionId; - subscriptionId = res.data[0].subscriptionId; + // subscriptionId = res.data[0].subscriptionId; } diff --git a/azure_m/azure_m/azure_m/ViewModels/MypageViewModel.cs b/azure_m/azure_m/azure_m/ViewModels/MypageViewModel.cs new file mode 100644 index 0000000000000000000000000000000000000000..0b6c999b2c027e0136c9d2fdd6470b7000412e5c --- /dev/null +++ b/azure_m/azure_m/azure_m/ViewModels/MypageViewModel.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace azure_m.ViewModels +{ + internal class MypageViewModel + { + } +} diff --git a/azure_m/azure_m/azure_m/ViewModels/VNDetailsViewModel.cs b/azure_m/azure_m/azure_m/ViewModels/VNDetailsViewModel.cs index 7a0174a373a59f776cef4fc2dd442532ab12ed33..34f4fddd878549bd19c4bafb95dd428fdefb91f8 100644 --- a/azure_m/azure_m/azure_m/ViewModels/VNDetailsViewModel.cs +++ b/azure_m/azure_m/azure_m/ViewModels/VNDetailsViewModel.cs @@ -8,8 +8,8 @@ using System.Threading.Tasks; using azure_m.Services; using System.Diagnostics; using System.Linq; -using azure_m.Models.RequestModels.VNReuestModels.CreateOrUpdate; -using azure_m.Models.RequestModels.NetworkInterfaceRequestModels; +using azure_m.Models.RequestModels.VN.CreateOrUpdate; +using azure_m.Models.RequestModels.NetworkInterface.CreateOrUpdate; namespace azure_m.ViewModels @@ -36,7 +36,7 @@ namespace azure_m.ViewModels public Command CreateOrUpdateVN { get; set; } - public CreateOrupdateVNRequest vn = new CreateOrupdateVNRequest(); + public CreateOrUpdateVNRequest vn = new CreateOrUpdateVNRequest(); public VNDetailsViewModel() { #if DEBUG diff --git a/azure_m/azure_m/azure_m/Views/AllServicePage.xaml b/azure_m/azure_m/azure_m/Views/AllServicePage.xaml index 2548cdc39a8d877b1bbb55cfab0262034c51dbf1..b21a442b829820eb234478422f07b4e67a7ac505 100644 --- a/azure_m/azure_m/azure_m/Views/AllServicePage.xaml +++ b/azure_m/azure_m/azure_m/Views/AllServicePage.xaml @@ -3,11 +3,6 @@ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:viewmodels="clr-namespace:azure_m.ViewModels" x:DataType="viewmodels:AllServiceViewModel" x:Class="azure_m.Views.AllServicePage" Title="所有服务"> - - - - - #96d1ff diff --git a/azure_m/azure_m/azure_m/Views/AllServicePage.xaml.cs b/azure_m/azure_m/azure_m/Views/AllServicePage.xaml.cs index c1abb813551c52eb8f2c7f95f221fbbff1a282ae..72429aa041bf0bf7118681fd152a4770072d6be3 100644 --- a/azure_m/azure_m/azure_m/Views/AllServicePage.xaml.cs +++ b/azure_m/azure_m/azure_m/Views/AllServicePage.xaml.cs @@ -21,17 +21,17 @@ namespace azure_m.Views private async void ImageButton_Clicked(object sender, EventArgs e) { - await Navigation.PushAsync(new AllResourcesPage()); + await Navigation.PushAsync(new MainPage()); } private async void ImageButton_Clicked_1(object sender, EventArgs e) { - await Navigation.PushAsync(new AllResourcesPage()); + await Navigation.PushAsync(new VirtualMachinePage()); } private async void ImageButton_Clicked_2(object sender, EventArgs e) { - await Navigation.PushAsync(new AllResourcesPage()); + await Navigation.PushAsync(new ResourceGroupPage()); } private async void ImageButton_Clicked_3(object sender, EventArgs e) @@ -51,7 +51,7 @@ namespace azure_m.Views private async void ImageButton_Clicked_6(object sender, EventArgs e) { - await Navigation.PushAsync(new AllResourcesPage()); + await Navigation.PushAsync(new SubscribePage()); } private async void ImageButton_Clicked_7(object sender, EventArgs e) diff --git a/azure_m/azure_m/azure_m/Views/LoginPage.xaml.cs b/azure_m/azure_m/azure_m/Views/LoginPage.xaml.cs index 0c1315db20408601e48538d234c9895327cad8a3..3dd416480608e93db1014d97b4991db5e31b6eb8 100644 --- a/azure_m/azure_m/azure_m/Views/LoginPage.xaml.cs +++ b/azure_m/azure_m/azure_m/Views/LoginPage.xaml.cs @@ -26,7 +26,7 @@ namespace azure_m.Views { try { - await QueryInfo.getTokenAsync(); + //await QueryInfo.getTokenAsync(); LoginComplete?.Invoke(this, EventArgs.Empty); } catch(Exception ex) diff --git a/azure_m/azure_m/azure_m/Views/MainPage.xaml.cs b/azure_m/azure_m/azure_m/Views/MainPage.xaml.cs index 3545d98e1ba4feb860725bc2c40677e49d8bcccc..2c274921dea0ce5823d918a0095041af8e4189d1 100644 --- a/azure_m/azure_m/azure_m/Views/MainPage.xaml.cs +++ b/azure_m/azure_m/azure_m/Views/MainPage.xaml.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.ComponentModel; using Xamarin.Forms; +using Xamarin.Forms.Xaml; namespace azure_m.Views { @@ -134,10 +135,11 @@ namespace azure_m.Views GetResources(0); } - public void OnMyIcon_Clicked(object sender, EventArgs e) + public async void OnMyIcon_Clicked(object sender, EventArgs e) { //this.Navigation.PushAsync(new MyPage()); - DisplayAlert("Alert", "My page", "OK"); + //DisplayAlert("Alert", "My page", "OK"); + await Navigation.PushAsync(new Mypage(),true); } public void OnSetting_Clicked(object sender, EventArgs e) @@ -149,6 +151,7 @@ namespace azure_m.Views public void OnAlert_Clicked(object sender, EventArgs e) { //this.Navigation.PushAsync(new AlertsPage()); + DisplayAlert("Alert", "AlertPage", "OK"); } diff --git a/azure_m/azure_m/azure_m/Views/Mypage.xaml b/azure_m/azure_m/azure_m/Views/Mypage.xaml new file mode 100644 index 0000000000000000000000000000000000000000..473b30b893d98cb08092b1095777d6bd43921eab --- /dev/null +++ b/azure_m/azure_m/azure_m/Views/Mypage.xaml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/azure_m/azure_m/azure_m/Views/Mypage.xaml.cs b/azure_m/azure_m/azure_m/Views/Mypage.xaml.cs new file mode 100644 index 0000000000000000000000000000000000000000..1d9c70c1f92b93e3d7af5b3a27b929af99f86a27 --- /dev/null +++ b/azure_m/azure_m/azure_m/Views/Mypage.xaml.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using Xamarin.Forms; +using Xamarin.Forms.Xaml; + +namespace azure_m.Views +{ + [XamlCompilation(XamlCompilationOptions.Compile)] + public partial class Mypage : ContentPage + { + public Mypage() + { + InitializeComponent(); + } + } +} \ No newline at end of file diff --git a/azure_m/azure_m/azure_m/azure_m.csproj b/azure_m/azure_m/azure_m/azure_m.csproj index 107e014b7296b1843b6475b56a2fdaf808411db0..ada40b09fab64c7f756f3a225977cdf6d6ea636b 100644 --- a/azure_m/azure_m/azure_m/azure_m.csproj +++ b/azure_m/azure_m/azure_m/azure_m.csproj @@ -39,6 +39,9 @@ MSBuild:UpdateDesignTimeXaml + + MSBuild:UpdateDesignTimeXaml + MSBuild:UpdateDesignTimeXaml