Esempio n. 1
0
        public void Execute(object parameter)
        {
            OpenFileDialog openFileDialog = new OpenFileDialog();

            openFileDialog.ShowDialog();
            if (!("").Equals(openFileDialog.FileName))
            {
                MongoSetViewModel.GetInstance().MongodPath = openFileDialog.FileName;
            }
        }
Esempio n. 2
0
 public static MongoSetViewModel GetInstance()
 {
     if (mongo == null)
     {
         lock (syncRoot)
         {
             if (mongo == null)
             {
                 mongo = new MongoSetViewModel();
             }
         }
     }
     return(mongo);
 }
Esempio n. 3
0
        private void SaveConfig()
        {
            XElement config = new XElement("configuration",
                                           new XElement("mongod", new XAttribute("path", MongoSetViewModel.GetInstance().MongodPath))
                                           );

            config.Save(Path.Combine(InstallPathViewModel.GetInstance().InstallPath, "mms.config"));
        }