public Delete(ListOfFiles Data) { InitializeComponent(); data = Data; Count = Work.CountFile(data); DeleteProgress.Minimum = 0; DeleteProgress.Maximum = Count; DeleteProgress.Value = val = 0; }
public Moving(ListOfFiles Data) { InitializeComponent(); data = Data; Count = Work.CountFile(data); MoveProgress.Minimum = 0; MoveProgress.Maximum = Count; MoveProgress.Value = val = 0; ProgressFile.Minimum = 0; ProgressFile.Maximum = 100; }
public Copying(ListOfFiles Data) { InitializeComponent(); data = Data; Count = Work.CountFile(data); CopyProgress.Minimum = 0; CopyProgress.Maximum = Count; CopyProgress.Value = val = 0; progresFile.Maximum = 100; progresFile.Minimum = 0; label3.Content = "0 %"; }
/// <summary> /// /// </summary> /// <param name="data"></param> public static void View(ListOfFiles data) { ListOfType listType = ListOfType.GetInstance(); foreach (IOView item in data.files) { if (listType.TypeText().Contains(item.Type)) { } else if (listType.TypeVideo().Contains(item.Type)) { foreach (IOView files in data.files) { string tmp = data.OldPath + files.Name + "." + files.Type; VideoView vv = new VideoView(tmp); vv.Show(); } } else if (listType.TypeImage().Contains(item.Type)) { foreach(IOView files in data.files) { string tmp = data.OldPath + files.Name + "." + files.Type; ImageView iv = new ImageView(tmp); iv.Show(); } } else if (listType.TypeInet().Contains(item.Type)) { foreach (IOView files in data.files) { string tmp = data.OldPath + files.Name + "." + files.Type; InetView iv = new InetView(tmp); iv.Show(); } } } }
/// <summary> /// /// </summary> /// <param name="data"></param> public static void Delete(ListOfFiles data) { MessageBoxResult result = MessageBox.Show("Delete ?", "Delete", MessageBoxButton.YesNo, MessageBoxImage.Question); if (result == MessageBoxResult.Yes) { views.Delete delete = new views.Delete(data); delete.ShowInTaskbar = false; delete.ShowDialog(); } }
/// <summary> /// /// </summary> /// <param name="data"></param> /// <returns></returns> public static int CountFile(ListOfFiles data) { int count = 0; foreach (IOView item in data.files) { if (item.Size == "<DIR>") count += Directory.GetFiles(data.OldPath + item.Name, "*.*", SearchOption.AllDirectories).Length; else count++; } return count; }
/// <summary> /// /// </summary> /// <param name="data"></param> public static void Edit(ListOfFiles data) { ListOfType listType = ListOfType.GetInstance(); foreach (IOView item in data.files) { if (listType.TypeText().Contains(item.Type)) { string namefile = data.OldPath + item.Name + "." + item.Type; notepad np = new notepad(namefile); np.Show(); } } }
/// <summary> /// /// </summary> /// <param name="data"></param> public static void Move(ListOfFiles data) { views.Move move = new views.Move(data); move.ShowInTaskbar = false; move.ShowDialog(); }
/// <summary> /// /// </summary> /// <param name="data"></param> public static void Copy(ListOfFiles data) { views.Copy copy = new views.Copy(data); copy.ShowInTaskbar = false; copy.ShowDialog(); }
public Move(ListOfFiles Data) { InitializeComponent(); data = Data; }
public Copy(ListOfFiles Data) { InitializeComponent(); data = Data; NewName.Text = data.NewPath; }
private async void FileViewR_PreviewKeyDown(object sender, KeyEventArgs e) { System.Collections.IList items = FileViewR.SelectedItems; ListOfFiles lf = new ListOfFiles(); lf.SetFile(items); lf.OldPath = PathR.path; if (e.Key == Key.F4 && Keyboard.Modifiers == ModifierKeys.Shift) { Work.CreateFile(PathR.path); return; } else if (e.Key == Key.Delete && Keyboard.Modifiers == ModifierKeys.Shift) { Work.Delete(lf); return; } switch (e.Key) { case Key.F3: Work.View(lf); break; case Key.F4: Work.Edit(lf); break; case Key.F5: lf.NewPath = PathL.path; Work.Copy(lf); break; case Key.F6: lf.NewPath = PathL.path; Work.Move(lf); break; case Key.F7: Work.CreateDir(PathR.path); break; case Key.Enter: if (FileViewR.SelectedItem != null) { IOView a = (IOView)FileViewR.SelectedItem; PathR.path = await move(PathR, a); } break; } }