Skip to content

Commit

Permalink
region enable/disable menu items
Browse files Browse the repository at this point in the history
  • Loading branch information
dtylman committed Feb 7, 2019
1 parent dac6572 commit 144f5c5
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion Retriever/FormProfileEditor.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
using CloudOps;
using Amazon;
using CloudOps;
using NickAc.ModernUIDoneRight.Controls;
using NickAc.ModernUIDoneRight.Forms;
using NickAc.ModernUIDoneRight.Objects;
using NickAc.ModernUIDoneRight.Objects.MenuItems;
using Retriever.Model;
using Retriever.Properties;
using System;
Expand Down Expand Up @@ -46,6 +48,14 @@ public FormProfileEditor(Profile profile, string selectedService, string selecte

appBar.Text = String.Format("Editing '{0}'", this.profile.Name);
appBar.ToolTip = new ModernToolTip();

foreach (var r in RegionEndpoint.EnumerableAllRegions)
{
AppBarMenuItem regionMenuItem = new AppBarMenuTextItem(r.SystemName);
regionMenuItem.Click += RegionMenuItem_Click;
appBar.MenuItems.Add(regionMenuItem);
}

AppAction saveProfileAction = new AppAction();
saveProfileAction.Image = Resources.Output50;
saveProfileAction.Cursor = Cursors.Hand;
Expand All @@ -65,6 +75,11 @@ public FormProfileEditor(Profile profile, string selectedService, string selecte
}
}

private void RegionMenuItem_Click(object sender, EventArgs e)
{
// (sender as AppBarMenuTextItem).Text
}

private void SaveProfileAction_Click(object sender, System.EventArgs e)
{
SaveFileDialog savefile = new SaveFileDialog();
Expand Down

0 comments on commit 144f5c5

Please sign in to comment.