Пример #1
0
        public PlayerDetail_Buff(int id, string name)
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //

            this.Text = name;
            this.id   = id;
            InitializeComponent();
            ListView l = new ListView();

            l.Location      = new Point(0, 0);
            l.Size          = new Size(700, 80);
            l.View          = View.Details;
            l.MultiSelect   = false;
            l.FullRowSelect = true;
            this.Controls.Add(l);


            l.BeginUpdate();
            for (int i = 0; i < HackFunctions.BUFF_MAX_COUNT; i++)
            {
                l.Columns.Add(i.ToString());
            }
            foreach (ColumnHeader item in l.Columns)
            {
                item.Width = 150;
            }
            l.Items.Add("head", GetBuffNameFromId(HackFunctions.getPlayerBuffType(id, 0)) + "/" + HackFunctions.getPlayerBuffTime(id, 0) + "tick", 0);
            for (int j = 1; j < HackFunctions.BUFF_MAX_COUNT; j++)
            {
                int slot     = j;
                int buffid   = HackFunctions.getPlayerBuffType(id, slot);
                int bufftype = HackFunctions.getPlayerBuffTime(id, slot);
                l.Items["head"].SubItems.Add(GetBuffNameFromId(buffid) + "/" + bufftype + "tick");
            }
            l.EndUpdate();
            //
            // TODO: Add constructor code after the InitializeComponent() call.
            //
        }