Ejemplo n.º 1
0
            public void RegisterDebuggerWindow(string path, IDebuggerWindow debuggerWindow)
            {
                if (string.IsNullOrEmpty(path))
                {
                    throw new GameFrameworkException("Path is invalid.");
                }
                int num = path.IndexOf('/');

                if (num < 0 || num >= path.Length - 1)
                {
                    if (this.InternalGetDebuggerWindow(path) != null)
                    {
                        throw new GameFrameworkException("Debugger window has been registered.");
                    }
                    this.m_DebuggerWindows.Add(new KeyValuePair <string, IDebuggerWindow>(path, debuggerWindow));
                    this.RefreshDebuggerWindowNames();
                }
                else
                {
                    string text  = path.Substring(0, num);
                    string path2 = path.Substring(num + 1);
                    DebuggerManager.DebuggerWindowGroup debuggerWindowGroup = (DebuggerManager.DebuggerWindowGroup) this.InternalGetDebuggerWindow(text);
                    if (debuggerWindowGroup == null)
                    {
                        if (this.InternalGetDebuggerWindow(text) != null)
                        {
                            throw new GameFrameworkException("Debugger window has been registered, can not create debugger window group.");
                        }
                        debuggerWindowGroup = new DebuggerManager.DebuggerWindowGroup();
                        this.m_DebuggerWindows.Add(new KeyValuePair <string, IDebuggerWindow>(text, debuggerWindowGroup));
                        this.RefreshDebuggerWindowNames();
                    }
                    debuggerWindowGroup.RegisterDebuggerWindow(path2, debuggerWindow);
                }
            }
Ejemplo n.º 2
0
            public bool SelectDebuggerWindow(string path)
            {
                if (string.IsNullOrEmpty(path))
                {
                    return(false);
                }
                int num = path.IndexOf('/');

                if (num < 0 || num >= path.Length - 1)
                {
                    return(this.InternalSelectDebuggerWindow(path));
                }
                string name  = path.Substring(0, num);
                string path2 = path.Substring(num + 1);

                DebuggerManager.DebuggerWindowGroup debuggerWindowGroup = (DebuggerManager.DebuggerWindowGroup) this.InternalGetDebuggerWindow(name);
                return(debuggerWindowGroup != null && this.InternalSelectDebuggerWindow(name) && debuggerWindowGroup.SelectDebuggerWindow(path2));
            }
Ejemplo n.º 3
0
 public DebuggerManager()
 {
     this.m_DebuggerWindowRoot = new DebuggerManager.DebuggerWindowGroup();
     this.m_ActiveWindow       = false;
 }