Пример #1
0
		internal void OnColumnReordered(TreeColumn column)
		{
            this.InvalidateNodeControlCache();

			if (ColumnReordered != null)
				ColumnReordered(this, new TreeColumnEventArgs(column));
		}
Пример #2
0
 public ResizeColumnState(TreeViewAdv tree, TreeColumn column, Point p)
     : base(tree)
 {
     _column = column;
     _initLocation = p;
     _initWidth = column.Width;
 }
		public ReorderColumnState(TreeViewAdv tree, TreeColumn column, Point initialMouseLocation)
			: base(tree, column)
		{
			_location = new Point(initialMouseLocation.X + Tree.OffsetX, 0);
			_dragOffset = tree.GetColumnX(column) - initialMouseLocation.X;
			_ghostImage = column.CreateGhostImage(new Rectangle(0, 0, column.Width, tree.ActualColumnHeaderHeight), tree.Font);
		}
Пример #4
0
        public ProcessTree()
        {
            InitializeComponent();

            var column = new TreeColumn("CPU History", 60);

            column.IsVisible = false;
            column.MinColumnWidth = 10;
            treeProcesses.Columns.Add(column);
            treeProcesses.NodeControls.Add(new ProcessHacker.Components.NodePlotter()
            {
                DataPropertyName = "CpuHistory",
                ParentColumn = column
            });

            column = new TreeColumn("I/O History", 60);
            column.IsVisible = false;
            column.MinColumnWidth = 10;
            treeProcesses.Columns.Add(column);
            treeProcesses.NodeControls.Add(new ProcessHacker.Components.NodePlotter()
            {
                DataPropertyName = "IoHistory",
                ParentColumn = column
            });

            treeProcesses.KeyDown += new KeyEventHandler(ProcessTree_KeyDown);
            treeProcesses.MouseDown += new MouseEventHandler(treeProcesses_MouseDown);
            treeProcesses.MouseUp += new MouseEventHandler(treeProcesses_MouseUp);
            treeProcesses.DoubleClick += new EventHandler(treeProcesses_DoubleClick);

            nodeName.ToolTipProvider = _tooltipProvider = new ProcessToolTipProvider(this);

            // make it draw when we want it to draw :)
            treeProcesses.BeginUpdate();
        }
Пример #5
0
        public void AutoSizeColumn(TreeColumn column)
        {
            if (!Columns.Contains(column))
                throw new ArgumentException("column");

            DrawContext context = new DrawContext();
            context.Graphics = Graphics.FromImage(new Bitmap(1, 1));
            context.Font = this.Font;
            int res = 0;
            for (int row = 0; row < RowCount; row++)
            {
                if (row < RowMap.Count)
                {
                    int w = 0;
                    TreeNodeAdv node = RowMap[row];
                    foreach (NodeControl nc in NodeControls)
                    {
                        if (nc.ParentColumn == column)
                            w += nc.GetActualSize(node, _measureContext).Width;
                    }
                    res = Math.Max(res, w);
                }
            }

            if (res > 0)
                column.Width = res;
        }
		public override bool MouseMove(MouseEventArgs args)
		{
			_dropColumn = null;
			_location = new Point(args.X + Tree.OffsetX, 0);
			int x = 0;
			foreach (TreeColumn c in Tree.Columns)
			{
				if (c.IsVisible)
				{
					if (_location.X < x + c.Width / 2)
					{
						_dropColumn = c;
						break;
					}
					x += c.Width;
				}
			}
			Tree.UpdateHeaders();
			return true;
		}
Пример #7
0
        private void DrawColumnHeaders(Graphics gr)
        {
            PerformanceAnalyzer.Start("DrawColumnHeaders");
            ReorderColumnState reorder = Input as ReorderColumnState;
            int x = 0;

            TreeColumn.DrawBackground(gr, new Rectangle(0, 0, ClientRectangle.Width + 2, ColumnHeaderHeight - 1), false, false);
            gr.TranslateTransform(-OffsetX, 0);
            foreach (TreeColumn c in Columns)
            {
                if (c.IsVisible)
                {
                    if (x >= OffsetX && x - OffsetX < this.Bounds.Width)                    // skip invisible columns
                    {
                        Rectangle rect = new Rectangle(x, 0, c.Width, ColumnHeaderHeight - 1);
                        gr.SetClip(rect);
                        bool pressed = ((Input is ClickColumnState || reorder != null) && ((Input as ColumnState).Column == c));
                        c.Draw(gr, rect, Font, pressed, _hotColumn == c);
                        gr.ResetClip();

                        if (reorder != null && reorder.DropColumn == c)
                        {
                            TreeColumn.DrawDropMark(gr, rect);
                        }
                    }
                    x += c.Width;
                }
            }

            if (reorder != null)
            {
                if (reorder.DropColumn == null)
                {
                    TreeColumn.DrawDropMark(gr, new Rectangle(x, 0, 0, ColumnHeaderHeight));
                }
                gr.DrawImage(reorder.GhostImage, new Point(reorder.Location.X +  +reorder.DragOffset, reorder.Location.Y));
            }
            PerformanceAnalyzer.Finish("DrawColumnHeaders");
        }
