diff options
| author | Adonais Romero González <[email protected]> | 2024-05-06 16:21:31 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-05-06 16:21:31 -0700 |
| commit | a74a241c664c4e1d7c0838287b34076c19d9858a (patch) | |
| tree | 6ff7562612967b122acf8acf8a69c4dcfd5905db /general/WinHEC 2017 Lab/Toaster Support App/App/CustomCapability/cpp/ServiceViewModel.h | |
| parent | def8e8e34ed2b7b1deb2fc9112ac4255f1a0f2ba (diff) | |
| parent | 15477ce52bbb6b42ca591ecdfb484cac089f89ab (diff) | |
Merge develop changes prior to upcoming WDK release (May 2024)
Diffstat (limited to 'general/WinHEC 2017 Lab/Toaster Support App/App/CustomCapability/cpp/ServiceViewModel.h')
| -rw-r--r-- | general/WinHEC 2017 Lab/Toaster Support App/App/CustomCapability/cpp/ServiceViewModel.h | 77 |
1 files changed, 0 insertions, 77 deletions
diff --git a/general/WinHEC 2017 Lab/Toaster Support App/App/CustomCapability/cpp/ServiceViewModel.h b/general/WinHEC 2017 Lab/Toaster Support App/App/CustomCapability/cpp/ServiceViewModel.h deleted file mode 100644 index c2fcad0c..00000000 --- a/general/WinHEC 2017 Lab/Toaster Support App/App/CustomCapability/cpp/ServiceViewModel.h +++ /dev/null @@ -1,77 +0,0 @@ -#pragma once - -#include "RpcClient.h" -#include <memory> - -namespace SDKTemplate -{ - [Windows::UI::Xaml::Data::Bindable] - public ref class ServiceViewModel sealed : Windows::UI::Xaml::Data::INotifyPropertyChanged - { - public: - ServiceViewModel(); - void StartMetering(int sampleRate); - void SetSamplePeriod(int rate); - void StopMetering(); - property Platform::String^ ExpectedRpcCallbackRate - { - Platform::String^ get(); - void set(Platform::String^ value); - } - property Platform::String^ ActualRpcCallbackRate - { - Platform::String^ get(); - void set(Platform::String^ value); - } - property Platform::String^ SampleMessage - { - Platform::String^ get(); - void set(Platform::String^ value); - } - property bool StartButtonEnabled - { - bool get(); - void set(bool value); - } - property bool StopButtonEnabled - { - bool get(); - void set(bool value); - } - property bool SliderEnabled - { - bool get(); - void set(bool value); - } - property double SliderValue - { - double get(); - void set(double value); - } - virtual event Windows::UI::Xaml::Data::PropertyChangedEventHandler^ PropertyChanged; - - private: - volatile bool meteringOn; - Windows::UI::Core::ICoreDispatcher^ dispatcher; - int samplePeriod; - ULARGE_INTEGER lastUpdateTime; - __int64 rpcDataCountOld = 0; - unsigned int sampleRefreshCount = 0; - std::unique_ptr<RpcClient> rpcclient; - bool stopMeteringRequested; - bool NotifyIfAnyError(__int64 errCode); - - // Variables backing UI bindings - Platform::String^ sampleMessage; - Platform::String^ expectedRpcCallbackRate; - Platform::String^ actualRpcCallbackRate; - bool startButtonEnabled; - bool stopButtonEnabled; - bool sliderEnabled; - double sliderValue; - - void NotifyPropertyChanged(Platform::String^ prop); - - Platform::Array<__int64>^ sampleArray; - }; -} |
