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 6648f0ea329973503f5997e21d027e096e0032c9..af6ee1777cec61cb88ca8954b9386a56f4422489 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.4.160")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "12.3.0.26")] public partial class Resource { @@ -16739,16 +16739,19 @@ namespace azure_m.Droid public const int tooltip_frame_light = 2131165352; // aapt resource value: 0x7F0700A9 - public const int user0 = 2131165353; + public const int up4 = 2131165353; // aapt resource value: 0x7F0700AA - public const int view3 = 2131165354; + public const int user0 = 2131165354; // aapt resource value: 0x7F0700AB - public const int vm2 = 2131165355; + public const int view3 = 2131165355; // aapt resource value: 0x7F0700AC - public const int xamarin_logo = 2131165356; + public const int vm2 = 2131165356; + + // aapt resource value: 0x7F0700AD + public const int xamarin_logo = 2131165357; static Drawable() { diff --git a/azure_m/azure_m/azure_m.Android/Resources/drawable/up4.png b/azure_m/azure_m/azure_m.Android/Resources/drawable/up4.png new file mode 100644 index 0000000000000000000000000000000000000000..7ffb99ee816262318234c6dac2adb39f84682932 Binary files /dev/null and b/azure_m/azure_m/azure_m.Android/Resources/drawable/up4.png differ diff --git a/azure_m/azure_m/azure_m.Android/azure_m.Android.csproj b/azure_m/azure_m/azure_m.Android/azure_m.Android.csproj index 581cc9c8ce5625c6d4841f42193aff48b8d28d42..07da096f73ab91765db3872d9eb7ae3dcee7463a 100644 --- a/azure_m/azure_m/azure_m.Android/azure_m.Android.csproj +++ b/azure_m/azure_m/azure_m.Android/azure_m.Android.csproj @@ -170,5 +170,8 @@ + + + \ No newline at end of file diff --git a/azure_m/azure_m/azure_m/AppShell.xaml b/azure_m/azure_m/azure_m/AppShell.xaml index defe5efdcbbcd2545dedb681a1ff336f8ca091dd..72c32bf3e4dd4584d51e3df87e87eac636a57a98 100644 --- a/azure_m/azure_m/azure_m/AppShell.xaml +++ b/azure_m/azure_m/azure_m/AppShell.xaml @@ -4,9 +4,63 @@ xmlns:local="clr-namespace:azure_m.Views" xmlns:azure_m="clr-namespace:azure_m" x:DataType="azure_m:AppShell" Title="Azure" Shell.NavBarHasShadow="True" + x:Class="azure_m.AppShell" > + + + + + - - - - + + + + + + + + + diff --git a/azure_m/azure_m/azure_m/AppShell.xaml.cs b/azure_m/azure_m/azure_m/AppShell.xaml.cs index 4bad98c3e9619d45afc6ad9356d42ebc589efa45..50872d0493b8b9b9cbb801ba13ee03a2b4f02c09 100644 --- a/azure_m/azure_m/azure_m/AppShell.xaml.cs +++ b/azure_m/azure_m/azure_m/AppShell.xaml.cs @@ -8,6 +8,7 @@ namespace azure_m { public partial class AppShell : Xamarin.Forms.Shell { + public AppShell() { InitializeComponent(); @@ -15,11 +16,7 @@ namespace azure_m Routing.RegisterRoute(nameof(NewItemPage), typeof(NewItemPage)); Routing.RegisterRoute(nameof(VirtualNetworkPage), typeof(VirtualNetworkPage)); Routing.RegisterRoute(nameof(MonitorPage), typeof(MonitorPage)); - } - - private async void OnMenuItemClicked(object sender, EventArgs e) - { - await Shell.Current.GoToAsync("//LoginPage"); + this.CurrentItem = Home; } private void onMenuBtn_Clicked(object sender, EventArgs e) @@ -29,5 +26,12 @@ namespace azure_m } + private void StarFlyoutItem_Clicked(object sender, EventArgs e) + { + StarItems.IsVisible = !StarItems.IsVisible; + StarItems.IsEnabled = !StarItems.IsEnabled; + ///HACK: 通过数据绑定控制这里的ImageSource + StarFlyoutItem.IconImageSource = StarFlyoutItem.IconImageSource.ToString().Equals("File: up4.png") ? "down4.png" : "up4.png"; + } } } diff --git a/azure_m/azure_m/azure_m/Models/Resources.cs b/azure_m/azure_m/azure_m/Models/Resources.cs index a54b1c4070fc1c18ff8c277b2c9afa9e64e4879d..9b2e267341a9267f94a38042f6e2e6b74464555a 100644 --- a/azure_m/azure_m/azure_m/Models/Resources.cs +++ b/azure_m/azure_m/azure_m/Models/Resources.cs @@ -24,7 +24,23 @@ namespace azure_m.Models public string Kind { get; set; } public string Location { get; set; } public string ManagedBy { get; set; } + public string Name { get; set; } //public object Properties { get; set; } //public string provisioningState { get; set; } + + public Resource() + { + + } + + public Resource(string changeTime, string createdTime, string kind, string location, string managedBy, string name) + { + ChangeTime = changeTime; + CreatedTime = createdTime; + Kind = kind; + Location = location; + ManagedBy = managedBy; + Name = name; + } } } diff --git a/azure_m/azure_m/azure_m/Views/MainPage.xaml b/azure_m/azure_m/azure_m/Views/MainPage.xaml index 09dd92d996b2778115cc60b08571f55557c90f46..d6944bfd2a7deeecb600cbfd338e187d01209795 100644 --- a/azure_m/azure_m/azure_m/Views/MainPage.xaml +++ b/azure_m/azure_m/azure_m/Views/MainPage.xaml @@ -87,16 +87,15 @@