Exemplo n.º 1
0
 void LoadRecentSolutionExecute(object path)
 {
     try
     {
         if (File.Exists((String)path))
         {
             String          sPath     = (String)path;
             CProject        ieProject = new CProject();
             BinaryFormatter bfProjekt = new BinaryFormatter();
             FileStream      fsProject = new FileStream((String)sPath, FileMode.Open);
             Projects = (ObservableCollection <CProjectViewModel>)bfProjekt.Deserialize(fsProject);
             RaisePropertyChanged("Projects");
             fsProject.Close();
             log(string.Format("Solution {0} loaded.", (String)sPath));
             Path = sPath;
         }
     }
     catch (Exception e)
     {
         MessageBox.Show(e.Message);
     }
 }
Exemplo n.º 2
0
 public CProjectViewModel()
 {
     _project = new CProject();
 }