Пример #8
0
        public ProcessTree()
        {
            InitializeComponent();

            TreeColumn column = new TreeColumn("CPU History", 60)
            {
                IsVisible = false, 
                MinColumnWidth = 10
            };

            treeProcesses.Columns.Add(column);
            treeProcesses.NodeControls.Add(new Components.NodePlotter
            {
                DataPropertyName = "CpuHistory",
                ParentColumn = column
            });

            column = new TreeColumn("I/O History", 60)
            {
                IsVisible = false, 
                MinColumnWidth = 10
            };
            treeProcesses.Columns.Add(column);
            treeProcesses.NodeControls.Add(new Components.NodePlotter
            {
                DataPropertyName = "IoHistory",
                ParentColumn = column
            });

            treeProcesses.KeyDown += this.ProcessTree_KeyDown;
            treeProcesses.MouseDown += this.treeProcesses_MouseDown;
            treeProcesses.MouseUp += this.treeProcesses_MouseUp;
            treeProcesses.DoubleClick += this.treeProcesses_DoubleClick;

            nodeName.ToolTipProvider = _tooltipProvider = new ProcessToolTipProvider(this);

            // make it draw when we want it to draw :)
            treeProcesses.BeginUpdate();
        }
        private void DrawColumnHeaders(Graphics gr)
        {
            ReorderColumnState reorder = Input as ReorderColumnState;

            int x = 0;

            TreeColumn.DrawBackground(gr, new Rectangle(0, 0, ClientRectangle.Width + 10, ColumnHeaderHeight), false, false);
            gr.TranslateTransform(-OffsetX, 0);

            foreach (TreeColumn c in Columns)
            {
                if (c.IsVisible)
                {
                    Rectangle rect    = new Rectangle(x, 0, c.Width, ColumnHeaderHeight);
                    bool      pressed = HeaderStyle == ColumnHeaderStyle.Clickable && ((Input is ClickColumnState || reorder != null) && ((Input as ColumnState).Column == c));
                    bool      hot     = HeaderStyle == ColumnHeaderStyle.Clickable && _hotColumn == c;
                    c.Draw(gr, rect, Font, pressed, hot);

                    if (reorder != null && reorder.DropColumn == c)
                    {
                        TreeColumn.DrawDropMark(gr, rect);
                    }

                    x += c.Width;
                }
            }

            if (reorder != null)
            {
                if (reorder.DropColumn == null)
                {
                    TreeColumn.DrawDropMark(gr, new Rectangle(x, 0, 0, ColumnHeaderHeight));
                }
                gr.DrawImage(reorder.GhostImage, reorder.Location);
            }
        }
Пример #10
0
 private void UpdateToolTip(MouseEventArgs e)
 {
     TreeColumn col = GetColumnAt(e.Location);
     if (col != null)
     {
         if (col != _tooltipColumn)
             SetTooltip(col.TooltipText);
     }
     else
         DisplayNodesTooltip(e);
     _tooltipColumn = col;
 }
Пример #11
0
        private void OrderNodes(TreeColumn column)
        {
            List<Node> Ordered = new List<Node>();

            if (column.SortOrder == SortOrder.Ascending)
            {
                Ordered = Model.Nodes.OrderBy(x => column.Index == 0 ? (x as MyNode).Text : (x as MyNode).DetectedText).ToList();
            } else
            {
                Ordered = Model.Nodes.OrderByDescending(x => column.Index == 0 ? (x as MyNode).Text : (x as MyNode).DetectedText).ToList();
            }

            treeView1.BeginUpdate();
            Model.Nodes.Clear();
            foreach (MyNode item in Ordered)
            {
                Model.Nodes.Add(item);
            }
            treeView1.EndUpdate();
        }
Пример #12
0
 public ClickColumnState(TreeViewAdv tree, TreeColumn column, Point location)
     : base(tree, column)
 {
     _location = location;
 }
Пример #13
0
 internal void OnColumnClicked(TreeColumn column)
 {
     if (ColumnClicked != null)
     ColumnClicked(this, new TreeColumnEventArgs(column));
 }
Пример #14
0
 public NodeSorter(TreeColumn aColumn, TreeViewAdv aTreeView)
 {
     _aColumn = aColumn;
     _aTreeView = aTreeView;
 }
Пример #15
0
		public TreeColumnEventArgs(TreeColumn column)
		{
			_column = column;
		}
 public ReorderColumnState(TreeViewAdv tree, TreeColumn column, Point p)
     : base(tree, column)
 {
     _location   = _initLocation = new Point(p.X, 0);
     _ghostImage = column.CreateGhostImage(new Rectangle(0, 0, column.Width, tree.ColumnHeaderHeight), tree.Font);
 }
Пример #17
0
        }                                     // ml: added _button.

        public TreeColumnEventArgs(TreeColumn column, MouseButtons button)
        {
            _column = column;
            Button  = button;
        }
