static async void Delete(int index) { Mission m = lm[index]; lm.RemoveAt(index); StorageFolder ss = await rsf.CreateFolderAsync(m.vid, CreationCollisionOption.OpenIfExists); await ss.DeleteAsync(StorageDeleteOption.PermanentDelete);//default == recyle bin dv.Refresh(); }
public static void Create(Canvas p, Thickness m) { Setting.GetRootFolder((r) => rsf = r); parent = p; black = new Button(); p.Children.Add(black); black.Content = "进入全黑,双击点亮,打开节电模式,关闭金刚键"; black.Click += (o, e) => { if (display == null) { display = new DisplayRequest(); } display.RequestActive(); bor.Visibility = Visibility.Visible; #if phone ApplicationView.GetForCurrentView().TryEnterFullScreenMode(); #endif }; black.Margin = m; m.Top += 30; detail = Component.CreateTextBlockNext(); detail.Foreground = Component.font_brush; detail.TextWrapping = TextWrapping.Wrap; detail.Margin = m; detail.Width = m.Right - m.Left; detail.Height = 70; p.Children.Add(detail); dv = new DownView(); dv.Play = Play; dv.Delete = Delete; dv.SetParent(p); m.Top += 70; dv.Resize(m); dv.data = lm; dv.Refresh(); dv.ShowBorder(); Show = (s) => { detail.Text = s; dv.Refresh(); }; CreatBlack(); }