public void TabControlChangeSelectedIndex(int index)
 {
     tabControl.SelectedIndex = index;
     ucParentSource.TabControlChangeSelectedIndex(index);
     ucParentTarget.TabControlChangeSelectedIndex(index);
 }
Beispiel #2
0
        public void Next() // UCParent Next
        {
            SaveMode(CurrentUC);

            if (selectedMode == UserControls.enSelectedMode.Easy)
            {
                ApplyEasyModeChanges(CurrentUC);
            }


            enCurrentUCRemoveDuplicates oldUC = CurrentUC;

            // weiter
            if (CurrentUC < enCurrentUCRemoveDuplicates.ExecuteTasks)
            {
                if (CurrentUC == enCurrentUCRemoveDuplicates.TaskView)
                {
                    //if (MessageBox.Show("Do you really want to proceed and execute the tasks?", "Proceed?", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
                    WMBExecuteTasks mbExecuteTasks = new WMBExecuteTasks(userInterfaceBase.messageBoxUI);
                    mbExecuteTasks.Owner = userInterfaceBase.mainWindow;

                    if ((bool)mbExecuteTasks.ShowDialog())
                    {
                        CurrentUC++;
                    }
                }
                else if ((enCurrentUCRemoveDuplicates)((short)CurrentUC) == enCurrentUCRemoveDuplicates.HashCodes)
                {
                    if (userInterfaceBase.ProcessCurrentSize == userInterfaceBase.ProcessTargetSize) // nur weiter wenn fertig
                    {
                        CurrentUC++;
                    }
                }
                else if ((enCurrentUCRemoveDuplicates)((short)CurrentUC) == enCurrentUCRemoveDuplicates.SelectSource)
                {
                    if (System.IO.Directory.Exists(userInterfaceBase.strSelectSourcePath))
                    {
                        CurrentUC++;
                    }
                    else
                    {
                        MessageBox.Show("SelectSource: SourcePath does not Exist!");
                    }
                }
                else
                {
                    CurrentUC++;
                }
            }


            // Actions
            if ((CurrentUC == enCurrentUCRemoveDuplicates.HashCodes) && (oldUC != enCurrentUCRemoveDuplicates.HashCodes))
            {
                tasks.taskPlannerRemoveDuplicates.CreateFileTree();
                //tasks.playlistUpdatesRemoveDuplicates.SearchForPlaylists();
            }

            if ((CurrentUC == enCurrentUCRemoveDuplicates.UserOptions) && (oldUC != enCurrentUCRemoveDuplicates.UserOptions))
            {
                tasks.taskPlannerRemoveDuplicates.CreateDuplicateInfo();
                //tasks.taskPlannerRemoveDuplicates.Create_RD_Duplicate_Groups(); // Aus TaskPlannerBase aufgerufen
            }

            if ((CurrentUC == enCurrentUCRemoveDuplicates.TaskView) && (oldUC != enCurrentUCRemoveDuplicates.TaskView))
            {
                TaskPlanner.GlobalVar.lastSelectedView = TaskPlanner.enLastSelectedView.None;

                tasks.taskPlannerRemoveDuplicates.CreateRD_Before_Actions();

                tasks.taskPlannerRemoveDuplicates.CreateAfterViews();

                if (userInterfaceBase.bExpertOptions_Visible)
                {
                    ucTaskViewParent.TabControlChangeSelectedIndex(0);
                }
                else
                {
                    ucTaskViewParentEasy.TabControlChangeSelectedIndex(0);
                }

                //ucTaskViewParent.UpdateView(); // TBD automaticly done over EditViews from TAB Event?
                //ucTaskViewParentEasy.UpdateView();
            }



            // Show new Page
            ShowCurrentUC();

            if ((CurrentUC == enCurrentUCRemoveDuplicates.ExecuteTasks) && (oldUC != enCurrentUCRemoveDuplicates.ExecuteTasks))
            {
                tasks.taskPlannerRemoveDuplicates.EditViews(TaskPlanner.GlobalVar.lastSelectedView, true, false, null, false, taskExecute, null, false, UserControls.TaskViewParentType.Source);  // UpdateAfterViews // TBD not taskplannermirror
                //tasks.playlistUpdatesRemoveDuplicates.GeneratePlaylistUpdates();
            }
        }