protected void EditControl_MouseDown(object __unnamed000, MouseEventArgs e)
        {
            Point            location = this.EditControl.Location;
            PropertyTreeCore host     = this.Host;

            host.SelectedIndex = (int)((double)((float)location.Y / host.ItemHeight));
            this.Host.EnsureSelectedVisible();
        }
예제 #2
0
        public unsafe void SetVariableNoReset(GClass *type, void *var, GMeasures *measures)
        {
            this.PropTreeCore.SetVariable(type, var, measures, false);
            PropertyTreeCore propTreeCore = this.PropTreeCore;

            if (propTreeCore.SelectedIndex >= this.PropTreeCore.Items.Count)
            {
                propTreeCore.SelectedIndex = 0;
            }
            this.PropTreeCore.EnsureSelectedVisible();
            this.PropTreeCore.Refresh();
        }
예제 #3
0
        public unsafe PropertyTree(int descriptionlines, NewAssetPicker.ObjectType objecttype, NPropertyClipboard *clipboard)
        {
            this.ItemChanged          = null;
            this.SelectedIndexChanged = null;
            this.TrackSelected        = null;
            Color backColor = Color.FromKnownColor(KnownColor.Window);

            this.BackColor           = backColor;
            this.PropTreeDescription = new Label();
            Color backColor2 = Color.FromKnownColor(KnownColor.Control);

            this.PropTreeDescription.BackColor = backColor2;
            Color foreColor = Color.FromKnownColor(KnownColor.ControlText);

            this.PropTreeDescription.ForeColor   = foreColor;
            this.PropTreeDescription.BorderStyle = BorderStyle.Fixed3D;
            this.PropTreeDescription.Width       = base.Width;
            this.PropTreeDescription.Height      = (this.Font.Height + 2) * descriptionlines;
            this.PropTreeDescription.Dock        = DockStyle.Bottom;
            this.PropTreeCore = new PropertyTreeCore(base.Width, base.Height, base.Height, 2, this.PropTreeDescription, objecttype, clipboard);
            Point location = new Point(0, 20);

            this.PropTreeCore.Location = location;
            ArrayList arrayList = new ArrayList();

            arrayList.Add(new ColumnItem(new string((sbyte *)(& < Module >.?? _C@_07CKMABNOK@Setting?$AA@)), 90));
            arrayList.Add(new ColumnItem(new string((sbyte *)(& < Module >.?? _C@_05LPIJGKJ@Value?$AA@)), 70));
            IEnumerator enumerator = arrayList.GetEnumerator();
            float       proportion = 1f / (float)arrayList.Count;

            if (enumerator.MoveNext())
            {
                do
                {
                    ColumnItem columnItem = enumerator.Current as ColumnItem;
                    ColumnData columnData = new ColumnData(columnItem.Name, (int)((double)columnItem.MinWidth));
                    columnData.Proportion = proportion;
                    this.ColumnDatas.Add(columnData);
                }while (enumerator.MoveNext());
            }
            this.PropTreeHeader        = new HeaderControl(this.PropTreeCore);
            this.PropTreeHeader.Width  = this.PropTreeCore.GetViewControlWidth();
            this.PropTreeHeader.Height = 20;
            this.PropTreeCorner        = new Control();
            Point location2 = new Point(this.PropTreeHeader.Width, 0);

            this.PropTreeCorner.Location = location2;
            this.PropTreeCorner.Width    = base.Width - this.PropTreeHeader.Width;
            this.PropTreeCorner.Height   = 20;
            Color backColor3 = Color.FromKnownColor(KnownColor.Control);

            this.PropTreeCorner.BackColor = backColor3;
            int num = base.Height - this.PropTreeHeader.Height;

            this.PropTreeCore.Height = num - this.PropTreeDescription.Height;
            this.PropTreeHeader.RecalcColumnDatas();
            this.PropTreeHeader.Refresh();
            this.PropTreeCore.Refresh();
            this.OwnControls.Add(this.PropTreeHeader);
            this.OwnControls.Add(this.PropTreeCorner);
            this.OwnControls.Add(this.PropTreeCore);
            this.OwnControls.Add(this.PropTreeDescription);
            this.PropTreeCore.ItemChanged          += new PropertyTreeCore.__Delegate_ItemChanged(this.PropTreeCore_ItemChanged);
            this.PropTreeCore.SelectedIndexChanged += new PropertyTreeCore.__Delegate_SelectedIndexChanged(this.PropTreeCore_SelectedIndexChanged);
            this.PropTreeCore.TrackSelected        += new PropertyTreeCore.TrackSelectedHandler(this.PropTreeCore_TrackSelected);
        }