-
Notifications
You must be signed in to change notification settings - Fork 1
/
ViewModel.cs
157 lines (140 loc) · 5.22 KB
/
ViewModel.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
using GalaSoft.MvvmLight;
using System.Collections.ObjectModel;
namespace PocketTDPControl
{
public class ViewModel : ViewModelBase
{
private string machineName;
private MachineType machine;
private bool isSupportedMachine;
private string cpuName;
private int cpuTemperture;
private int cpuClock;
private string gpuName;
private int gpuTemperture;
private int gpuClock;
private int memoryAvailable;
private int memoryUsed;
private int estimatedChargeRemaining;
private int estimatedRunTime;
private int readingCpuTDP;
private int readingGpuTDP;
private int readingFPS;
private int minTDP;
private int maxTDP;
private int fanSpeed;
private int fanSpeedPrecentage;
private int applyFanSpeedPrecentage;
private bool isFanSpeedManualControlEnabled;
private bool isTargetFPSModeEnabled;
private int applyTargetFPS;
private int applyTDP;
private ObservableCollection<int> presetTDP;
private int selectedPresetTDPIndex;
private bool isEditModeEnabled;
public string MachineName { get => machineName; set { machineName = value; RaisePropertyChanged(); } }
public MachineType Machine { get => machine; set { machine = value; RaisePropertyChanged(); } }
public bool IsSupportedMachine { get => isSupportedMachine; set { isSupportedMachine = value; RaisePropertyChanged(); } }
public string CpuName { get => cpuName; set { cpuName = value; RaisePropertyChanged(); } }
public string GpuName { get => gpuName; set { gpuName = value; RaisePropertyChanged(); } }
public int CpuTemperture { get => cpuTemperture; set { cpuTemperture = value; RaisePropertyChanged(); } }
public int GpuTemperture { get => gpuTemperture; set { gpuTemperture = value; RaisePropertyChanged(); } }
public int CpuClock { get => cpuClock; set { cpuClock = value; RaisePropertyChanged(); } }
public int GpuClock { get => gpuClock; set { gpuClock = value; RaisePropertyChanged(); } }
public int MemoryAvailable { get => memoryAvailable; set { memoryAvailable = value; RaisePropertyChanged(); } }
public int MemoryUsed { get => memoryUsed; set { memoryUsed = value; RaisePropertyChanged(); } }
public int EstimatedChargeRemaining { get => estimatedChargeRemaining; set { estimatedChargeRemaining = value; RaisePropertyChanged(); } }
public int EstimatedRunTime { get => estimatedRunTime; set { estimatedRunTime = value; RaisePropertyChanged(); } }
public bool IsTargetFPSModelEnabled { get => isTargetFPSModeEnabled; set { isTargetFPSModeEnabled = value; RaisePropertyChanged(); } }
public int ApplyTargetFPS { get => applyTargetFPS; set { applyTargetFPS = value; RaisePropertyChanged(); } }
public bool IsEditModeEnabled
{
get => isEditModeEnabled; set
{
isEditModeEnabled = value; RaisePropertyChanged();
}
}
public int ReadingCpuTDP
{
get => readingCpuTDP; set
{
readingCpuTDP = value; RaisePropertyChanged();
}
}
public int ReadingGpuTDP
{
get => readingGpuTDP; set
{
readingGpuTDP = value; RaisePropertyChanged();
}
}
public int ReadingFPS
{
get => readingFPS; set
{
readingFPS = value; RaisePropertyChanged();
}
}
public int MinTDP
{
get => minTDP; set
{
minTDP = value; RaisePropertyChanged();
}
}
public int MaxTDP
{
get => maxTDP; set
{
maxTDP = value; RaisePropertyChanged();
}
}
public int ApplyTDP
{
get => applyTDP; set
{
applyTDP = value; RaisePropertyChanged();
}
}
public int FanSpeed
{
get => fanSpeed; set
{
fanSpeed = value; RaisePropertyChanged();
}
}
public int FanSpeedPrecentage
{
get => fanSpeedPrecentage; set
{
fanSpeedPrecentage = value; RaisePropertyChanged();
}
}
public int ApplyFanSpeedPrecentage
{
get => applyFanSpeedPrecentage; set
{
applyFanSpeedPrecentage = value; RaisePropertyChanged();
}
}
public bool IsFanSpeedManualControlEnabled
{
get => isFanSpeedManualControlEnabled; set
{
isFanSpeedManualControlEnabled = value; RaisePropertyChanged();
}
}
public ObservableCollection<int> PresetTDP
{
get { return presetTDP; }
set { presetTDP = value; RaisePropertyChanged(); }
}
public int SelectedPresetTDPIndex
{
get => selectedPresetTDPIndex; set
{
selectedPresetTDPIndex = value; RaisePropertyChanged();
}
}
}
}