コード例 #1
0
 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!"));
     }
 }
コード例 #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!"));
            }
        }
コード例 #3
0
 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));
     }
 }
コード例 #4
0
ファイル: VKEntry.cs プロジェクト: Kleinrotti/VoukoderManager
 protected void OnOperationStatusChanged(ProcessStatusEventArgs e)
 {
     Log.Debug($"OperationStatusChanged of {e.ComponentType} with message: {e.StatusMessage}");
     OperationStatus?.Invoke(this, e);
 }
コード例 #5
0
 private void SendStatusUpdate(object sender, OperationEventArgs e)
 {
     _mainThreadDispatcher.InvokeAsync(() => OperationStatus?.Invoke(sender, e));
 }
コード例 #6
0
 private void SendStatusMessage(string message)
 {
     OperationStatus?.Invoke(this, new OperationEventArgs(message));
 }