Exemplo n.º 1
0
        public QueryView()
        {
            InitializeComponent();
            this.IsVisibleChanged += delegate { this.ExecuteQuery(); };
            this.DataContext       = this;
            this.task              = new SingleTask(this.Dispatcher);
            this.searchTask        = new SingleTask(this.Dispatcher);

            this.Translation = new ControlsTranslation();
            this.visibleColumnsSelection.ItemsSource = this.gridView.Columns.Select(col => new GridViewColumnModel(col));

            this.treeView.SizeChanged += QueryView_SizeChanged;
        }
Exemplo n.º 2
0
        public QueryView()
        {
            InitializeComponent();
            this.IsVisibleChanged += delegate { this.ExecuteQuery(); };
            this.DataContext       = this;
            this.task              = new SingleTask(this.Dispatcher);
            this.searchTask        = new SingleTask(this.Dispatcher);

            this.Translation = new ControlsTranslation();

            this.treeView.SizeChanged += delegate(object sender, SizeChangedEventArgs e) {
                if (e.NewSize.Width > 0 && e.PreviousSize.Width > 0)
                {
                    double adjustedNameColumnWidth = nameColumn.Width + e.NewSize.Width - e.PreviousSize.Width;
                    double matchingNameColumnWidth = e.NewSize.Width - this.callCountColumn.Width
                                                     - this.percentColumn.Width - this.timeSpentColumn.Width
                                                     - this.timeSpentSelfColumn.Width - this.timeSpentPerCallColumn.Width
                                                     - this.timeSpentSelfPerCallColumn.Width - 25;

                    // always keep name column at least 75 pixels wide
                    if (matchingNameColumnWidth < 75)
                    {
                        matchingNameColumnWidth = 75;
                    }

                    if (e.NewSize.Width >= e.PreviousSize.Width)
                    {
                        // treeView got wider: also make name column wider if there's space free
                        if (adjustedNameColumnWidth <= matchingNameColumnWidth)
                        {
                            nameColumn.Width = adjustedNameColumnWidth;
                        }
                    }
                    else
                    {
                        // treeView got smaller: make column smaller unless there's space free
                        if (adjustedNameColumnWidth >= matchingNameColumnWidth)
                        {
                            nameColumn.Width = adjustedNameColumnWidth;
                        }
                    }
                }
            };
        }
Exemplo n.º 3
0
 public RingDiagramControl()
 {
     this.hierarchyStack = new Stack <CallTreeNodeViewModel>();
     this.task           = new SingleTask(this.Dispatcher);
     this.Translation    = new ControlsTranslation();
 }