コード例 #1
0
 public static void CreateOptionView()
 {
     if (_option == null)
     {
         _option = new ViewModelOptionWindow();
     }
 }
コード例 #2
0
 /// <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)
         {
         }
     }
 }
コード例 #3
0
        /// <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)
                {
                    
                }
            }

        }
コード例 #4
0
 public static void CreateOptionView()
 {
     if (_option == null)
     {
         _option = new ViewModelOptionWindow();
     }
 }