예제 #1
0
 private void StartLoadSavedRun(RunModel run)
 {
     BackgroundWorker loadDataWorker = new BackgroundWorker();
     loadDataWorker.DoWork += DoLoadSavedRun;
     loadDataWorker.RunWorkerCompleted += CompleteLoadSavedRun;
     loadDataWorker.RunWorkerAsync(run);
 }
예제 #2
0
파일: RunModel.cs 프로젝트: ayls/EatMyDust
 public static RunModel LoadRunSummary(string fileName)
 {
     RunModel run = new RunModel();
     run.FileName = fileName;
     using (var isoStore = IsolatedStorageFile.GetUserStoreForApplication())
     {
         using (BinaryReader br = new BinaryReader(new IsolatedStorageFileStream(fileName, FileMode.Open, isoStore)))
         {
             br.ReadDouble(); // file format version
             run.RunName = br.ReadString();
             int year = br.ReadInt32();
             int month = br.ReadInt32();
             int day = br.ReadInt32();
             int hour = br.ReadInt32();
             int minute = br.ReadInt32();
             run.RunStart = new DateTime(year, month, day, hour, minute, 0);
             br.Close();
         }
     }
     return run;
 }
예제 #3
0
 public void LoadRun(RunModel run)
 {
     run.LoadRunDetail();
     CurrentStatisticsRun = run;
 }