Пример #18
0
        public void LoadFrom(AssemblyGroup grp)
        {
            treeViewAdv1.BeginUpdate();

            try
            {
                while (treeViewAdv1.Columns.Count > 1)
                {
                    treeViewAdv1.Columns.RemoveAt(1);
                }

                while (treeViewAdv1.NodeControls.Count > 2)
                {
                    treeViewAdv1.NodeControls.RemoveAt(2);
                }

                treeViewAdv1.Model = new TreeModel();

                if ((grp != null) && (!grp.HasErrors))
                {
                    int divisor = Math.Max(1, grp.Assemblies.Count);
                    int colWidth = Math.Max(1, (treeViewAdv1.ClientRectangle.Width - treeViewAdv1.Columns[0].Width - System.Windows.Forms.SystemInformation.VerticalScrollBarWidth - 5) / divisor);

                    int col = 0;
                    foreach (AssemblyDetail ad in grp.Assemblies)
                    {
                        TreeColumn tc = new TreeColumn();
                        tc.Header = ad.Location;
                        tc.TooltipText = tc.Header;
                        tc.Width = colWidth;
                        treeViewAdv1.Columns.Add(tc);

                        DetailChangeNodeControl dnc = new DetailChangeNodeControl(col++);
                        dnc.ParentColumn = tc;
                        dnc.DisplayHiddenContentInToolTip = true;
                        dnc.EditEnabled = false;
                        dnc.Trimming = StringTrimming.EllipsisCharacter;

                        treeViewAdv1.NodeControls.Add(dnc);
                    }

                    treeViewAdv1.Model = new AssemblyGroupModel(grp);
                    //treeViewAdv1.Root.Children[0].Expand();
                }
            }
            finally
            {
                treeViewAdv1.EndUpdate();
            }
        }
Пример #19
0
 public ColumnState(TreeViewAdv tree, TreeColumn column)
     : base(tree)
 {
     _column = column;
 }
Пример #20
0
 public ResizeColumnState(TreeViewAdv tree, TreeColumn column, Point p)
     : base(tree, column)
 {
     _initLocation = p;
     _initWidth    = column.Width;
 }
Пример #21
0
 public TreeColumnEventArgs(TreeColumn column, MouseButtons button)
 {
     _column = column;
       Button = button;
 }
Пример #22
0
		internal void ChangeColumnHeight(TreeColumn column)
		{
			if (!(_input is ResizeColumnState))
			{
                SmartFullUpdate();
				OnColumnHeightChanged(column);
			}
		}
Пример #23
0
 protected void Sort(TreeColumn aColumn)
 {
     _sortedTreeModel.Comparer = new NodeSorter(aColumn, this);
 }
		public ColumnState(TreeViewAdv tree, TreeColumn column)
			: base(tree)
		{
			_column = column;
		}
 public ClickColumnState(TreeViewAdv tree, TreeColumn column, Point location)
     : base(tree, column)
 {
     _location = location;
 }
        public void ReconfigureTreeColumns() {
			if (!DataLayer.IsConnected) {
				return;
			}

            tvWorkitems.HideEditor();
            tvWorkitems.Columns.Clear();
            tvWorkitems.NodeControls.Clear();
            columnToAttributeMappings.Clear();

			foreach (var column in configuration.GridSettings.Columns) {
                if (column.EffortTracking && !DataLayer.EffortTracking.TrackEffort) {
					continue;
				}
                var columnName = DataLayer.LocalizerResolve(column.Name);
                var dataPropertyName = columnName.Replace(" ", string.Empty);

                columnToAttributeMappings.Add(dataPropertyName, column.Attribute);

                var treeColumn = new TreeColumn(columnName, column.Width) { SortOrder = SortOrder.None, TooltipText = dataPropertyName };

			    switch(column.Type) {
                    case "String":
                    case "Effort":
                        var textEditor = new CustomNodeTextBox();
                        ConfigureEditor(textEditor, dataPropertyName);
                        textEditor.EditEnabled = !textEditor.IsReadOnly;
                        textEditor.IsColumnReadOnly = column.ReadOnly;
                        textEditor.ParentColumn = treeColumn;
                        textEditor.IsEditEnabledValueNeeded += CheckCellEditability;
                        tvWorkitems.NodeControls.Add(textEditor);
                        textEditor.KeyTextBoxDown += tvWorkitems_PreviewKeyDown;
                        break;
                    case "List":
                        var listEditor = new NodeComboBox();
                        ConfigureEditor(listEditor, dataPropertyName);
                        listEditor.EditEnabled = !column.ReadOnly;
                        listEditor.ParentColumn = treeColumn;
                        listEditor.IsEditEnabledValueNeeded += CheckCellEditability;
                        tvWorkitems.NodeControls.Add(listEditor);
                        listEditor.KeyComboBoxDown += tvWorkitems_PreviewKeyDown;
                        break;
                    case "Multi":
			            var listBoxEditor = new NodeListBox {ParentTree = tvWorkitems};
			            ConfigureEditor(listBoxEditor, dataPropertyName);
                        listBoxEditor.EditEnabled = !column.ReadOnly;
                        listBoxEditor.ParentColumn = treeColumn;
                        listBoxEditor.IsEditEnabledValueNeeded += CheckCellEditability;
                        tvWorkitems.NodeControls.Add(listBoxEditor);
                        listBoxEditor.KeyListBoxDown += tvWorkitems_PreviewKeyDown;
                        break;
                    default:
                        throw new NotSupportedException();
                }

				tvWorkitems.Columns.Add(treeColumn);
			}

            AddStateIcon();
        }
