public static void CreateOptionView() { if (_option == null) { _option = new ViewModelOptionWindow(); } }
/// <summary> /// Initializes a new instance of the ViewModelLocator class. /// </summary> public ViewModelLocator() { CreateSdkView(); CreateMapMakerView(_sdk.MakeMapSdk); CreateOptionView(); AppMessages.OptionAnswer.Register(this, MessageHandler); if (File.Exists("options.xml")) { var serializer = new XmlSerializer(typeof(ViewModelOptionWindow)); try { using (var file = new FileStream("options.xml", FileMode.Open)) { _option = (ViewModelOptionWindow)serializer.Deserialize(file); } _option.CommandApply.Execute(null); } catch (Exception e) { } } }
/// <summary> /// Initializes a new instance of the ViewModelLocator class. /// </summary> public ViewModelLocator() { CreateSdkView(); CreateMapMakerView(_sdk.MakeMapSdk); CreateOptionView(); AppMessages.OptionAnswer.Register(this,MessageHandler); if(File.Exists("options.xml")) { var serializer = new XmlSerializer(typeof(ViewModelOptionWindow)); try { using (var file = new FileStream("options.xml", FileMode.Open)) { _option = (ViewModelOptionWindow) serializer.Deserialize(file); } _option.CommandApply.Execute(null); } catch(Exception e) { } } }
public static void CreateOptionView() { if (_option == null) { _option = new ViewModelOptionWindow(); } }