コード例 #1
0
        private void newSpriteViewToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SpriteView t = new SpriteView("Sprite Patterns", "SpritePatterns");

            t.Show(dockPanel, DockState.Float);
            myDocks.Add(t);
        }
コード例 #2
0
        public IDockContent DelegateHandler(string name)
        {
            string[] split = name.Split(':');
            switch (split[0])
            {
            case "Control":
                if (myButtonBar == null)
                {
                    myButtonBar = new ButtonBar("Control");
                }
                return(myButtonBar);

            case "Log":
            {
                foreach (LogView lv in myLogs)
                {
                    if (lv.viewName == name)
                    {
                        return(lv);
                    }
                }
                LogView t = new LogView("Log", "Log");
                myLogs.Add(t);
                return(t);
            }

            case "Registers":
                if (myNewRegisters == null)
                {
                    myNewRegisters = new Registers("Registers", "Registers");
                }
                return(myNewRegisters);

            case "Disassembly":
                if (myDisassembly == null)
                {
                    myDisassembly = new Disassembly("Disassembly", "Disassembly");
                }
                return(myDisassembly);

            case "Screen":
                if (myScreen == null)
                {
                    myScreen = new SpectrumScreen("Screen", "Screen");
                }
                return(myScreen);

            case "Breakpoints":
                if (myBreakpoints == null)
                {
                    myBreakpoints = new Breakpoint("Breakpoints", "Breakpoints");
                }
                return(myBreakpoints);

            case "SpritePatterns":
            {
                foreach (BaseDock sv in myDocks)
                {
                    if (sv.viewName == name)
                    {
                        return(sv);
                    }
                }
                SpriteView t = new SpriteView("Sprite Patterns", "SpritePatterns");
                myDocks.Add(t);
                return(t);
            }

            default:
                break;
            }
            return(null);
        }