void UpdateMemoryState() { if (!Model.IsMemoryEmpty) { MemRecall.IsEnabled = true; ClearMemoryButton.IsEnabled = true; } else { MemRecall.IsEnabled = false; ClearMemoryButton.IsEnabled = false; } String viewState = App.GetAppViewState(); if (viewState == ViewState.DockedView) { CloseMemoryFlyout(); SetChildAsMemory(); MemoryButton.Visibility = Visibility.Collapsed; if (m_IsLastFlyoutMemory && !IsProgrammer) { DockPivot.SelectedIndex = 1; } } else { MemoryButton.Visibility = Visibility.Visible; DockMemoryHolder.Child = null; } }
void UpdateHistoryState() { String viewState = App.GetAppViewState(); if (viewState == ViewState.DockedView) { // docked view CloseHistoryFlyout(); SetChildAsHistory(); HistoryButton.Visibility = Visibility.Collapsed; if (!IsProgrammer && m_IsLastFlyoutHistory) { DockPivot.SelectedIndex = 0; } } else { // flyout view DockHistoryHolder.Child = null; if (!IsProgrammer) { HistoryButton.Visibility = Visibility.Visible; } } }
void ToggleMemoryFlyout(object sender, object args) { String viewState = App.GetAppViewState(); if (viewState != ViewState.DockedView) { if (m_fIsMemoryFlyoutOpen) { MemoryFlyout.Hide(); } else { // TraceLogger.GetInstance().LogMemoryFlyoutOpenBegin(Model.MemorizedNumbers.Size); MemoryFlyout.Content = GetMemory(); // UNO TODO // m_memory.RowHeight = NumpadPanel.ActualHeight; FlyoutBase.ShowAttachedFlyout(MemoryButton); } } }
void ToggleHistoryFlyout(object parameter) { String viewState = App.GetAppViewState(); // If app starts correctly in snap mode and shortcut is used for history then we need to load history if not yet initialized. if (viewState != ViewState.DockedView) { if (m_fIsHistoryFlyoutOpen) { HistoryFlyout.Hide(); } else { // TraceLogger.GetInstance().LogHistoryFlyoutOpenBegin(Model.HistoryVM.ItemSize); HistoryFlyout.Content = m_historyList; // UNO TODO // m_historyList.RowHeight = NumpadPanel.ActualHeight; FlyoutBase.ShowAttachedFlyout(HistoryButton); } } }