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

📄 customemotionbatchresultform.cs

📁 破解的飞信源代码
💻 CS
字号:
namespace Imps.Client.Pc
{
    using Imps.Client.Pc.BizControls;
    using Imps.Client.Pc.Controls;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Drawing;
    using System.Windows.Forms;

    public class CustomEmotionBatchResultForm : XIMDialog
    {
        private IList<string[]> _errList;
        private Form _parentForm;
        private int _successCount;
        private XButton btnOK;
        private DataGridViewTextBoxColumn columnName;
        private DataGridViewTextBoxColumn columnPath;
        private IContainer components;
        private DataGridView dgvResult;
        private static readonly string FormTitle = "{0}个自定义表情添加成功,{1}个自定义表情添加失败。";
        private bool listBinded;
        private Label lTilte;
        private Panel panel1;
        private UPanel upGridView;

        public CustomEmotionBatchResultForm(int successCount, IList<string[]> errList) : this(successCount, errList, null)
        {
        }

        public CustomEmotionBatchResultForm(int successCount, IList<string[]> errList, Form parentForm)
        {
            this.listBinded = true;
            this._successCount = successCount;
            this._errList = errList;
            this._parentForm = parentForm;
            this.InitializeComponent();
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            base.Close();
        }

        private void CustomEmotionBatchResultForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            if ((this._parentForm != null) && !this._parentForm.IsDisposed)
            {
                this._parentForm.Close();
            }
        }

        private void CustomEmotionBatchResultForm_Load(object sender, EventArgs e)
        {
            this.lTilte.Text = string.Format(FormTitle, this._successCount, this._errList.get_Count());
            this.listBinded = false;
            try
            {
                this.dgvResult.get_Rows().Clear();
                this.dgvResult.set_RowCount(this._errList.get_Count() + 15);
                for (int i = 0; i < this._errList.get_Count(); i++)
                {
                    DataGridViewRow row = this.dgvResult.get_Rows().get_Item(i);
                    row.set_Tag(this._errList.get_Item(i));
                    DataGridViewTextBoxCell cell = new DataGridViewTextBoxCell();
                    cell.set_Value(this._errList.get_Item(i)[0]);
                    DataGridViewTextBoxCell cell2 = new DataGridViewTextBoxCell();
                    cell2.set_Value(this._errList.get_Item(i)[1]);
                    row.get_Cells().set_Item(0, cell);
                    row.get_Cells().set_Item(1, cell2);
                }
            }
            catch
            {
            }
            this.listBinded = true;
        }

        private void CustomEmotionBatchResultForm_Shown(object sender, EventArgs e)
        {
            this.btnOK.Focus();
        }

        private void dgvResult_CellEnter(object sender, DataGridViewCellEventArgs e)
        {
            if (this.dgvResult.get_Rows().get_Item(e.get_RowIndex()).get_Tag() == null)
            {
                this.btnOK.Focus();
            }
        }

        private void dgvResult_Enter(object sender, EventArgs e)
        {
            this.dgvResult.set_CurrentCell(this.dgvResult.get_Item(0, 0));
        }

        private void dgvResult_Scroll(object sender, ScrollEventArgs e)
        {
            if ((e.NewValue > (this._errList.get_Count() - 1)) && (this._errList.get_Count() > 0))
            {
                this.dgvResult.set_FirstDisplayedScrollingRowIndex(this._errList.get_Count() - 1);
            }
        }

