Example #1
0
        private static Preset GetFreshPresetTestSubject()
        {
            var characteristic   = new Characteristic();
            var type             = new Type();
            var preset           = new Preset();
            var originalMetadata = new PresetParserMetadata();

            originalMetadata.BankPath = "foo/bar";
            originalMetadata.Author   = "horst";
            originalMetadata.Comment  = "kein kommentar";
            originalMetadata.Types.Add(type);
            originalMetadata.Characteristics.Add(characteristic);
            originalMetadata.PresetName = "my preset";

            var plugin = new Plugin();

            preset.Plugin = plugin;
            preset.SetFromPresetParser(originalMetadata);

            plugin.Presets.Add(preset);

            preset.PresetHash = "foobar";

            preset.PresetSize           = 1234;
            preset.PresetCompressedSize = 4567;

            preset.IsMetadataModified = false;
            preset.UpdateLastExportedMetadata();
            return(preset);
        }
Example #2
0
        /// <summary>
        /// Method to invoke when the ShowKeyboardMappings command is executed.
        /// </summary>
        private async Task OnAddTypeCommandExecuteAsync()
        {
            var type = new Type();

            type.TypeName = "New Type";
            var viewModel = _viewModelFactory.CreateViewModel <TypeViewModel>(type);

            viewModel.Title       = "Add Type";
            viewModel.SavedAsync += ViewModelOnSavedAsync;
            await _visualizerService.ShowDialogAsync(viewModel);
        }