Пример #1
0
 private void SetCurrentPlane(CollisionPlane value)
 {
     if (InvokeRequired)
     {
         this.Invoke(new SetCurrentPlaneDelegate(SetCurrentPlane), new object[] { value });
         return;
     }
     if (value != null && _CurrentPlane != value)
     {
         _CurrentPlane = value;
         if (_CurrentPlane != null)
         {
             PathStore = _CurrentPlane.PathStore;
             PathFinderDemo pfd = PathStore.PanelGUI;
             if (pfd != null)
             {
                 pfd.SetPlane(_CurrentPlane);
                 pfd.Text = String.Format("{0} {1}", PathStore.RegionName, _CurrentPlane);
             }
             _Matrix = _CurrentPlane.ByteMatrix;
         }
         Invalidate();
     }
 }
Пример #2
0
        public void ShowDebugger()
        {
            if (PanelGUI == null)
            {                
                (new Thread(() =>
                                {
                                    try
                                    {
                                        PanelGUI = new PathFinderDemo(this);
                                        PanelGUI.CollisionPlaneListUpdate();
                                        PanelGUI.Closing += new CancelEventHandler((sender, e) => PanelGUI = null);
                                        Application.EnableVisualStyles();
                                        PanelGUI.Show();
                                        Application.Run(PanelGUI);
                                    }
                                    catch (Exception e)
                                    {
                                        Debug("" + e);
                                        PanelGUI = null;
                                    }

                                }) {Name = string.Format("PathFinder Form for {0}", this.RegionName), IsBackground = true}).Start();
            }
            else
            {
                PanelGUI.CollisionPlaneListUpdate();
                PanelGUI.Show();
            }

        }