bovender framework
C# framework that implements MVVM and more
DownloadProcessMessageContent.cs
2 /* DownloadProcessMessageContent.cs
3  * part of Bovender framework
4  *
5  * Copyright 2014-2018 Daniel Kraus
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 using System;
20 using System.Collections.Generic;
21 using System.Linq;
22 using System.Text;
23 
24 namespace Bovender.Mvvm.Messaging
25 {
27  {
28  #region Public properties
29 
30  public double DownloadMegaBytesReceived
31  {
32  get
33  {
34  return _received;
35  }
36  set
37  {
38  _received = value;
39  OnPropertyChanged("DownloadMegaBytesReceived");
40  }
41  }
42 
43  public double DownloadMegaBytesTotal
44  {
45  get
46  {
47  return _total;
48  }
49  set
50  {
51  _total = value;
52  OnPropertyChanged("DownloadMegaBytesTotal");
53  }
54  }
55 
56  #endregion
57 
58  #region Constructors
59 
61  : base()
62  { }
63 
65  : base(viewModel)
66  { }
67 
68  public DownloadProcessMessageContent(Action cancelProcess)
69  : base(cancelProcess)
70  { }
71 
72  public DownloadProcessMessageContent(ViewModelBase viewModel, Action cancelProcess)
73  : base(viewModel, cancelProcess)
74  { }
75 
76  #endregion
77 
78  #region Private fields
79 
80  private double _received;
81  private double _total;
82 
83  #endregion
84  }
85 }
Holds information about percent completion of a process and defines events that occur when the proces...