예제 #1
0
        void ManageProgramDefinitionsClicked(object sender, RoutedEventArgs e)
        {
            ManageAppllicationsWindow window = new ManageAppllicationsWindow();

            window.ShowDialog();

            // Update the file explorer context menu
            FileExplorer.SetupContextMenu();
            SetUpToolsContextMenu();

            // DONE_FIXME: Do this inside the Management window and check whether the changes are to be changed
            // FIXED: Application management dialog either doesn't touch or completely
            // overrides CApplicationSettings.Instance.
            CApplicationSettings.Instance.SaveApplicationSettings();
        }
예제 #2
0
        // Methods
        public Window1()
        {
            InitializeComponent();
            Application.Current.Exit += new ExitEventHandler(OnAppClosing);

            CLogfile.Instance.Initialise("CEWSP_log.txt");

            if (!CApplicationSettings.Instance.Init())
            {
                CApplicationSettings.Instance.Reset(false);
            }



            setRootDirButton.ToolTip    = CApplicationSettings.Instance.GetValue(ESettingsStrings.RootPath).GetValueString();
            setGamefolderButton.ToolTip = CApplicationSettings.Instance.GetValue(ESettingsStrings.GameFolderPath).GetValueString();

            FileExplorer.Init(ref folderTreeView);



            ValidateRootPath();
            ValidateGameFolder();

            SetUpToolsContextMenu();
            ValidateQuickAccessButtons();

            OnShowRootFolderClicked(null, null);

            CSourceTracker.Instance.Init();
            //string root = CApplicationSettings.Instance.GetValue(ESettingsStrings.RootPath).ToString();
            //string rc = root + CApplicationSettings.Instance.GetValue(ESettingsStrings.RCRelativePath).ToString();


            CSourceTracker.Instance.StartWatching(CApplicationSettings.Instance.SourceTrackerShouldWatchRoot(),
                                                  CApplicationSettings.Instance.SourceTrackerShouldWatchGame());
            //CSourceTracker.Instance.ExportTrackingFile("G:\\Dropbox\\CEWorkspace\\CEWSP\\CEWSP\\bin\\Debug\\SourceTrackerTest\\tracker.txt");

            //CSourceTracker.Instance.ImportTrackingList("G:\\Dropbox\\CEWorkspace\\CEWSP\\CEWSP\\bin\\Debug\\SourceTrackerTest\\tracker.txt");

            if (CApplicationSettings.Instance.GetValue(ESettingsStrings.ImportOnStartup).GetValueBool())
            {
                CSourceTracker.Instance.ImportLastExported();
            }
            else
            {
                if (CApplicationSettings.Instance.GetValue(ESettingsStrings.AskImportOnStartup).GetValueBool())
                {
                    MessageBoxResult res = MessageBox.Show(Properties.Resources.ImportOnStartup,
                                                           Properties.Resources.CommonNotice,
                                                           MessageBoxButton.YesNo,
                                                           MessageBoxImage.Question);

                    if (res == MessageBoxResult.Yes)
                    {
                        CSourceTracker.Instance.ImportLastExported();
                    }
                }
            }

            RefreshShortcuts();
        }
예제 #3
0
 void FillTreeView(string sRoot)
 {
     FileExplorer.PopulateTreeView(sRoot);
 }
예제 #4
0
 void OnShowRootFolderClicked(object sender, RoutedEventArgs e)
 {
     ValidateRootPath();
     FillTreeView(CApplicationSettings.Instance.GetValue(ESettingsStrings.RootPath).GetValueString());
     FileExplorer.BeginWatching(CApplicationSettings.Instance.GetValue(ESettingsStrings.RootPath).GetValueString());
 }