| 120 | } |
| 121 | |
| 122 | void CopyDialog::ShowGraphButton_Click(winrt::Windows::Foundation::IInspectable const& sender, winrt::Microsoft::UI::Xaml::RoutedEventArgs const&) |
| 123 | { |
| 124 | if (m_showSpeedGraph) |
| 125 | { |
| 126 | HideGraphAnimation().Completed([this](auto...) { UnloadObject(SpeedGraph()); }); |
| 127 | HideGraphAnimation().Begin(); |
| 128 | winrt::Microsoft::UI::Xaml::VisualStateManager::GoToState(*this, L"HideGraph", false); |
| 129 | Global::copyWindow.Resize(m_originalWindowSize); |
| 130 | ViewModel().PropertyChanged(m_speedUpdateRevoker); |
| 131 | } |
| 132 | else |
| 133 | { |
| 134 | FindName(L"SpeedGraph").as<winrt::FastCopy::SpeedGraph>().Loaded([this](auto...) |
| 135 | { |
| 136 | GraphAnimation().Begin(); |
| 137 | }); |
| 138 | m_speedUpdateRevoker = ViewModel().PropertyChanged([this](auto, winrt::Microsoft::UI::Xaml::Data::PropertyChangedEventArgs e) { |
| 139 | if (e.PropertyName() == L"Speed") |
| 140 | { |
| 141 | SpeedGraph().SetSpeed(ViewModel().Percent(), ViewModel().Speed()); |
| 142 | } |
| 143 | }); |
| 144 | |
| 145 | winrt::Microsoft::UI::Xaml::VisualStateManager::GoToState(*this, L"ShowGraph", false); |
| 146 | m_originalWindowSize = Global::copyWindow.ActualSize(); |
| 147 | Global::copyWindow.Resize({ (int)m_originalWindowSize.Width, (int)m_originalWindowSize.Height + 190 }); |
| 148 | } |
| 149 | m_showSpeedGraph = !m_showSpeedGraph; |
| 150 | } |
| 151 | |
| 152 | void CopyDialog::ShowMenu(winrt::hstring path, winrt::Microsoft::UI::Xaml::Controls::MenuFlyout flyout) |
| 153 | { |
nothing calls this directly
no test coverage detected