public void ChangeInstructionSet(string selected) { switch (_activeDocumentType) { case AsmType.RadAsm: _radAsm1SelectedSet = GetInstructionSetByName(selected, _radAsm1InstructionSets); break; case AsmType.RadAsm2: _radAsm2SelectedSet = GetInstructionSetByName(selected, _radAsm2InstructionSets); break; default: return; } var optionProvider = GeneralOptionProvider.Instance; var optionModel = GeneralOptionModel.Instance; switch (_activeDocumentType) { case AsmType.RadAsm: optionProvider.Asm1SelectedSet = _radAsm1SelectedSet == null ? string.Empty : _radAsm1SelectedSet.ToString(); break; case AsmType.RadAsm2: optionProvider.Asm2SelectedSet = _radAsm2SelectedSet == null ? string.Empty : _radAsm2SelectedSet.ToString(); break; } optionModel.Save(); InstructionsUpdatedInvoke(_activeDocumentType); }