        private void dgvResult_SelectionChanged(object sender, EventArgs e)
        {
            if (this.listBinded)
            {
                foreach (DataGridViewRow row in this.dgvResult.get_SelectedRows())
                {
                    if (row.get_Tag() == null)
                    {
                        row.set_Selected(false);
                    }
                }
            }
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void InitializeComponent()
        {
            DataGridViewCellStyle style = new DataGridViewCellStyle();
            DataGridViewCellStyle style2 = new DataGridViewCellStyle();
            DataGridViewCellStyle style3 = new DataGridViewCellStyle();
            DataGridViewCellStyle style4 = new DataGridViewCellStyle();
            DataGridViewCellStyle style5 = new DataGridViewCellStyle();
            this.lTilte = new Label();
            this.btnOK = new XButton();
            this.panel1 = new Panel();
            this.upGridView = new UPanel();
            this.dgvResult = new DataGridView();
            this.columnPath = new DataGridViewTextBoxColumn();
            this.columnName = new DataGridViewTextBoxColumn();
            this.panel1.SuspendLayout();
            this.upGridView.SuspendLayout();
            this.dgvResult.BeginInit();
            base.SuspendLayout();
            this.lTilte.set_AutoSize(true);
            this.lTilte.Font = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Regular, GraphicsUnit.Point, 0);
            this.lTilte.Location = new System.Drawing.Point(3, 10);
            this.lTilte.Name = "lTilte";
            this.lTilte.Size = new Size(0xf9, 13);
            this.lTilte.TabIndex = 0;
            this.lTilte.Text = "X个自定表情添加成功,X个自定表情添加失败";
            this.btnOK.AutoArrangementX = true;
            this.btnOK.AutoSizeToImage = false;
            this.btnOK.BackColor = Color.Transparent;
            this.btnOK.BackgroundImageDisable = null;
            this.btnOK.BackgroundImageDown = null;
            this.btnOK.BackgroundImageHover = null;
            this.btnOK.ChangeSkin = true;
            this.btnOK.DialogResult = DialogResult.Cancel;
            this.btnOK.Location = new System.Drawing.Point(0xf4, 0x174);
            this.btnOK.Name = "btnOK";
            this.btnOK.Size = new Size(0x4b, 0x19);
            this.btnOK.TabIndex = 0;
            this.btnOK.Text = "确定";
            this.btnOK.set_UseVisualStyleBackColor(false);
            this.btnOK.Click += new EventHandler(this.btnOK_Click);
            this.panel1.Controls.Add(this.upGridView);
            this.panel1.Controls.Add(this.lTilte);
            this.panel1.Location = new System.Drawing.Point(2, 2);
            this.panel1.Name = "panel1";
            this.panel1.Size = new Size(330, 0x16c);
            this.panel1.TabIndex = 1;
            this.upGridView.BorderColor = Color.FromArgb(0xcb, 0xd4, 0xde);
            this.upGridView.BorderInsideColor = Color.White;
            this.upGridView.BorderInsideWidth = 1;
            this.upGridView.BorderWidth = 1;
            this.upGridView.Controls.Add(this.dgvResult);
            this.upGridView.Location = new System.Drawing.Point(6, 0x24);
            this.upGridView.Name = "upGridView";
            this.upGridView.set_Padding(new Padding(1));
            this.upGridView.Size = new Size(0x141, 0x143);
            this.upGridView.TabIndex = 0;
            this.dgvResult.set_AllowUserToAddRows(false);
            this.dgvResult.set_AllowUserToDeleteRows(false);
            this.dgvResult.set_AllowUserToResizeColumns(false);
            this.dgvResult.set_AllowUserToResizeRows(false);
            style.set_BackColor(Color.White);
            style.set_ForeColor(Color.Black);
            style.set_SelectionBackColor(Color.FromArgb(0xa8, 0xe9, 0xfe));
            style.set_SelectionForeColor(Color.Black);
            this.dgvResult.set_AlternatingRowsDefaultCellStyle(style);
            this.dgvResult.set_AutoSizeColumnsMode(0x10);
            this.dgvResult.set_BackgroundColor(Color.White);
            this.dgvResult.set_BorderStyle(BorderStyle.None);
            this.dgvResult.set_ColumnHeadersBorderStyle(1);
            style2.set_Alignment(0x20);
            style2.set_BackColor(Color.White);
            style2.set_Font(new Font("Microsoft Sans Serif", 8.25f, FontStyle.Regular, GraphicsUnit.Point, 0));
            style2.set_ForeColor(SystemColors.WindowText);
            style2.set_SelectionBackColor(SystemColors.Highlight);
            style2.set_SelectionForeColor(SystemColors.HighlightText);
            style2.set_WrapMode(1);
            this.dgvResult.set_ColumnHeadersDefaultCellStyle(style2);
            this.dgvResult.set_ColumnHeadersHeight(0x16);
            this.dgvResult.set_ColumnHeadersHeightSizeMode(1);
            this.dgvResult.get_Columns().AddRange(new DataGridViewColumn[] { this.columnPath, this.columnName });
            style3.set_Alignment(0x10);
            style3.set_BackColor(Color.FromArgb(0xf4, 0xf7, 0xf9));
            style3.set_Font(new Font("Microsoft Sans Serif", 8.25f, FontStyle.Regular, GraphicsUnit.Point, 0));
            style3.set_ForeColor(Color.Black);
            style3.set_SelectionBackColor(Color.FromArgb(0xa8, 0xe9, 0xfe));
            style3.set_SelectionForeColor(Color.Black);
            style3.set_WrapMode(2);
            this.dgvResult.set_DefaultCellStyle(style3);
            this.dgvResult.Dock = DockStyle.Fill;
            this.dgvResult.set_EnableHeadersVisualStyles(false);
            this.dgvResult.set_GridColor(Color.FromArgb(0xdb, 0xe8, 240));
            this.dgvResult.Location = new System.Drawing.Point(1, 1);
            this.dgvResult.Name = "dgvResult";
            this.dgvResult.set_ReadOnly(true);
            this.dgvResult.set_RowHeadersVisible(false);
            this.dgvResult.get_RowTemplate().set_Height(0x17);
            this.dgvResult.get_RowTemplate().set_ReadOnly(true);
            this.dgvResult.set_ScrollBars(ScrollBars.Vertical);
            this.dgvResult.set_SelectionMode(1);
            this.dgvResult.Size = new Size(0x13f, 0x141);
            this.dgvResult.TabIndex = 0;
            this.dgvResult.Enter += new EventHandler(this.dgvResult_Enter);
            this.dgvResult.add_Scroll(new ScrollEventHandler(this.dgvResult_Scroll));
            this.dgvResult.add_CellEnter(new DataGridViewCellEventHandler(this, (IntPtr) this.dgvResult_CellEnter));
            this.dgvResult.add_SelectionChanged(new EventHandler(this.dgvResult_SelectionChanged));
            style4.set_Alignment(0x20);
            this.columnPath.set_DefaultCellStyle(style4);
            this.columnPath.set_FillWeight(200f);
            this.columnPath.set_HeaderText("图片路径");
            this.columnPath.set_Name("columnPath");
            this.columnPath.set_ReadOnly(true);
            this.columnPath.set_SortMode(0);
            style5.set_Alignment(0x20);
            this.columnName.set_DefaultCellStyle(style5);
            this.columnName.set_FillWeight(106f);
            this.columnName.set_HeaderText("失败原因");
            this.columnName.set_Name("columnName");
            this.columnName.set_ReadOnly(true);
            this.columnName.set_SortMode(0);
            base.AcceptButton = this.btnOK;
            base.set_AutoScaleDimensions(new SizeF(6f, 13f));
            base.set_AutoScaleMode(1);
            this.BackColor = Color.White;
            base.BaseHeight = 0x23e;
            base.BaseWidth = 0x14c;
            base.CancelButton = this.btnOK;
            base.ClientSize = new Size(0x14c, 0x23e);
            base.Controls.Add(this.panel1);
            base.Controls.Add(this.btnOK);
            base.DisplayLocation = new System.Drawing.Point(15, 15);
            base.DisplaySize = new Size(0x14c, 0x23e);
            base.FormBorderStyle = FormBorderStyle.FixedSingle;
            base.MinimizeBox = false;
            base.Name = "CustomEmotionBatchResultForm";
            base.set_Padding(new Padding(4, 0, 4, 0x2f));
            base.StartPosition = FormStartPosition.CenterScreen;
            base.Text = "Fetion 2008";
            base.add_FormClosed(new FormClosedEventHandler(this, (IntPtr) this.CustomEmotionBatchResultForm_FormClosed));
            base.add_Shown(new EventHandler(this.CustomEmotionBatchResultForm_Shown));
            base.Load += new EventHandler(this.CustomEmotionBatchResultForm_Load);
            this.panel1.ResumeLayout(false);
            this.panel1.PerformLayout();
            this.upGridView.ResumeLayout(false);
            this.dgvResult.EndInit();
            base.ResumeLayout(false);
        }
    }
}

⌨️ 快捷键说明

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