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

📄 displayemoticons.cs

📁 破解的飞信源代码
💻 CS
📖 第 1 页 / 共 3 页
字号:
                    }
                    EmoticonRegion er = new EmoticonRegion(startPoint, this.EmoticonImageSize, emoticon);
                    er.ID = key;
                    this.emoticonRegions.Add(er);
                    this.AddDynamicImageRectangle(er);
                }
            }
            startPoint.X = this.seperatorPadding;
            startPoint.Y += this.EmoticonSize.Height;
            this.pointSeperatorLine1 = new System.Drawing.Point(this.seperatorPadding, startPoint.Y + 1);
            this.pointSeperatorLine2 = new System.Drawing.Point(base.Width - this.seperatorPadding, startPoint.Y + 1);
            startPoint.Y += this.seperatorHeight;
            this.CalCustomOperationRect();
            this.UpdateCustom(null);
        }

        public void OnDisplayEmoticonsHide(EventArgs e)
        {
            if (this.DisplayEmoticonsHide != null)
            {
                this.DisplayEmoticonsHide(this, e);
            }
        }

        public void OnEmoticonSelected(EmoticonEventArgs e)
        {
            if (this.EmoticonSelected != null)
            {
                this.EmoticonSelected.Invoke(this, e);
            }
        }

        private void timer_Tick(object sender, EventArgs e)
        {
        }

        public void UpdateCustom(List<Emoticon> emoticons)
        {
            try
            {
                if (this.m_customEmotionMgr != null)
                {
                    if (emoticons != null)
                    {
                        this.emoticonsCustom = emoticons;
                    }
                    int num = (int) Math.Ceiling(((double) this.m_customEmotionMgr.OwnerEmotions.Count) / (this.customRowCount * this.colCount));
                    if (this.currentCustomPage >= num)
                    {
                        this.currentCustomPage = num - 1;
                    }
                    if (this.currentCustomPage < 0)
                    {
                        this.currentCustomPage = 0;
                    }
                    if (this.currentCustomPage > 0)
                    {
                        this.emoticonMgrPageBack.IsCanClick = true;
                    }
                    else
                    {
                        this.emoticonMgrPageBack.IsCanClick = false;
                    }
                    if ((this.currentCustomPage + 1) < num)
                    {
                        this.emoticonMgrPagePrev.IsCanClick = true;
                    }
                    else
                    {
                        this.emoticonMgrPagePrev.IsCanClick = false;
                    }
                    if (num == 0)
                    {
                        num = 1;
                    }
                    this.emoticonMgrPageShow.Text = ((this.currentCustomPage + 1)).ToString() + "/" + num.ToString();
                    this.ClearCurPageCustomEmoticon();
                    System.Drawing.Point startPoint = new System.Drawing.Point(0, 0);
                    List<Imps.Client.Core.CustomEmotion.CustomEmotion> emotions = null;
                    int start = (this.currentCustomPage * this.customRowCount) * this.colCount;
                    int end = (((this.currentCustomPage + 1) * this.customRowCount) * this.colCount) - 1;
                    if (end >= this.m_customEmotionMgr.OwnerEmotions.Count)
                    {
                        end = this.m_customEmotionMgr.OwnerEmotions.Count - 1;
                    }
                    if (this.m_customEmotionMgr.OwnerEmotions.Count != 0)
                    {
                        emotions = this.m_customEmotionMgr.OwnerEmotions.GetEmotions(start, end);
                    }
                    else
                    {
                        emotions = new List<Imps.Client.Core.CustomEmotion.CustomEmotion>();
                        emotions.Clear();
                    }
                    string id = "";
                    for (int i = 0; i < this.customRowCount; i++)
                    {
                        startPoint.Y = (this.paddingTop + ((this.rowCount + i) * this.EmoticonSize.Height)) + this.seperatorDefault2CustomHeight;
                        for (int j = 0; j < this.ColCount; j++)
                        {
                            startPoint.X = this.paddingLeft + (j * this.EmoticonSize.Width);
                            int num7 = ((i * this.ColCount) + j) + ((this.currentCustomPage * this.customRowCount) * this.colCount);
                            Emoticon emoticon = null;
                            int num8 = (i * this.ColCount) + j;
                            id = "";
                            if (((num7 < this.m_customEmotionMgr.OwnerEmotions.Count) && (num7 >= 0)) && (emotions.get_Count() > num8))
                            {
                                Image staticImage = this.m_customEmotionMgr.GetThumbnailEmotionImage(emotions.get_Item(num8));
                                Image dynamicImage = this.m_customEmotionMgr.GetEmotionImageById(emotions.get_Item(num8).Id);
                                emoticon = new Emoticon(emotions.get_Item(num8).ShortCut, staticImage, dynamicImage, emotions.get_Item(num8).Name, 0, false);
                                id = emotions.get_Item(num8).Id;
                            }
                            EmoticonRegion er = new EmoticonRegion(startPoint, this.EmoticonImageSize, emoticon);
                            er.ID = id;
                            er.IsCustomEmoticon = true;
                            this.emoticonRegions.Add(er);
                            this.AddDynamicImageRectangle(er);
                        }
                    }
                }
            }
            catch (Exception exception)
            {
                ClientLogger.WriteException(exception);
            }
        }

        public Color BorderHightlightInsideColor
        {
            get
            {
                return this.borderHightlightInsideColor;
            }
            set
            {
                this.borderHightlightInsideColor = value;
            }
        }

        public Color BorderHightlightOutsideColor
        {
            get
            {
                return this.borderHightlightOutsideColor;
            }
            set
            {
                this.borderHightlightOutsideColor = value;
            }
        }

        public int ColCount
        {
            get
            {
                return this.colCount;
            }
            set
            {
                this.colCount = value;
            }
        }

        public int CustomRowCount
        {
            get
            {
                return this.customRowCount;
            }
            set
            {
                this.customRowCount = value;
            }
        }

        public int EmoticonImageHeight
        {
            get
            {
                return this.emoticonImageHeight;
            }
            set
            {
                this.emoticonImageHeight = value;
            }
        }

        public Size EmoticonImageSize
        {
            get
            {
                return new Size(this.EmoticonImageWidth, this.EmoticonImageHeight);
            }
        }

        public int EmoticonImageWidth
        {
            get
            {
                return this.emoticonImageWidth;
            }
            set
            {
                this.emoticonImageWidth = value;
            }
        }

        public Size EmoticonSize
        {
            get
            {
                return new Size(this.EmoticonImageWidth + 12, this.EmoticonImageHeight + 12);
            }
        }

        public Font FontHover
        {
            get
            {
                return this.fontHover;
            }
            set
            {
                this.fontHover = value;
            }
        }

        public Color ForeColorHover
        {
            get
            {
                return this.foreColorHover;
            }
            set
            {
                this.foreColorHover = value;
            }
        }

        public Color LineColor
        {
            get
            {
                return this.lineColor;
            }
            set
            {
                this.lineColor = value;
            }
        }

        public int RowCount
        {
            get
            {
                return this.rowCount;
            }
            set
            {
                this.rowCount = value;
            }
        }

        public class CustomOperation
        {
            private int ID;
            private bool isCanClick;
            private bool isSelected;
            private Rectangle rectOperation;
            private string strText;

            internal CustomOperation()
            {
                this.strText = "";
                this.ID = -1;
                this.isSelected = false;
                this.isCanClick = false;
                this.rectOperation = Rectangle.Empty;
                this.strText = "";
                this.ID = -1;
            }

            public CustomOperation(int nID, Rectangle rect, bool bIsSelected, bool bIsCanClick, string Text)
            {
                this.strText = "";
                this.ID = -1;
                this.isSelected = bIsSelected;
                this.isCanClick = bIsCanClick;
                this.ID = nID;
                this.rectOperation = rect;
                this.strText = Text;
            }

            public bool IsCanClick
            {
                get
                {
                    return this.isCanClick;
                }
                set
                {
                    this.isCanClick = value;
                }
            }

            public bool IsSelected
            {
                get
                {
                    return this.isSelected;
                }
                set
                {
                    this.isSelected = value;
                }
            }

            public Rectangle RectOperation
            {
                get
                {
                    return this.rectOperation;
                }
                set
                {
                    this.rectOperation = value;
                }
            }

            public string Text
            {
                get
                {
                    return this.strText;
                }
                set
                {
                    this.strText = value;
                }
            }
        }

        public enum MoreTextStatus
        {
            Normal,
            Hover,
            Leave
        }
    }
}

⌨️ 快捷键说明

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