Пример #27
0
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.components = new System.ComponentModel.Container();
			System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ComplexConcMorphDlg));
			this.m_btnHelp = new System.Windows.Forms.Button();
			this.m_btnCancel = new System.Windows.Forms.Button();
			this.m_btnOK = new System.Windows.Forms.Button();
			this.m_helpProvider = new System.Windows.Forms.HelpProvider();
			this.groupBox2 = new System.Windows.Forms.GroupBox();
			this.m_glossWsComboBox = new System.Windows.Forms.ComboBox();
			this.m_glossTextBox = new SIL.FieldWorks.Common.Widgets.FwTextBox();
			this.groupBox3 = new System.Windows.Forms.GroupBox();
			this.m_entryWsComboBox = new System.Windows.Forms.ComboBox();
			this.m_entryTextBox = new SIL.FieldWorks.Common.Widgets.FwTextBox();
			this.groupBox1 = new System.Windows.Forms.GroupBox();
			this.m_formWsComboBox = new System.Windows.Forms.ComboBox();
			this.m_formTextBox = new SIL.FieldWorks.Common.Widgets.FwTextBox();
			this.groupBox4 = new System.Windows.Forms.GroupBox();
			this.m_categoryNotCheckBox = new System.Windows.Forms.CheckBox();
			this.m_categoryComboBox = new SIL.FieldWorks.Common.Widgets.TreeCombo();
			this.groupBox5 = new System.Windows.Forms.GroupBox();
			this.m_inflFeatsTreeView = new Aga.Controls.Tree.TreeViewAdv();
			this.m_featureColumn = new Aga.Controls.Tree.TreeColumn();
			this.m_notColumn = new Aga.Controls.Tree.TreeColumn();
			this.m_valueColumn = new Aga.Controls.Tree.TreeColumn();
			this.m_featureIcon = new Aga.Controls.Tree.NodeControls.NodeIcon();
			this.m_featureTextBox = new Aga.Controls.Tree.NodeControls.NodeTextBox();
			this.m_valueComboBox = new Aga.Controls.Tree.NodeControls.NodeComboBox();
			this.m_inflNotCheckBox = new Aga.Controls.Tree.NodeControls.NodeCheckBox();
			this.m_imageList = new System.Windows.Forms.ImageList(this.components);
			this.groupBox2.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.m_glossTextBox)).BeginInit();
			this.groupBox3.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.m_entryTextBox)).BeginInit();
			this.groupBox1.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.m_formTextBox)).BeginInit();
			this.groupBox4.SuspendLayout();
			this.groupBox5.SuspendLayout();
			this.SuspendLayout();
			//
			// m_btnHelp
			//
			resources.ApplyResources(this.m_btnHelp, "m_btnHelp");
			this.m_btnHelp.Name = "m_btnHelp";
			this.m_btnHelp.UseVisualStyleBackColor = true;
			this.m_btnHelp.Click += new System.EventHandler(this.m_btnHelp_Click);
			//
			// m_btnCancel
			//
			resources.ApplyResources(this.m_btnCancel, "m_btnCancel");
			this.m_btnCancel.Name = "m_btnCancel";
			this.m_btnCancel.UseVisualStyleBackColor = true;
			this.m_btnCancel.Click += new System.EventHandler(this.m_btnCancel_Click);
			//
			// m_btnOK
			//
			resources.ApplyResources(this.m_btnOK, "m_btnOK");
			this.m_btnOK.Name = "m_btnOK";
			this.m_btnOK.UseVisualStyleBackColor = true;
			this.m_btnOK.Click += new System.EventHandler(this.m_btnOK_Click);
			//
			// groupBox2
			//
			this.groupBox2.Controls.Add(this.m_glossWsComboBox);
			this.groupBox2.Controls.Add(this.m_glossTextBox);
			resources.ApplyResources(this.groupBox2, "groupBox2");
			this.groupBox2.Name = "groupBox2";
			this.m_helpProvider.SetShowHelp(this.groupBox2, ((bool)(resources.GetObject("groupBox2.ShowHelp"))));
			this.groupBox2.TabStop = false;
			//
			// m_glossWsComboBox
			//
			this.m_glossWsComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
			this.m_glossWsComboBox.FormattingEnabled = true;
			resources.ApplyResources(this.m_glossWsComboBox, "m_glossWsComboBox");
			this.m_glossWsComboBox.Name = "m_glossWsComboBox";
			this.m_helpProvider.SetShowHelp(this.m_glossWsComboBox, ((bool)(resources.GetObject("m_glossWsComboBox.ShowHelp"))));
			this.m_glossWsComboBox.SelectedIndexChanged += new System.EventHandler(this.m_glossWsComboBox_SelectedIndexChanged);
			//
			// m_glossTextBox
			//
			this.m_glossTextBox.AcceptsReturn = false;
			this.m_glossTextBox.AdjustStringHeight = true;
			this.m_glossTextBox.BackColor = System.Drawing.SystemColors.Window;
			this.m_glossTextBox.controlID = null;
			resources.ApplyResources(this.m_glossTextBox, "m_glossTextBox");
			this.m_glossTextBox.HasBorder = true;
			this.m_glossTextBox.Name = "m_glossTextBox";
			this.m_helpProvider.SetShowHelp(this.m_glossTextBox, ((bool)(resources.GetObject("m_glossTextBox.ShowHelp"))));
			this.m_glossTextBox.SuppressEnter = true;
			this.m_glossTextBox.WordWrap = false;
			//
			// groupBox3
			//
			this.groupBox3.Controls.Add(this.m_entryWsComboBox);
			this.groupBox3.Controls.Add(this.m_entryTextBox);
			resources.ApplyResources(this.groupBox3, "groupBox3");
			this.groupBox3.Name = "groupBox3";
			this.m_helpProvider.SetShowHelp(this.groupBox3, ((bool)(resources.GetObject("groupBox3.ShowHelp"))));
			this.groupBox3.TabStop = false;
			//
			// m_entryWsComboBox
			//
			this.m_entryWsComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
			this.m_entryWsComboBox.FormattingEnabled = true;
			resources.ApplyResources(this.m_entryWsComboBox, "m_entryWsComboBox");
			this.m_entryWsComboBox.Name = "m_entryWsComboBox";
			this.m_helpProvider.SetShowHelp(this.m_entryWsComboBox, ((bool)(resources.GetObject("m_entryWsComboBox.ShowHelp"))));
			this.m_entryWsComboBox.SelectedIndexChanged += new System.EventHandler(this.m_entryWsComboBox_SelectedIndexChanged);
			//
			// m_entryTextBox
			//
			this.m_entryTextBox.AcceptsReturn = false;
			this.m_entryTextBox.AdjustStringHeight = true;
			this.m_entryTextBox.BackColor = System.Drawing.SystemColors.Window;
			this.m_entryTextBox.controlID = null;
			resources.ApplyResources(this.m_entryTextBox, "m_entryTextBox");
			this.m_entryTextBox.HasBorder = true;
			this.m_entryTextBox.Name = "m_entryTextBox";
			this.m_helpProvider.SetShowHelp(this.m_entryTextBox, ((bool)(resources.GetObject("m_entryTextBox.ShowHelp"))));
			this.m_entryTextBox.SuppressEnter = true;
			this.m_entryTextBox.WordWrap = false;
			//
			// groupBox1
			//
			this.groupBox1.Controls.Add(this.m_formWsComboBox);
			this.groupBox1.Controls.Add(this.m_formTextBox);
			resources.ApplyResources(this.groupBox1, "groupBox1");
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.TabStop = false;
			//
			// m_formWsComboBox
			//
			this.m_formWsComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
			this.m_formWsComboBox.FormattingEnabled = true;
			resources.ApplyResources(this.m_formWsComboBox, "m_formWsComboBox");
			this.m_formWsComboBox.Name = "m_formWsComboBox";
			this.m_formWsComboBox.SelectedIndexChanged += new System.EventHandler(this.m_formWsComboBox_SelectedIndexChanged);
			//
			// m_formTextBox
			//
			this.m_formTextBox.AcceptsReturn = false;
			this.m_formTextBox.AdjustStringHeight = true;
			this.m_formTextBox.BackColor = System.Drawing.SystemColors.Window;
			this.m_formTextBox.controlID = null;
			resources.ApplyResources(this.m_formTextBox, "m_formTextBox");
			this.m_formTextBox.HasBorder = true;
			this.m_formTextBox.Name = "m_formTextBox";
			this.m_formTextBox.SuppressEnter = true;
			this.m_formTextBox.WordWrap = false;
			//
			// groupBox4
			//
			this.groupBox4.Controls.Add(this.m_categoryNotCheckBox);
			this.groupBox4.Controls.Add(this.m_categoryComboBox);
			resources.ApplyResources(this.groupBox4, "groupBox4");
			this.groupBox4.Name = "groupBox4";
			this.groupBox4.TabStop = false;
			//
			// m_categoryNotCheckBox
			//
			resources.ApplyResources(this.m_categoryNotCheckBox, "m_categoryNotCheckBox");
			this.m_categoryNotCheckBox.Name = "m_categoryNotCheckBox";
			this.m_categoryNotCheckBox.UseVisualStyleBackColor = true;
			//
			// m_categoryComboBox
			//
			this.m_categoryComboBox.AdjustStringHeight = true;
			this.m_categoryComboBox.BackColor = System.Drawing.SystemColors.Window;
			this.m_categoryComboBox.DropDownWidth = 120;
			this.m_categoryComboBox.DroppedDown = false;
			this.m_categoryComboBox.HasBorder = true;
			resources.ApplyResources(this.m_categoryComboBox, "m_categoryComboBox");
			this.m_categoryComboBox.Name = "m_categoryComboBox";
			this.m_categoryComboBox.UseVisualStyleBackColor = true;
			//
			// groupBox5
			//
			this.groupBox5.Controls.Add(this.m_inflFeatsTreeView);
			resources.ApplyResources(this.groupBox5, "groupBox5");
			this.groupBox5.Name = "groupBox5";
			this.groupBox5.TabStop = false;
			//
			// m_inflFeatsTreeView
			//
			this.m_inflFeatsTreeView.BackColor = System.Drawing.SystemColors.Window;
			this.m_inflFeatsTreeView.Columns.Add(this.m_featureColumn);
			this.m_inflFeatsTreeView.Columns.Add(this.m_notColumn);
			this.m_inflFeatsTreeView.Columns.Add(this.m_valueColumn);
			this.m_inflFeatsTreeView.DefaultToolTipProvider = null;
			this.m_inflFeatsTreeView.DragDropMarkColor = System.Drawing.Color.Black;
			this.m_inflFeatsTreeView.FullRowSelect = true;
			this.m_inflFeatsTreeView.LineColor = System.Drawing.SystemColors.ControlDark;
			resources.ApplyResources(this.m_inflFeatsTreeView, "m_inflFeatsTreeView");
			this.m_inflFeatsTreeView.Model = null;
			this.m_inflFeatsTreeView.Name = "m_inflFeatsTreeView";
			this.m_inflFeatsTreeView.NodeControls.Add(this.m_featureIcon);
			this.m_inflFeatsTreeView.NodeControls.Add(this.m_featureTextBox);
			this.m_inflFeatsTreeView.NodeControls.Add(this.m_valueComboBox);
			this.m_inflFeatsTreeView.NodeControls.Add(this.m_inflNotCheckBox);
			this.m_inflFeatsTreeView.SelectedNode = null;
			this.m_inflFeatsTreeView.UseColumns = true;
			//
			// m_featureColumn
			//
			resources.ApplyResources(this.m_featureColumn, "m_featureColumn");
			this.m_featureColumn.SortOrder = System.Windows.Forms.SortOrder.None;
			//
			// m_notColumn
			//
			resources.ApplyResources(this.m_notColumn, "m_notColumn");
			this.m_notColumn.SortOrder = System.Windows.Forms.SortOrder.None;
			//
			// m_valueColumn
			//
			resources.ApplyResources(this.m_valueColumn, "m_valueColumn");
			this.m_valueColumn.SortOrder = System.Windows.Forms.SortOrder.None;
			//
			// m_featureIcon
			//
			this.m_featureIcon.DataPropertyName = "Image";
			this.m_featureIcon.LeftMargin = 1;
			this.m_featureIcon.ParentColumn = this.m_featureColumn;
			this.m_featureIcon.ScaleMode = Aga.Controls.Tree.ImageScaleMode.Clip;
			//
			// m_featureTextBox
			//
			this.m_featureTextBox.DataPropertyName = "Text";
			this.m_featureTextBox.IncrementalSearchEnabled = true;
			this.m_featureTextBox.LeftMargin = 1;
			this.m_featureTextBox.ParentColumn = this.m_featureColumn;
			//
			// m_valueComboBox
			//
			this.m_valueComboBox.DataPropertyName = "Value";
			this.m_valueComboBox.EditEnabled = true;
			this.m_valueComboBox.EditOnClick = true;
			this.m_valueComboBox.IncrementalSearchEnabled = true;
			this.m_valueComboBox.LeftMargin = 1;
			this.m_valueComboBox.ParentColumn = this.m_valueColumn;
			this.m_valueComboBox.CreatingEditor += new System.EventHandler<Aga.Controls.Tree.NodeControls.EditEventArgs>(this.m_valueComboBox_CreatingEditor);
			this.m_valueComboBox.IsEditEnabledValueNeeded += new System.EventHandler<Aga.Controls.Tree.NodeControls.NodeControlValueEventArgs>(this.m_valueComboBox_IsEditEnabledValueNeeded);
			//
			// m_inflNotCheckBox
			//
			this.m_inflNotCheckBox.DataPropertyName = "IsChecked";
			this.m_inflNotCheckBox.EditEnabled = true;
			this.m_inflNotCheckBox.LeftMargin = 1;
			this.m_inflNotCheckBox.ParentColumn = this.m_notColumn;
			this.m_inflNotCheckBox.IsVisibleValueNeeded += new System.EventHandler<Aga.Controls.Tree.NodeControls.NodeControlValueEventArgs>(this.m_inflNotCheckBox_IsVisibleValueNeeded);
			//
			// m_imageList
			//
			this.m_imageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("m_imageList.ImageStream")));
			this.m_imageList.TransparentColor = System.Drawing.Color.Transparent;
			this.m_imageList.Images.SetKeyName(0, "");
			this.m_imageList.Images.SetKeyName(1, "");
			//
			// ComplexConcMorphDlg
			//
			this.AcceptButton = this.m_btnOK;
			resources.ApplyResources(this, "$this");
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			this.CancelButton = this.m_btnCancel;
			this.Controls.Add(this.groupBox5);
			this.Controls.Add(this.groupBox4);
			this.Controls.Add(this.groupBox3);
			this.Controls.Add(this.groupBox2);
			this.Controls.Add(this.groupBox1);
			this.Controls.Add(this.m_btnHelp);
			this.Controls.Add(this.m_btnCancel);
			this.Controls.Add(this.m_btnOK);
			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
			this.MaximizeBox = false;
			this.MinimizeBox = false;
			this.Name = "ComplexConcMorphDlg";
			this.m_helpProvider.SetShowHelp(this, ((bool)(resources.GetObject("$this.ShowHelp"))));
			this.ShowIcon = false;
			this.ShowInTaskbar = false;
			this.groupBox2.ResumeLayout(false);
			((System.ComponentModel.ISupportInitialize)(this.m_glossTextBox)).EndInit();
			this.groupBox3.ResumeLayout(false);
			((System.ComponentModel.ISupportInitialize)(this.m_entryTextBox)).EndInit();
			this.groupBox1.ResumeLayout(false);
			((System.ComponentModel.ISupportInitialize)(this.m_formTextBox)).EndInit();
			this.groupBox4.ResumeLayout(false);
			this.groupBox4.PerformLayout();
			this.groupBox5.ResumeLayout(false);
			this.ResumeLayout(false);

		}
 public ReorderColumnState(TreeViewAdv tree, TreeColumn column, Point p)
     : base(tree, column)
 {
     _location = _initLocation = new Point(p.X, 0);
     _ghostImage = column.CreateGhostImage(new Rectangle(0, 0, column.Width, tree.ColumnHeaderHeight), tree.Font);
 }
Пример #29
0
        private void InitializeColumnHeaders()
        {
            // 
            // tcProcessIcon
            // 
            _tcProcessIcon = new TreeColumn
                                 {
                                     Header = "Process",
                                     SortOrder = SortOrder.None,
                                     TooltipText = null,
                                     Width = 250
                                 };

            // 
            // tcProcessPid
            // 
            _tcProcessPid = new TreeColumn
                                {
                                    Header = "Pid",
                                    SortOrder = SortOrder.None,
                                    TooltipText = null
                                };
        }
Пример #30
0
 internal void ChangeColumnWidth(TreeColumn column)
 {
     if (!(_input is ResizeColumnState))
        {
     FullUpdate();
     OnColumnWidthChanged(column);
        }
 }
        protected override void OnMouseDown(MouseEventArgs e)
        {
            if (!Focused)
            {
                Focus();
            }

            _search.EndSearch();


            TreeColumn c = null;

            // ml: added support for right button.
            switch (e.Button)
            {
            case MouseButtons.Left:
            {
                c = GetColumnDividerAt(e.Location);
                if (c != null)
                {
                    Input = new ResizeColumnState(this, c, e.Location);
                }
                else
                {
                    c = GetColumnAt(e.Location);
                    if (c != null)
                    {
                        Input = new ClickColumnState(this, c, e.Location);
                        UpdateView();
                    }
                }
                break;
            }

            case MouseButtons.Right:
            {
                c = GetColumnAt(e.Location);
                if (c != null)
                {
                    Input = new ClickColumnState(this, c, e.Location);
                }
                break;
            }
            }

            if (c == null)
            {
                ChangeInput();
            }

            TreeNodeAdvMouseEventArgs args = CreateMouseArgs(e);

            if (args.Node != null && args.Control != null)
            {
                args.Control.MouseDown(args);
            }

            if (!args.Handled)
            {
                Input.MouseDown(args);
            }

            base.OnMouseDown(e);
        }
Пример #32
0
 internal void OnColumnWidthChanged(TreeColumn column)
 {
     if (ColumnWidthChanged != null)
     ColumnWidthChanged(this, new TreeColumnEventArgs(column));
 }
Пример #33
0
 protected internal virtual void OnColumnWidthChanged(TreeColumn column)
 {
     if (ColumnWidthChanged != null)
         ColumnWidthChanged(this, new TreeColumnEventArgs(column, MouseButtons.Left));
 }
 public TreeColumnEventArgs(TreeColumn column)
 {
     _column = column;
 }
Пример #35
0
        /// <summary>
        /// Loads column settings from a string to a TreeViewAdv.
        /// </summary>
        /// <param name="settings"></param>
        /// <param name="tv"></param>
        public static void LoadSettings(string settings, TreeViewAdv tv)
        {
            if (settings.EndsWith("|"))
                settings = settings.Remove(settings.Length - 1, 1);

            string[] list = settings.Split('|');

            try
            {
                Dictionary<NodeControl, string> oldAssoc = new Dictionary<NodeControl, string>();

                foreach (NodeControl control in tv.NodeControls)
                {
                    oldAssoc.Add(control, control.ParentColumn.Header);
                }

                TreeColumn[] newColumns = new TreeColumn[tv.Columns.Count];
                Dictionary<string, TreeColumn> newColumnsD = new Dictionary<string,TreeColumn>();

                for (int i = 0; i < tv.Columns.Count; i++)
                {
                    string[] s = list[i].Split(',');

                    newColumns[i] = new TreeColumn(s[0], Int32.Parse(s[1]));
                    newColumns[i].SortOrder = (SortOrder)Enum.Parse(typeof(SortOrder), s[2]);
                    newColumns[i].IsVisible = bool.Parse(s[3]);
                    newColumns[i].MinColumnWidth = 3;
                    newColumnsD.Add(s[0], newColumns[i]);
                }

                tv.Columns.Clear();

                foreach (TreeColumn column in newColumns)
                    tv.Columns.Add(column);

                foreach (NodeControl c in oldAssoc.Keys)
                    c.ParentColumn = newColumnsD[oldAssoc[c]];
            }
            catch
            { }
        }
