private void StartLoadSavedRun(RunModel run) { BackgroundWorker loadDataWorker = new BackgroundWorker(); loadDataWorker.DoWork += DoLoadSavedRun; loadDataWorker.RunWorkerCompleted += CompleteLoadSavedRun; loadDataWorker.RunWorkerAsync(run); }
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; }
public void LoadRun(RunModel run) { run.LoadRunDetail(); CurrentStatisticsRun = run; }