Exemplo n.º 1
0
        private async void updateTraktorVersion()
        {
            MustOverrideTraktorVersion = String.IsNullOrEmpty(PathToTraktorSettings);

            if (!MustOverrideTraktorVersion)
            {
                await Task.Factory.StartNew(() =>
                {
                    App.SetStatus("Initializing Traktor Settings ...");
                    IsInitializingTraktorSettings = true;
                    var success = TraktorSettings.Initialize(PathToTraktorSettings, true);
                    if (success)
                    {
                        if (!OverrideTraktorVersion)
                        {
                            TraktorVersion = TraktorSettings.Instance.TraktorVersion;
                        }
                        else if (TraktorVersion.Equals(TraktorSettings.TRAKTOR_FALLBACK_VERSION))
                        {
                            OverrideTraktorVersion = false;
                        }
                    }
                    IsInitializingTraktorSettings = false;
                    (CloseCommand as CommandHandler).UpdateCanExecuteState();
                    (SaveCommand as CommandHandler).UpdateCanExecuteState();
                    App.ResetStatus();
                });
            }
        }
Exemplo n.º 2
0
        private async void initialize()
        {
            // assert app settings are initialized
            while (!CmdrSettings.Instance.Initialized)
            {
                App.SetStatus("Initializing App Settings ...");
                MessageBoxHelper.ShowInfo(
                    "Before you can map the sh** out of your controllers, please make a few settings. " +
                    "Set at least the targeted Traktor version for your mappings. You can take the default one." +
                    "\n\nIf you want the full functionality, please setup the paths to your \"Traktor Settings.tsi\" and " +
                    "your Controller Default Mappings." +
                    "\n\nDon't forget to save settings when you are done.", "Welcome to cmdr!");
                showSettings();
                App.ResetStatus();
            }

            // try to initialize TraktorSettings
            if (!String.IsNullOrEmpty(CmdrSettings.Instance.PathToTraktorSettings) && !TraktorSettings.Initialized)
            {
                await Task.Factory.StartNew(() =>
                {
                    App.SetStatus("Initializing Traktor Settings ...");
                    TraktorSettings.Initialize(CmdrSettings.Instance.PathToTraktorSettings, true);
                    App.ResetStatus();
                });
            }

            _mru.Load();

            await ControllerDefaultMappings.Instance.LoadAsync(CmdrSettings.Instance.PathToControllerDefaultMappings);
        }
Exemplo n.º 3
0
        private async void initialize()
        {
            // assert app settings are initialized
            while (!CmdrSettings.Instance.Initialized)
            {
                App.SetStatus("Initializing App Settings ...");
                MessageBoxHelper.ShowInfo(
                    "UPDATE JAN 2020:\n" +
                    "****************\n " +
                    " Please see the new features in the changelog: https://github.com/pestrela/cmdr/blob/master/docs/development/Change_Log.md\n" +
                    "\n\n" +
                    "Original Message:\n" +
                    "******************\n" +
                    "Before you can map your controllers, please make a few settings. " +
                    "Set at least the targeted Traktor version for your mappings. You can take the default one." +
                    "\n\nIf you want the full functionality, please setup the paths to your \"Traktor Settings.tsi\" and " +
                    "your Controller Default Mappings." +
                    "\n\nDon't forget to save settings when you are done.", "Welcome to cmdr!");
                showSettings();
                App.ResetStatus();
            }

            // try to initialize TraktorSettings
            if (!String.IsNullOrEmpty(CmdrSettings.Instance.PathToTraktorSettings) && !TraktorSettings.Initialized)
            {
                await Task.Factory.StartNew(() =>
                {
                    App.SetStatus("Initializing Traktor Settings ...");
                    TraktorSettings.Initialize(CmdrSettings.Instance.PathToTraktorSettings, true);
                    App.ResetStatus();
                });
            }

            _mru.Load();

            // pestrela: todo load debug TSI for testing
            // TsiFile.Load(CmdrSettings.Instance.TraktorVersion, filePath)

            await ControllerDefaultMappings.Instance.LoadAsync(CmdrSettings.Instance.PathToControllerDefaultMappings);
        }