Exemplo n.º 1
0
        public static void SetWindows(DownWindow down, LeftWindow left, RightWindow right, CodeWindow center, CodeStudioMain main)
        {
            downWindow     = down;
            leftWindow     = left;
            rightWindow    = right;
            codeWindow     = center;
            codeStudioMain = main;

            settings           = new StudioSettings();
            syntaxChekers      = new SyntaxChekers();
            singleFileCompiler = new SingleFileCompiler();
        }
Exemplo n.º 2
0
        public CodeStudioMain()
        {
            InitializeComponent();
            this.KeyPreview = true;

            leftToolStripMenuItem.Checked = rightToolStripMenuItem.Checked = downToolStripMenuItem.Checked = true;

            codeWindow = new CodeWindow {
                MdiParent       = this,
                FormBorderStyle = FormBorderStyle.None
            };
            downWindow = new DownWindow {
                MdiParent = this
            };
            leftWindow = new LeftWindow {
                MdiParent = this
            };
            rightWindow = new RightWindow {
                MdiParent = this
            };

            codeWindow.ResizeEnd  += ResizeFields;
            downWindow.ResizeEnd  += ResizeFields;
            leftWindow.ResizeEnd  += ResizeFields;
            rightWindow.ResizeEnd += ResizeFields;

            downWindow.FormClosing += delegate(object s, FormClosingEventArgs eventArgs) {
                eventArgs.Cancel = true;
                downToolStripMenuItem_Click(s, null);
            };
            leftWindow.FormClosing += delegate(object s, FormClosingEventArgs eventArgs) {
                eventArgs.Cancel = true;
                leftToolStripMenuItem_Click(s, null);
            };
            rightWindow.FormClosing += delegate(object s, FormClosingEventArgs eventArgs) {
                eventArgs.Cancel = true;
                rightToolStripMenuItem_Click(s, null);
            };
            this.FormClosing += delegate(object s, FormClosingEventArgs eventArgs) {
                this.saveAllToolStripMenuItem_Click(null, null);
                eventArgs.Cancel = false;
            };

            Singletones.SetWindows(downWindow, leftWindow, rightWindow, codeWindow, this);
        }