Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PdbViewer"/> class and
        /// sets up its child controls and other visual elements.
        /// </summary>
        internal PdbViewer()
        {
            Grid layoutGrid = new Grid();

            this.Content = layoutGrid;

            RowDefinition rowDefinition = new RowDefinition();

            rowDefinition.Height = GridLength.Auto;
            layoutGrid.RowDefinitions.Add(rowDefinition);

            layoutGrid.RowDefinitions.Add(new RowDefinition());

            this.structureControl           = new StructureControl(this);
            this.structureControl.PdbViewer = this;
            this.structureControl.SetValue(Grid.RowSpanProperty, 2);
            layoutGrid.Children.Add(this.structureControl);

            this.residueControl                   = new ResidueControl();
            this.residueControl.PdbViewer         = this;
            this.residueControl.VerticalAlignment = VerticalAlignment.Top;
            layoutGrid.Children.Add(this.residueControl);

            Border strctureCaptureBorder = new Border();

            strctureCaptureBorder.Background = Brushes.Transparent;
            strctureCaptureBorder.SetValue(Grid.RowProperty, 1);
            layoutGrid.Children.Add(strctureCaptureBorder);
            this.structureControl.CaptureElement = strctureCaptureBorder;

            this.actionIndicator = new ActionIndicator();
            this.actionIndicator.HorizontalAlignment = HorizontalAlignment.Left;
            this.actionIndicator.VerticalAlignment   = VerticalAlignment.Bottom;
            this.actionIndicator.Margin           = new Thickness(10);
            this.actionIndicator.IsHitTestVisible = false;
            this.actionIndicator.SetValue(Grid.RowSpanProperty, 2);
            layoutGrid.Children.Add(this.actionIndicator);

            this.actionPreviewTimer          = new DispatcherTimer();
            this.actionPreviewTimer.Interval = TimeSpan.FromMilliseconds(100);
            this.actionPreviewTimer.Tick    += this.ActionPreviewTimerTick;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PdbViewer"/> class and 
        /// sets up its child controls and other visual elements.
        /// </summary>
        internal PdbViewer()
        {
            Grid layoutGrid = new Grid();
            this.Content = layoutGrid;

            RowDefinition rowDefinition = new RowDefinition();
            rowDefinition.Height = GridLength.Auto;
            layoutGrid.RowDefinitions.Add(rowDefinition);

            layoutGrid.RowDefinitions.Add(new RowDefinition());

            this.structureControl = new StructureControl(this);
            this.structureControl.PdbViewer = this;
            this.structureControl.SetValue(Grid.RowSpanProperty, 2);
            layoutGrid.Children.Add(this.structureControl);

            this.residueControl = new ResidueControl();
            this.residueControl.PdbViewer = this;
            this.residueControl.VerticalAlignment = VerticalAlignment.Top;
            layoutGrid.Children.Add(this.residueControl);

            Border strctureCaptureBorder = new Border();
            strctureCaptureBorder.Background = Brushes.Transparent;
            strctureCaptureBorder.SetValue(Grid.RowProperty, 1);
            layoutGrid.Children.Add(strctureCaptureBorder);
            this.structureControl.CaptureElement = strctureCaptureBorder;

            this.actionIndicator = new ActionIndicator();
            this.actionIndicator.HorizontalAlignment = HorizontalAlignment.Left;
            this.actionIndicator.VerticalAlignment = VerticalAlignment.Bottom;
            this.actionIndicator.Margin = new Thickness(10);
            this.actionIndicator.IsHitTestVisible = false;
            this.actionIndicator.SetValue(Grid.RowSpanProperty, 2);
            layoutGrid.Children.Add(this.actionIndicator);

            this.actionPreviewTimer = new DispatcherTimer();
            this.actionPreviewTimer.Interval = TimeSpan.FromMilliseconds(100);
            this.actionPreviewTimer.Tick += this.ActionPreviewTimerTick;
        }