⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 contacttreectrl.cs

📁 破解的飞信源代码
💻 CS
📖 第 1 页 / 共 5 页
字号:
            this._crbtToMeTextCol.ColumnRec.Height = height;
            columnRec = this._crbtToBuddyTextCol.ColumnRec;
            if (num7 < columnRec.Width)
            {
                this._crbtToBuddyTextCol.ColumnRec.Width = num7;
            }
            this._crbtToMeImgCol.ColumnRec.Y = bottom;
            this._crbtToBuddyTextCol.ColumnRec.Y = bottom;
            this._crbtToBuddyTextCol.ColumnRec.Height = height;
            if (this._crbtToMeTextCol.ColumnText.Length == 0)
            {
                if (this._crbtToBuddyTextCol.ColumnText.Length == 0)
                {
                    int num16 = this._crbtToMeImgCol.ColumnRec.Y;
                    this._moodPhraseTextCol.ColumnRec.Y = num16;
                    for (int i = 0; i < this._moodPhraseCols.ColumnCount; i++)
                    {
                        this._moodPhraseCols[i].ColumnRec.Y = num16;
                    }
                }
            }
            else if (!this._crbtToBuddyTextCol.ColumnText.Equals(string.Empty))
            {
                int num18 = this._crbtToBuddyImgCol.ColumnRec.Left - this._crbtToMeImgCol.ColumnRec.Right;
                if (this._crbtToMeTextCol.ColumnRec.Width > num18)
                {
                    this._crbtToMeTextCol.ColumnRec.Width = num18;
                }
            }
            else
            {
                int num19 = base.ClientRectangle.Right - this._crbtToMeImgCol.ColumnRec.Right;
                if (this._crbtToMeTextCol.ColumnRec.Width > num19)
                {
                    this._crbtToMeTextCol.ColumnRec.Width = num19;
                }
            }
            if (this._statusTextCol.ColumnText.Length > 0)
            {
                int num20 = (int) Math.Ceiling((double) g.MeasureString(this._statusTextCol.ColumnText, this._statusTextCol.ColumnFont).Width);
                if (flag)
                {
                    num7 = this._mobileStatusImgCol.ColumnRec.Left - this._nickNameTextCol.ColumnRec.Right;
                    this._statusTextCol.ColumnRec.X = this._nickNameTextCol.ColumnRec.Right;
                    if (num20 > num7)
                    {
                        this._statusTextCol.ColumnRec.Width = num7;
                    }
                    else
                    {
                        this._statusTextCol.ColumnRec.Width = num20;
                    }
                }
                else
                {
                    num7 = this._mobileStatusImgCol.ColumnRec.Left - this._moodPhraseTextCol.ColumnRec.Right;
                    this._statusTextCol.ColumnRec.X = this._moodPhraseTextCol.ColumnRec.Right;
                    if (num20 > num7)
                    {
                        this._statusTextCol.ColumnRec.Width = num7;
                    }
                    else
                    {
                        this._statusTextCol.ColumnRec.Width = num20;
                    }
                }
                this._statusTextCol.ColumnRec.Y = this._nickNameTextCol.ColumnRec.Y;
                this._statusTextCol.ColumnRec.Height = this._nickNameTextCol.ColumnRec.Height;
            }
        }

        private Rectangle adjustImageBounds(Rectangle rect, int maxHeight)
        {
            if (rect.Width >= rect.Height)
            {
                rect.Width = maxHeight;
                rect.Height = maxHeight;
                return rect;
            }
            rect.Height = maxHeight;
            rect.Width = maxHeight;
            return rect;
        }

        protected void adjustSingleRowColumnRectangles(Graphics g, ContactBuddyNode buddyNode, Rectangle bounds)
        {
            int y = bounds.Y;
            int columnCount = this._nickNameCols.ColumnCount;
            int nickNameLeft = this.GetNickNameLeft(bounds);
            int x = 0;
            int num5 = 0;
            int height = bounds.Height;
            if (this.NeedReCaculate(buddyNode))
            {
                if (columnCount != 0)
                {
                    nickNameLeft = this._nickNameCols[0].ColumnRec.X;
                    x = this._nickNameTextCol.ColumnRec.X;
                    nickNameLeft = x;
                    num5 = nickNameLeft;
                    foreach (PaintTreeColumn column in this._nickNameCols)
                    {
                        int num7;
                        int num8;
                        column.ColumnRec.Y = y + this._OffsetY;
                        if (column.ColumnType == PaintTreeColumnType.IMAGE)
                        {
                            num7 = 0x10;
                            num8 = 0x10;
                        }
                        else
                        {
                            num7 = (int) Math.Ceiling((double) g.MeasureString(column.ColumnText, column.ColumnFont).Width);
                            num8 = height;
                        }
                        column.ColumnRec.Width = num7;
                        column.ColumnRec.Height = num8;
                        column.ColumnRec.X = x;
                        x += num7;
                        num5 += num7;
                    }
                }
                int num9 = 0;
                if (this._mobileStatusImgCol != null)
                {
                    num9 = this._mobileStatusImgCol.ColumnRec.Left - this._onLineStatusImgCol.ColumnRec.Right;
                }
                else
                {
                    num9 = base.ClientRectangle.Right - this._onLineStatusImgCol.ColumnRec.Right;
                }
                if (this._nickNameTextCol.ColumnText.Length == 0)
                {
                    this._moodPhraseTextCol.ColumnRec.X = this._nickNameTextCol.ColumnRec.X;
                }
                else
                {
                    int num10 = num5 - nickNameLeft;
                    if (num9 >= num10)
                    {
                        this._nickNameTextCol.ColumnRec.Width = num10;
                        this._moodPhraseTextCol.ColumnRec.X = num5 + this._moodPhraseInterval;
                        if (this._statusTextCol != null)
                        {
                            this._statusTextCol.ColumnRec.X = num5 + this._moodPhraseInterval;
                        }
                    }
                    else
                    {
                        this._nickNameTextCol.ColumnRec.Width = num9;
                        this._moodPhraseTextCol.ColumnRec.X = (nickNameLeft + num9) + this._moodPhraseInterval;
                        if (this._statusTextCol != null)
                        {
                            this._statusTextCol.ColumnRec.X = (nickNameLeft + num9) + this._moodPhraseInterval;
                        }
                    }
                }
                int num11 = buddyNode.MoodPhraseCols.ColumnCount;
                int num12 = 0;
                x = this._moodPhraseTextCol.ColumnRec.X;
                int num13 = x;
                if (num11 != 0)
                {
                    num12 = x;
                    x = this._moodPhraseTextCol.ColumnRec.X;
                    num13 = num12;
                    foreach (PaintTreeColumn column2 in this._moodPhraseCols)
                    {
                        int num14;
                        int num15;
                        column2.ColumnRec.Y = y + this._OffsetY;
                        if (column2.ColumnType == PaintTreeColumnType.IMAGE)
                        {
                            num14 = 0x10;
                            num15 = 0x10;
                        }
                        else
                        {
                            num14 = (int) Math.Ceiling((double) g.MeasureString(column2.ColumnText, column2.ColumnFont).Width);
                            num15 = height;
                        }
                        column2.ColumnRec.Width = num14;
                        column2.ColumnRec.Height = num15;
                        column2.ColumnRec.X = x;
                        x += num14;
                        num13 += num14;
                    }
                }
                num9 = (num9 - this._nickNameTextCol.ColumnRec.Width) - this._moodPhraseInterval;
                if (this._moodPhraseTextCol.ColumnText.Length == 0)
                {
                    this._moodPhraseTextCol.ColumnRec.Width = 0;
                }
                else
                {
                    int num16 = num13 - num12;
                    if (num9 >= num16)
                    {
                        this._moodPhraseTextCol.ColumnRec.Width = num16;
                        if (this._statusTextCol != null)
                        {
                            this._statusTextCol.ColumnRec.X = num13;
                        }
                    }
                    else
                    {
                        this._moodPhraseTextCol.ColumnRec.Width = num9;
                        if (this._statusTextCol != null)
                        {
                            this._statusTextCol.ColumnRec.X = num12 + num9;
                        }
                    }
                }
                if ((this._statusTextCol != null) && (this._statusTextCol.ColumnText.Length > 0))
                {
                    num9 -= this._moodPhraseTextCol.ColumnRec.Width;
                    SizeF ef3 = g.MeasureString(this._statusTextCol.ColumnText, this._statusTextCol.ColumnFont);
                    int num17 = (int) Math.Ceiling((double) ef3.Width);
                    Math.Ceiling((double) ef3.Height);
                    this._statusTextCol.ColumnRec.Y = y;
                    this._statusTextCol.ColumnRec.Height = height;
                    if (num17 > num9)
                    {
                        this._statusTextCol.ColumnRec.Width = num9;
                    }
                    else
                    {
                        this._statusTextCol.ColumnRec.Width = num17;
                    }
                }
            }
        }

        private Rectangle CaculateBorder(Rectangle area)
        {
            return new Rectangle(area.Left, area.Top - 1, area.Width, area.Height);
        }

        private void CalculateColumnRect(Graphics g, PaintTreeNode paintNode, Rectangle bounds)
        {
            Rectangle rect;
            SizeF ef;
            int top = bounds.Top;
            int maxHeight = bounds.Height;
            ContactBuddyNode buddyNode = paintNode as ContactBuddyNode;
            if (buddyNode == null)
            {
                rect = new Rectangle(0, 0, 0, 0);
                rect.X = bounds.Left;
                rect.Y = top + this._nDiagnosedY;
                ef = g.MeasureString(this._groupNameCol.ColumnText, this._groupNameCol.ColumnFont, (int) (base.ClientRectangle.Right - rect.X));
                rect.Width = (int) Math.Ceiling((double) ef.Width);
                rect.Height = maxHeight;
                this._groupNameCol.ColumnRec = rect;
                rect.X = this._groupNameCol.ColumnRec.Right;
                rect.Y = this._groupNameCol.ColumnRec.Top;
                ef = g.MeasureString(this._onLineStatisticCol.ColumnText, this._onLineStatisticCol.ColumnFont, (int) (base.ClientRectangle.Right - rect.X));
                rect.Width = (int) Math.Ceiling((double) ef.Width);
                rect.Height = maxHeight;
                this._onLineStatisticCol.ColumnRec = rect;
            }
            else if (this.NeedReCaculate(buddyNode))
            {
                rect = new Rectangle(0, 0, 0, 0);
                if (this._contactShowMode == ShowMode.SingleRow)
                {
                    if (paintNode.get_Level() == 0)
                    {
                        rect.X = (bounds.Left - this._groupIndent) - 2;
                    }
                    else
                    {
                        rect.X = bounds.Left - this._indent;
                    }
                    rect.Y = top + this._OffsetY;
                    AmigoImage image = this._updateBuddyInfoImgCol.image;
                    if (image == null)
                    {
                        rect.Width = 0;
                        rect.Height = this._defaultUpdateInfoImage.Height;
                    }
                    else
                    {
                        rect.Width = image.Width;
                        rect.Height = image.Height;
                    }
                    rect = this.adjustImageBounds(rect, this._defaultUpdateInfoImage.Height);
                    this._updateBuddyInfoImgCol.ColumnRec = rect;
                    this._updateBuddyInfoImgCol.ColumnRec.Y += (bounds.Height - this._defaultUpdateInfoImage.Height) / 2;
                    rect.X = rect.Right;
                    AmigoImage image2 = this._onLineStatusImgCol.image;
                    rect.Width = image2.Width;
                    rect = this.adjustImageBounds(rect, this._defaultOnlineStatusImage.Height);
                    this._onLineStatusImgCol.ColumnRec = rect;
                    this._onLineStatusImgCol.ColumnRec.Y += (bounds.Height - this._defaultOnlineStatusImage.Height) / 2;
                    rect.Height = maxHeight;
                    rect.X = rect.Right;
                    rect.Width = 1;
                    this._nickNameTextCol.ColumnRec = rect;
                    rect.X = rect.Right + this._moodPhraseInterval;
                    rect.Width = 1;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -