Esempio n. 1
0
 public void ShowNext()
 {
     if (wingame || progress.GetValue() == 0 || tipcount == 0)
     {
         return;
     }
     tipcount--;
     if (nexts != null && nexte != null)
     {
         nexts.SetBorder(2);
         nexte.SetBorder(2);
     }
 }
Esempio n. 2
0
            public override void Run()
            {
                LLKScreen screen = (LLKScreen)StaticCurrentSceen;
                Grid      prev   = null;

                for (int j = 0; j < v.Count; j++)
                {
                    prev = (Grid)v.Poll();
                    prev.SetVisible(true);
                    v.Add(prev);
                    try
                    {
                        Sleep(20L);
                    }
                    catch (Exception)
                    {
                    }
                }
                Grid current = prev;

                prev = (Grid)v.Poll();
                while (!v.IsEmpty())
                {
                    Grid o = (Grid)v.Poll();
                    o.SetVisible(false);
                    try
                    {
                        Sleep(20L);
                    }
                    catch (Exception)
                    {
                    }
                }
                prev.SetVisible(false);
                current.SetVisible(false);
                current.SetImage(screen.GetImage(9));
                prev.SetImage(screen.GetImage(9));
                current.SetBorder(1);
                prev.SetBorder(1);
                if (!screen.FindPair())
                {
                    screen.Refreshs();
                }
            }
Esempio n. 3
0
            public void Run()
            {
                LLKScreen s = (LLKScreen)StaticCurrentSceen;

                Grid current = null;

                try {
                    if (s.prev != null)
                    {
                        s.prev.SetBorder(3);
                    }

                    if (s.prev == null)
                    {
                        s.prev = s.GetGrid(s.GetTouchX(), s.GetTouchY());
                        if (s.prev != null)
                        {
                            s.prev.SetBorder(0);
                        }
                    }
                    else
                    {
                        if (s.progress.GetValue() == 0)
                        {
                            return;
                        }

                        current = s.GetGrid(s.GetTouchX(), s.GetTouchY());
                        if (current == s.prev)
                        {
                            return;
                        }
                        if (current == null)
                        {
                            s.prev = null;
                        }
                        if (s.prev == null)
                        {
                            return;
                        }
                        if (current.Equals(s.prev))
                        {
                            if (!s.FindPair())
                            {
                                s.Refreshs();
                            }
                            s.pcount = s.FindPath(s.prev, current);
                            if (s.pcount != 0)
                            {
                                s.DeletePair(s.prev, current);
                                s.prev = null;
                                return;
                            }
                        }
                        s.prev.SetBorder(1);
                        s.prev = current;
                        s.prev.SetBorder(0);
                        if (!s.FindPair())
                        {
                            s.Refreshs();
                        }
                    }
                } catch (Exception) {
                    if (s.prev != null)
                    {
                        s.prev.SetBorder(3);
                    }
                    if (current != null)
                    {
                        current.SetBorder(3);
                    }
                }
            }