/// <summary> /// When the page is loaded, perform the animation /// </summary> /// <param name="pageEnum">Page to be load after this page unloads</param> protected async void BasePage_Unload(ApplicationPageEnum pageEnum) { // Animate the page out await AnimateOut(); // You cannot make another thread execute AnimateIn function because the "page" is on UI thread. // Raise done animating event DoneAnimatingOut?.Invoke(pageEnum); }
private void btnExecute_Click(object sender, EventArgs e) { if (_logFileName != null) { // Load or re-load file if ((!LogFileLoaded) || (String.Compare(_logFileLoadedName, _logFileName, true) != 0)) { LoadLogFile(_logFileName); } // Logfile must be laoded else if (String.Compare(_logFileLoadedName, _logFileName, true) != 0) { LoadLogFile(_logFileName); } else if (FileViewHasChanged()) { // File view has changed so reload LoadLogFile(_logFileName); } SetDisplayState(); ApplicationPageEnum applicationPage = CurrentApplicationPage; switch (applicationPage) { default: case ApplicationPageEnum.FileContents: // Nothing to do as it was all done above break; case ApplicationPageEnum.FileFiltered: if (String.IsNullOrEmpty(txtPattern.Text) || String.IsNullOrWhiteSpace(txtPattern.Text)) { MessageBox.Show("Search pattern is empty", "Log Scanner"); } else { FilterLogFile(txtPattern.Text); } break; case ApplicationPageEnum.FilePairs: break; } } }
private void tabDisplayType_SelectedIndexChanged(object sender, EventArgs e) { ApplicationPageEnum currentApplicationPage = CurrentApplicationPage; switch (currentApplicationPage) { default: case ApplicationPageEnum.FileContents: SetContentsDisplayState(); break; case ApplicationPageEnum.FileFiltered: SetContentsFilterDisplayState(); break; case ApplicationPageEnum.FilePairs: SetContentsPairDisplayState(); break; } }
private void ChangePage(ApplicationPageEnum page) { windowViewModel.CurrentPage = page; }
/// <summary> /// Event listener that changes the current page /// </summary> /// <param name="newPage"></param> void ChangePage(ApplicationPageEnum newPage) { CurrentPage = newPage; }
public void OnChangePageTo(ApplicationPageEnum pageEnum) { ChangePageTo?.Invoke(pageEnum); }