public void ShowStatistics(VirtualizableState desiredState)
        {
            if (!this._showStatistics)
            {
                return;
            }
            string str1 = string.Concat(new object[4] {
                "NumberOfLoadUnload: ", this._numberOfScrollChangedCalls, ", state= ", desiredState.ToString()
            });

            this._loadedSegmentsStr = string.Concat(this._loadedSegment.ToString(), ", ", this._loadedSegmentsStr);
            if (((string)this._loadedSegmentsStr).Length >= 40)
            {
                this._loadedSegmentsStr = ((string)this._loadedSegmentsStr).Substring(0, 40);
            }
            string str2 = string.Concat("LoadedSegment: ", this._loadedSegmentsStr);

            this._textBlock1.Text       = str1;
            this._textBlock1.Foreground = ((Brush) new SolidColorBrush(Colors.Green));
            ((UIElement)this._textBlock1).IsHitTestVisible = false;
            this._textBlock2.Text = str2;
            ((UIElement)this._textBlock2).IsHitTestVisible = false;
            this._textBlock2.Foreground = ((Brush) new SolidColorBrush(Colors.Green));
            if (this._statisticsBlocksAdded)
            {
                return;
            }
            ((ToggleButton)this._boundToScrollCheckBox).IsChecked = (new bool?(true));
            // ISSUE: method pointer
            ((ToggleButton)this._boundToScrollCheckBox).Checked += (new RoutedEventHandler(this._boundToScrollCheckBox_Checked));
            // ISSUE: method pointer
            ((ToggleButton)this._boundToScrollCheckBox).Unchecked += (new RoutedEventHandler(this._boundToScrollCheckBox_Unchecked));
            ((PresentationFrameworkCollection <UIElement>)((Panel)this._statContainer).Children).Add((UIElement)this._textBlock1);
            ((PresentationFrameworkCollection <UIElement>)((Panel)this._statContainer).Children).Add((UIElement)this._textBlock2);
            ((PresentationFrameworkCollection <UIElement>)((Panel)this._statContainer).Children).Add((UIElement)this._boundToScrollCheckBox);
            this._statContainer.Orientation = ((Orientation)0);
            ((FrameworkElement)this._statContainer).VerticalAlignment = ((VerticalAlignment)0);
            Grid.SetRowSpan((FrameworkElement)this._statContainer, 10);
            Grid.SetColumn((FrameworkElement)this._statContainer, 10);
            ((PresentationFrameworkCollection <UIElement>) this.OuterPanel.Children).Add((UIElement)this._statContainer);
            this._statisticsBlocksAdded = true;
        }
Exemple #2
0
        public void ShowStatistics(VirtualizableState desiredState)
        {
            if (!this._showStatistics)
            {
                return;
            }
            string str1 = "NumberOfLoadUnload: " + (object)this._numberOfScrollChangedCalls + ", state= " + desiredState.ToString();

            this._loadedSegmentsStr = this._loadedSegment.ToString() + ", " + this._loadedSegmentsStr;
            if (this._loadedSegmentsStr.Length >= 40)
            {
                this._loadedSegmentsStr = this._loadedSegmentsStr.Substring(0, 40);
            }
            string str2 = "LoadedSegment: " + this._loadedSegmentsStr;

            this._textBlock1.Text             = str1;
            this._textBlock1.Foreground       = (Brush) new SolidColorBrush(Colors.Green);
            this._textBlock1.IsHitTestVisible = false;
            this._textBlock2.Text             = str2;
            this._textBlock2.IsHitTestVisible = false;
            this._textBlock2.Foreground       = (Brush) new SolidColorBrush(Colors.Green);
            if (this._statisticsBlocksAdded)
            {
                return;
            }
            this._boundToScrollCheckBox.IsChecked  = new bool?(true);
            this._boundToScrollCheckBox.Checked   += new RoutedEventHandler(this._boundToScrollCheckBox_Checked);
            this._boundToScrollCheckBox.Unchecked += new RoutedEventHandler(this._boundToScrollCheckBox_Unchecked);
            this._statContainer.Children.Add((UIElement)this._textBlock1);
            this._statContainer.Children.Add((UIElement)this._textBlock2);
            this._statContainer.Children.Add((UIElement)this._boundToScrollCheckBox);
            this._statContainer.Orientation       = Orientation.Vertical;
            this._statContainer.VerticalAlignment = VerticalAlignment.Top;
            Grid.SetRowSpan((FrameworkElement)this._statContainer, 10);
            Grid.SetColumn((FrameworkElement)this._statContainer, 10);
            this.OuterPanel.Children.Add((UIElement)this._statContainer);
            this._statisticsBlocksAdded = true;
        }