예제 #1
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            initCommands();

            this.KeyDown += CrowIDE_KeyDown;

            //this.CrowInterface.LoadInterface ("#Crow.Coding.ui.imlEditor.crow").DataSource = this;
            //GraphicObject go = this.CrowInterface.LoadInterface (@"ui/test.crow");
            GraphicObject go = AddWidget(@"#Crow.Coding.ui.CrowIDE.crow");

            go.DataSource = this;

            MainIFace = ifaceControl[0].CrowInterface;

            mainDock = go.FindByName("mainDock") as DockStack;

            if (ReopenLastSolution && !string.IsNullOrEmpty(LastOpenSolution))
            {
                CurrentSolution = Solution.LoadSolution(LastOpenSolution);
                //lock(MainIFace.UpdateMutex)
                CurrentSolution.ReopenItemsSavedInUserConfig();
            }

            instFileDlg = Instantiator.CreateFromImlFragment
                              (MainIFace, "<FileDialog Caption='Open File' CurrentDirectory='{²CurrentDirectory}' SearchPattern='*.sln' OkClicked='onFileOpen'/>");

            DockWindow dw = loadWindow("#Crow.Coding.ui.DockWindows.winEditor.crow", this) as DockWindow;

            dw.DockingPosition = Alignment.Center;
            dw.Dock(mainDock);
            dw = loadWindow("#Crow.Coding.ui.DockWindows.winSolution.crow", this) as DockWindow;
            dw.DockingPosition = Alignment.Right;
            dw.Dock(mainDock);
            dw = loadWindow("#Crow.Coding.ui.DockWindows.winToolbox.crow", this) as DockWindow;
            dw.DockingPosition = Alignment.Left;
            dw.Dock(mainDock);
        }