public void Work()
        {
            List <string> cards = new List <string>();

            foreach (string s in ReadMemory())
            {
                int    start = s.IndexOf("cardId=") + 7;
                string image = s.Substring(start, s.IndexOf(' ', start) - start);

                //System.Windows.Forms.MessageBox.Show(s);
                Card c = dc.FindCardByImage(image);
                if (c != null)
                {
                    int id = Convert.ToInt32(s.Substring(4, s.IndexOf(' ') - 4));
                    if (!CardIdsAlreadyParsed.Contains(id))
                    {
                        CardControl cc = dc.FindCardInDeck(c.Name);
                        if (cc != null)
                        {
                            if (cc.Card.Count > 0)
                            {
                                cc.Card.Count--;
                            }
                            if (cc.Card.Count == 0 && dc.Options.GetAsBool("CardAutoSort"))
                            {
                                dc.Sort();
                            }
                        }
                        CardIdsAlreadyParsed.Add(id);
                    }
                }
            }
            dc.Refresh();
            dc.RefreshAllCards();
        }
Beispiel #2
0
        private void CardControl_Click(object sender, EventArgs e)
        {
            MouseEventArgs me = (MouseEventArgs)e;

            if (me.Button == System.Windows.Forms.MouseButtons.Middle)
            {
                dc.ShowTooltip(Card);
                return;
            }

            DoClick(me.Button);

            if (dc.Options.GetAsBool("CardShowTD"))
            {
                dc.RefreshAllCards();
            }
            else
            {
                Invalidate();
            }

            dc.Refresh();
        }