Beispiel #1
0
        private async void ChangeBackground(object sender, RoutedEventArgs e)
        {
            MenuFlyoutItem item = sender as MenuFlyoutItem;

            string[] Argv = item.Tag.ToString().Split(',');

            if (Argv[0] == "Preset")
            {
                bool No = true;

                StringResources stx = StringResources.Load("Message", "ContextMenu");

                MessageDialog MsgBox = new MessageDialog(stx.Str("BInfoView_PresetBg_Mesg"), stx.Text("PresetBackground", "ContextMenu"));
                MsgBox.Commands.Add(new UICommand(stx.Str("Yes"), x => { No = false; }));
                MsgBox.Commands.Add(new UICommand(stx.Str("No")));

                await Popups.ShowDialog(MsgBox);

                if (No)
                {
                    return;
                }
            }

            InfoBgContext.SetBackground(Argv[0]);
        }
Beispiel #2
0
 private void BgChoice_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (e.AddedItems.Count < 1)
     {
         return;
     }
     RBgContext.SetBackground((( ComboBoxItem )e.AddedItems.First()).Tag.ToString());
 }