diff options
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; - }; -} |
