public UCOptimize(Tasks.Tasks tasks) { this.tasks = tasks; InitializeComponent(); if (ucParent == null) { ucParent = new UserControls.UCParent(new UserControls.degNext(Next), new UserControls.degBack(Back), new UserControls.degCancel(Cancel), new UserControls.degSelectionModeChanged(SelectionModeChanged), tasks.userOptions.userOptionsOptimize); ucSelectSource = new UserControls.UCSelectSource(tasks, (UserInterface.UserInterfaceBase)tasks.userOptions.userOptionsOptimize); ucDataCollecting = new UserControls.UCDataCollecting(); ucOptimizeRenameOptions = new UserControls.UCOptimizeRenameOptions(tasks); ucOptimizeGroupOptions = new UserControls.UCOptimizeGroupOptions(); ucOptimizeSelectGrouping = new UserControls.UCOptimizeSelectGrouping(tasks); ucTaskViewParent = new UserControls.UCTaskViewParent(tasks, tasks.userOptions.userOptionsOptimize, tasks.taskPlannerOptimize, UserControls.TaskViewParentType.Source, tasks.playlistUpdatesOptimize); InitializeComponent(); //Initialize start panel ParentPanel.Children.Add(ucParent); ucParent.parentPanelExpert.Children.Add(ucSelectSource); ucParent.parentPanelExpert.Children.Add(ucDataCollecting); ucParent.parentPanelExpert.Children.Add(ucOptimizeRenameOptions); ucParent.parentPanelExpert.Children.Add(ucOptimizeGroupOptions); ucParent.parentPanelExpert.Children.Add(ucOptimizeSelectGrouping); ucParent.parentPanelExpert.Children.Add(ucTaskViewParent); Reset(); } }
public UCMain(MainWindow mainWindow, Tasks.Tasks tasks, UCMirrorFolders ucMirrorFolders, UCRemoveDuplicates ucRemoveDuplicates, UCOptimize ucOptimize) { this.ucMirrorFolders = ucMirrorFolders; this.ucRemoveDuplicates = ucRemoveDuplicates; this.ucOptimize = ucOptimize; this.mainWindow = mainWindow; this.tasks = tasks; InitializeComponent(); }
public UCMirrorFolders(Tasks.Tasks tasks) : base(tasks) { userInterfaceBase = tasks.userOptions.userOptionsMirror; InitializeComponent(); taskExecute = new TasksExecution.TaskExecute(tasks.fileLists, (UserInterface.UserInterfaceBase)tasks.userOptions.userOptionsMirror, tasks.playlistUpdatesMirror.playlistUpdatesModel); if (ucParent == null) { ucParent = new UserControls.UCParent(new UserControls.degNext(Next), new UserControls.degBack(Back), new UserControls.degCancel(Cancel), new UserControls.degSelectionModeChanged(SelectionModeChanged), tasks.userOptions.userOptionsMirror); // ________Expert ucSelectSource = new UserControls.UCSelectSource(tasks, (UserInterface.UserInterfaceBase)tasks.userOptions.userOptionsMirror); ucGenerateHashes = new UserControls.UCGenerateHashes(tasks, (UserInterface.UserInterfaceBase)tasks.userOptions.userOptionsMirror); ucMirrorUserOptions = new UserControls.UCMirrorUserOptions(tasks, tasks.userOptions.userOptionsMirror); ucTaskViewMirrorParent = new UserControls.UCTaskViewMirrorParent(tasks); ucTaskExecute = new UserControls.UCTaskExecute((UserInterface.UserInterfaceBase)tasks.userOptions.userOptionsMirror); //Initialize start panel ParentPanel.Children.Add(ucParent); ucParent.parentPanelExpert.Children.Add(ucSelectSource); ucParent.parentPanelExpert.Children.Add(ucGenerateHashes); ucParent.parentPanelExpert.Children.Add(ucMirrorUserOptions); ucParent.parentPanelExpert.Children.Add(ucTaskViewMirrorParent); ucParent.parentPanelExpert.Children.Add(ucTaskExecute); // ____________Easy mode ucSelectSourceEasy = new UserControls.UCSelectSource(tasks, (UserInterface.UserInterfaceBase)tasks.userOptions.userOptionsMirror); ucGenerateHashesEasy = new UserControls.UCGenerateHashes(tasks, (UserInterface.UserInterfaceBase)tasks.userOptions.userOptionsMirror); ucMirrorUserOptionsEasy = new UserControls.UCMirrorUserOptionsEasy(tasks, tasks.userOptions.userOptionsMirror); ucTaskViewMirrorParentEasy = new UserControls.UCTaskViewMirrorParent(tasks); ucTaskExecuteEasy = new UserControls.UCTaskExecute((UserInterface.UserInterfaceBase)tasks.userOptions.userOptionsMirror); ucParent.parentPanelEasy.Children.Add(ucSelectSourceEasy); ucParent.parentPanelEasy.Children.Add(ucGenerateHashesEasy); ucParent.parentPanelEasy.Children.Add(ucMirrorUserOptionsEasy); ucParent.parentPanelEasy.Children.Add(ucTaskViewMirrorParentEasy); ucParent.parentPanelEasy.Children.Add(ucTaskExecuteEasy); //Reset(); // On Main Window Call } }
public UCRemoveDuplicates(Tasks.Tasks tasks) : base(tasks) { userInterfaceBase = tasks.userOptions.userOptionsRemoveDuplicates; taskExecute = new TasksExecution.TaskExecute(tasks.fileLists, (UserInterface.UserInterfaceBase)tasks.userOptions.userOptionsRemoveDuplicates, tasks.playlistUpdatesRemoveDuplicates.playlistUpdatesModel); if (ucParent == null) { ucParent = new UserControls.UCParent(new UserControls.degNext(Next), new UserControls.degBack(Back), new UserControls.degCancel(Cancel), new UserControls.degSelectionModeChanged(SelectionModeChanged), tasks.userOptions.userOptionsRemoveDuplicates); // Expert mode ucSelectSource = new UserControls.UCSelectSource(tasks, (UserInterface.UserInterfaceBase)tasks.userOptions.userOptionsRemoveDuplicates); ucGenerateHashes = new UserControls.UCGenerateHashes(tasks, (UserInterface.UserInterfaceBase)tasks.userOptions.userOptionsRemoveDuplicates); ucRDUserOptions = new UserControls.UCRemoveDuplicatesUserOptions(tasks); ucTaskViewParent = new UserControls.UCTaskViewParent(tasks, tasks.userOptions.userOptionsRemoveDuplicates, tasks.taskPlannerRemoveDuplicates, UserControls.TaskViewParentType.Source, tasks.playlistUpdatesRemoveDuplicates); ucTaskExecute = new UserControls.UCTaskExecute(tasks.userOptions.userOptionsRemoveDuplicates); InitializeComponent(); //Initialize start panel ParentPanel.Children.Add(ucParent); ucParent.parentPanelExpert.Children.Add(ucSelectSource); ucParent.parentPanelExpert.Children.Add(ucGenerateHashes); ucParent.parentPanelExpert.Children.Add(ucRDUserOptions); ucParent.parentPanelExpert.Children.Add(ucTaskViewParent); ucParent.parentPanelExpert.Children.Add(ucTaskExecute); // Easy mode ucSelectSourceEasy = new UserControls.UCSelectSource(tasks, (UserInterface.UserInterfaceBase)tasks.userOptions.userOptionsRemoveDuplicates); ucGenerateHashesEasy = new UserControls.UCGenerateHashes(tasks, (UserInterface.UserInterfaceBase)tasks.userOptions.userOptionsRemoveDuplicates); ucRDUserOptionsEasy = new UserControls.UCRemoveDuplicatesUserOptions(tasks); ucTaskViewParentEasy = new UserControls.UCTaskViewParent(tasks, tasks.userOptions.userOptionsRemoveDuplicates, tasks.taskPlannerRemoveDuplicates, UserControls.TaskViewParentType.Source, tasks.playlistUpdatesRemoveDuplicates); ucTaskExecuteEasy = new UserControls.UCTaskExecute(tasks.userOptions.userOptionsRemoveDuplicates); ucParent.parentPanelEasy.Children.Add(ucSelectSourceEasy); ucParent.parentPanelEasy.Children.Add(ucGenerateHashesEasy); ucParent.parentPanelEasy.Children.Add(ucRDUserOptionsEasy); ucParent.parentPanelEasy.Children.Add(ucTaskViewParentEasy); ucParent.parentPanelEasy.Children.Add(ucTaskExecuteEasy); //Reset(); // On Main Window Call } }
public UCFeatures_BaseClass(Tasks.Tasks tasks) { this.tasks = tasks; lastSelectedMode = UserControls.enSelectedMode.Easy; // UserControls.enSelectedMode.None; // Problems with window closing }
public MainWindow() { WLicense wLicense = new WLicense(); //wLicense.Owner = this; if (wLicense.ShowDialog() == true) { // Lizenz zuerst zeigen aus Sicherheitsgründen tasks = new Tasks.Tasks(this); InitializeComponent(); bLoadProfileEnabled = true; //ToolTipService ShowDuration changing global ToolTipService.ShowDurationProperty.OverrideMetadata( typeof(DependencyObject), new FrameworkPropertyMetadata(120000)); ucMirrorFolders = new UCMirrorFolders(tasks); ucRemoveDuplicates = new UCRemoveDuplicates(tasks); ucOptimize = new UCOptimize(tasks); //String appdir = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetAssembly(typeof(MainWindow)).CodeBase); //appdir = appdir.Replace("file:\\", ""); //String path = appdir + "\\" + "default" + ".RMDPProf"; String path = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); if (System.IO.Directory.Exists(path + "\\RoMoRDuP\\") == false) { if (System.IO.Directory.CreateDirectory(path + "\\RoMoRDuP\\") == null) { MessageBox.Show("Cannot create Directory " + path + "\\RoMoRDuP\\"); return; } } path = path + "\\RoMoRDuP\\" + "default" + ".RMDPProf"; tasks.userOptions.profiles.LoadProfile(path); ucMain = new UCMain(this, tasks, ucMirrorFolders, ucRemoveDuplicates, ucOptimize); ParentPanel.Children.Add(ucMain); ParentPanel.Children.Add(ucMirrorFolders); ParentPanel.Children.Add(ucRemoveDuplicates); ParentPanel.Children.Add(ucOptimize); ShowMain(); Closing += this.OnWindowClosing; // This line should fix window closing Issues this.Closed += (sender, e) => this.Dispatcher.InvokeShutdown(); } else { Application.Current.Shutdown(); } }