public void DoWork()
 {
     using (var fileStream = File.Open(_filename, FileMode.Open, FileAccess.Read))
     {
         ApplicationDataStore applicationData = (ApplicationDataStore)_xmlSerializer.ReadObject(fileStream);
         _viewModelParser.ClearAndLoad(applicationData);
         OperationStatus?.Invoke(this, new OperationEventArgs("Project loaded!"));
     }
 }
Exemple #2
0
        public void DoWork()
        {
            using (var fileStream = File.Open(_fileName, FileMode.OpenOrCreate, FileAccess.Write))
            {
                var applicationData = _viewModelParser.ExtractData();
                _dataContractSerializer.WriteObject(fileStream, applicationData);

                OperationStatus?.Invoke(this, new OperationEventArgs("Project saved!"));
            }
        }
 public void DoWork()
 {
     try
     {
         OperationStatus?.Invoke(this, new OperationEventArgs("Session host starting"));
         _networkManager.StartHosting();
     }
     catch (NetworkingException e)
     {
         OperationStatus?.Invoke(this, new OperationEventArgs("Error! " + e.Message));
     }
 }
 protected void OnOperationStatusChanged(ProcessStatusEventArgs e)
 {
     Log.Debug($"OperationStatusChanged of {e.ComponentType} with message: {e.StatusMessage}");
     OperationStatus?.Invoke(this, e);
 }
Exemple #5
0
 private void SendStatusUpdate(object sender, OperationEventArgs e)
 {
     _mainThreadDispatcher.InvokeAsync(() => OperationStatus?.Invoke(sender, e));
 }
Exemple #6
0
 private void SendStatusMessage(string message)
 {
     OperationStatus?.Invoke(this, new OperationEventArgs(message));
 }