Пример #36
0
 internal int GetColumnX(TreeColumn column)
 {
     int x = -OffsetX;
     foreach (TreeColumn col in Columns)
     {
         if (col.IsVisible)
         {
             if (column == col)
                 return x;
             else
                 x += col.Width;
         }
     }
     return x;
 }
        private void InitializeColumnStageProject()
        {
            #region Инициализация столбцов Этапов
            treeProject.UseColumns = true;

            TreeColumn columnName = new TreeColumn("Этап", 120);
            TreeColumn columnNameStage = new TreeColumn("Название", 150);
            TreeColumn columnUser = new TreeColumn("Ответственный", 160);
            TreeColumn columnDateBegin = new TreeColumn("Начало (план)", 60);
            TreeColumn columnDateEnd = new TreeColumn("Завершение (план)", 60);
            TreeColumn columnDateBeginUser = new TreeColumn("Начало (пользв.)", 60);

            TreeColumn columnDateEndUser = new TreeColumn("Завершение (пользв.)", 60);
            TreeColumn columnStatus = new TreeColumn("Статус", 60);
            TreeColumn columnDateBeginProg = new TreeColumn("Начало (прогноз)", 60);
            TreeColumn columnDateEndProg = new TreeColumn("Завершение (прогноз)", 60);
            TreeColumn columnComment = new TreeColumn("Комментарий", 200);

            //treeProject.Columns.Add(columnName);
            treeProject.Columns.Add(columnNameStage);
            treeProject.Columns.Add(columnUser);
            treeProject.Columns.Add(columnDateBegin);
            treeProject.Columns.Add(columnDateEnd);
            treeProject.Columns.Add(columnDateBeginUser);
            treeProject.Columns.Add(columnDateEndUser);
            treeProject.Columns.Add(columnStatus);
            treeProject.Columns.Add(columnDateBeginProg);
            treeProject.Columns.Add(columnDateEndProg);
            treeProject.Columns.Add(columnComment);

            NodeCheckBox nodeCheck = new NodeCheckBox();
            nodeCheck.ParentColumn = columnNameStage;
            //nodeCheck.ThreeState = true;
            nodeCheck.VirtualMode = false;
            nodeCheck.EditEnabled = true;
            //nodeCheck.IsEditEnabledValueNeeded += IsEditEnabledValueNeeded;
            treeProject.NodeControls.Add(nodeCheck);

            NodeTextBox nodeTextName = new NodeTextBox();
            nodeTextName.DataPropertyName = "NameStage";
            nodeTextName.ParentColumn = columnNameStage;
            nodeTextName.IncrementalSearchEnabled = true;
            treeProject.NodeControls.Add(nodeTextName);

            NodeTextBox nodeTextUser = new NodeTextBox();
            nodeTextUser.DataPropertyName = "User";
            nodeTextUser.ParentColumn = columnUser;
            nodeTextUser.IncrementalSearchEnabled = true;
            treeProject.NodeControls.Add(nodeTextUser);

            NodeTextBox nodeTextDateBegin = new NodeTextBox();
            nodeTextDateBegin.DataPropertyName = "DateBegin";
            nodeTextDateBegin.ParentColumn = columnDateBegin;
            nodeTextDateBegin.IncrementalSearchEnabled = true;
            treeProject.NodeControls.Add(nodeTextDateBegin);

            NodeTextBox nodeTextDateEnd = new NodeTextBox();
            nodeTextDateEnd.DataPropertyName = "DateEnd";
            nodeTextDateEnd.ParentColumn = columnDateEnd;
            nodeTextDateEnd.IncrementalSearchEnabled = true;
            treeProject.NodeControls.Add(nodeTextDateEnd);

            NodeTextBox nodeTextDateBeginUser = new NodeTextBox();
            nodeTextDateBeginUser.DataPropertyName = "DateBeginUser";
            nodeTextDateBeginUser.ParentColumn = columnDateBeginUser;
            nodeTextDateBeginUser.IncrementalSearchEnabled = true;
            treeProject.NodeControls.Add(nodeTextDateBeginUser);

            NodeTextBox nodeTextDateEndUser = new NodeTextBox();
            nodeTextDateEndUser.DataPropertyName = "DateEndUser";
            nodeTextDateEndUser.ParentColumn = columnDateEndUser;
            nodeTextDateEndUser.IncrementalSearchEnabled = false;


            treeProject.NodeControls.Add(nodeTextDateEndUser);

            NodeTextBox nodeTextStatus = new NodeTextBox();
            nodeTextStatus.DataPropertyName = "Status";
            nodeTextStatus.ParentColumn = columnStatus;
            nodeTextStatus.IncrementalSearchEnabled = true;
            treeProject.NodeControls.Add(nodeTextStatus);

            NodeTextBox nodeTextDateBeginProg = new NodeTextBox();
            nodeTextDateBeginProg.DataPropertyName = "DateBeginProg";
            nodeTextDateBeginProg.ParentColumn = columnDateBeginProg;
            nodeTextDateBeginProg.IncrementalSearchEnabled = true;
            treeProject.NodeControls.Add(nodeTextDateBeginProg);

            NodeTextBox nodeTextDateEndProg = new NodeTextBox();
            nodeTextDateEndProg.DataPropertyName = "DateEndProg";
            nodeTextDateEndProg.ParentColumn = columnDateEndProg;
            nodeTextDateEndProg.IncrementalSearchEnabled = true;
            treeProject.NodeControls.Add(nodeTextDateEndProg);

            NodeTextBox nodeTextCommentUser = new NodeTextBox();
            nodeTextCommentUser.DataPropertyName = "CommentUser";
            nodeTextCommentUser.ParentColumn = columnComment;
            nodeTextCommentUser.IncrementalSearchEnabled = true;
            treeProject.NodeControls.Add(nodeTextCommentUser);
            #endregion
        }
Пример #38
0
 protected internal virtual void OnColumnClicked(TreeColumn column, MouseButtons button)
 {
     if (ColumnClicked != null)
         ColumnClicked(this, new TreeColumnEventArgs(column, button));
 }
Пример #39
0
 private void InvertSortOrderOf(TreeColumn aColun)
 {
     aColun.SortOrder = aColun.SortOrder == SortOrder.Ascending ? SortOrder.Descending : SortOrder.Ascending;
 }