Exemple #1
0
 protected virtual void OnSourceContentChanged(ContentChangedEventArgs e)
 {
     if (SourceContentChanged != null)
     {
         SourceContentChanged(this, e);
     }
 }
Exemple #2
0
        // ***********************************************************************

        // ***********************************************************************
        // 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);
        }
Exemple #3
0
 protected virtual void OnSourceContentChanged(ContentChangedEventArgs e)
 {
     if (SourceContentChanged != null)
         SourceContentChanged(this, e);
 }
Exemple #4
0
        // ***********************************************************************

        // ***********************************************************************
        // 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);
        }