protected virtual void OnSourceContentChanged(ContentChangedEventArgs e) { if (SourceContentChanged != null) { SourceContentChanged(this, e); } }
// *********************************************************************** // *********************************************************************** // Fetches and stores the content public void GetContent() { // Controls must be recreated after content change ChildControlsCreated = false; string[] result = Regex.Split(SourceContent, @"\[page\]", RegexOptions.IgnoreCase); TotalPages = result.Length; bool isValidPage = (CurrentPageIndex >= 0 && CurrentPageIndex <= TotalPages - 1); // Prepares event data ContentChangedEventArgs es = new ContentChangedEventArgs(); if (isValidPage) { es.Content = result[CurrentPageIndex]; } else { es.Content = ""; } // Fires the content changed event OnSourceContentChanged(es); }
protected virtual void OnSourceContentChanged(ContentChangedEventArgs e) { if (SourceContentChanged != null) SourceContentChanged(this, e); }
// *********************************************************************** // *********************************************************************** // Fetches and stores the content public void GetContent() { // Controls must be recreated after content change ChildControlsCreated = false; string[] result = Regex.Split(SourceContent, @"\[page\]", RegexOptions.IgnoreCase); TotalPages = result.Length; bool isValidPage = (CurrentPageIndex >= 0 && CurrentPageIndex <= TotalPages - 1); // Prepares event data ContentChangedEventArgs es = new ContentChangedEventArgs(); if (isValidPage) es.Content = result[CurrentPageIndex]; else es.Content = ""; // Fires the content changed event OnSourceContentChanged(es); }