コード例 #1
0
        private static void PinToStart(object sender, ListBox list)
        {
            ListBoxItem contextMenuListItem = list.ItemContainerGenerator.ContainerFromItem((sender as MenuItem).DataContext) as ListBoxItem;
            ROMDBEntry  re = contextMenuListItem.DataContext as ROMDBEntry;

            try
            {
                FileHandler.CreateROMTile(re);
            }
            catch (InvalidOperationException)
            {
                MessageBox.Show(AppResources.MaximumTilesPinned);
            }
        }
コード例 #2
0
 private void pinBlock_Tap(object sender, System.Windows.Input.GestureEventArgs e)
 {
     if (!App.IsTrial)
     {
         try
         {
             FileHandler.CreateROMTile(this.entry);
         }
         catch (InvalidOperationException)
         {
             MessageBox.Show(AppResources.MaximumTilesPinned);
         }
     }
     else
     {
         ShowBuyDialog();
     }
 }