示例#1
0
 private void StartLoadSavedRun(RunModel run)
 {
     BackgroundWorker loadDataWorker = new BackgroundWorker();
     loadDataWorker.DoWork += DoLoadSavedRun;
     loadDataWorker.RunWorkerCompleted += CompleteLoadSavedRun;
     loadDataWorker.RunWorkerAsync(run);
 }
示例#2
0
 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;
 }