Ejemplo n.º 1
0
 public async Task OpenJob(string path)
 {
     CurrentJob = await Task.Run(() =>
     {
         using (var stream = File.OpenRead(path))
         {
             Environment.CurrentDirectory = Path.GetDirectoryName(path);
             var ser = new DataContractJsonSerializer(typeof(Job));
             var result = (Job)ser.ReadObject(stream);
             result.JobFilePath = path;
             return result;
         }
     });
 }
Ejemplo n.º 2
0
 public AppModel()
 {
     currentJob = new Job();
 }