예제 #1
0
        /// <summary>
        /// Called when [selecting a database file].
        /// </summary>
        private void OnSelectDatabase()
        {
            if (!Directory.Exists(_settings.HypermintSettings.HsPath))
            {
                return;
            }

            PickedDatabaseXml = _fileFolderServic.SetFileDialog(_settings.HypermintSettings.HsPath + "\\Databases");

            ShortDbName = Path.GetFileNameWithoutExtension(PickedDatabaseXml);
        }
예제 #2
0
        public TextWheelViewModel(ITextImageService textImageService, IEventAggregator eventAggregator, ISettingsHypermint settings, IFileDialogHelper findDir)
        {
            _eventAgg          = eventAggregator;
            _settingsRepo      = settings;
            _fileFolderService = findDir;
            _textImageService  = textImageService;

            GravityOptions = Enum.GetNames(typeof(Gravity));

            SelectFontCommand = new DelegateCommand(SelectFont);

            SavePresetCommand = new DelegateCommand(SavePreset);

            GeneratePreviewCommand = new DelegateCommand(GeneratePreview);

            SelectFontLocalCommand = new DelegateCommand(() =>
            {
                var fontDir = Path.Combine(_settingsRepo.HypermintSettings.RlMediaPath, "Fonts");

                string result = "";

                if (Directory.Exists(fontDir))
                {
                    result = _fileFolderService.SetFileDialog(fontDir);
                }
                else
                {
                    result = _fileFolderService.SetFileDialog();
                }

                CurrentWheelSetting.FontName = result;
                FontName = result;
            });

            GetPresets();
        }
        private void SelectSettings()
        {
            var hsPath = _settingsService.HypermintSettings.HsPath;

            SettingsTemplate = _fileFolderService.SetFileDialog(hsPath);
        }