Exemplo n.º 1
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            cApp = (CApp)e.Parameter;

            Wide310x150_TextBox.Text   = cApp.GetWide310x150(false).OriginalString;
            Square150x150_TextBox.Text = cApp.GetSquare150x150(false).OriginalString;
            LargeTile_TextBox.Text     = cApp.GetSquare310x310(false).OriginalString;
            Square44x44_TextBox.Text   = cApp.GetSquare44x44(false).OriginalString;
            SmallTile_TextBox.Text     = cApp.GetSquare71x71(false).OriginalString;
        }
        private async void Delete(object sender, RoutedEventArgs e)
        {
            string name = ((StackPanel)((Button)sender).Parent).Name;


            if (!CStart.cApps.FindByName(name).firstPartyApp)
            {
                CApp app = arrayOfCApps.FindByName(name);

                await(await StorageFile.GetFileFromApplicationUriAsync(app.GetWide310x150(false))).DeleteAsync();
                await(await StorageFile.GetFileFromApplicationUriAsync(app.GetSquare150x150(false))).DeleteAsync();
                await(await StorageFile.GetFileFromApplicationUriAsync(app.GetSquare310x310(false))).DeleteAsync();
                await(await StorageFile.GetFileFromApplicationUriAsync(app.GetSquare44x44(false))).DeleteAsync();
                await(await StorageFile.GetFileFromApplicationUriAsync(app.GetSquare71x71(false))).DeleteAsync();

                CStart.RemoveCustomApps(app);
            }

            else
            {
                Debug.WriteLine($"!>> Edit: {name} is firstPartyApp");
            }
        }