Ejemplo n.º 1
0
        public ICollection GetCustomCommands()
        {
            CustomCommand cmd = new CustomCommand(CommandCategory.Tools, "ToggleStatus")
            {
                DisplayName = "Toggle Rich Presence"
            };

            cmd.Invoked += (a, b) => TogglePresence(DomainManager.VegasDomainManager.GetVegas());
            callbacks.disconnectedCallback += (a, b) => DisconnectedCallback(a, b);
            callbacks.errorCallback        += (a, b) => ErrorCallback(a, b);
            callbacks.readyCallback        += () => ReadyCallback();

            dummyDocker = new DockableControl("dummyDocker");
            return(new CustomCommand[] { cmd });
        }
Ejemplo n.º 2
0
        void HandleInvoked(Object sender, EventArgs args)
        {
            if (!myVegas.ActivateDockView("LipSyncApp"))
            {
                myControl      = new LipSyncUserControl(myVegas);
                myControl.Dock = System.Windows.Forms.DockStyle.Fill;

                DockableControl dockView = new DockableControl("LipSyncApp");
                dockView.AutoLoadCommand        = myCommand;
                dockView.PersistDockWindowState = true;
                dockView.DefaultFloatingSize    = new Size(540, 480);
                dockView.DefaultDockWindowStyle = DockWindowStyle.Docked;
                dockView.Dock = System.Windows.Forms.DockStyle.Fill;
                dockView.Controls.Add(myControl);
                myVegas.LoadDockView(dockView);
            }
        }
Ejemplo n.º 3
0
    private void initializeSolutionBrowser()
    {
        //create the solution browser control
        p_SolutionExplorer = new SolutionBrowserControl() { Dock = DockStyle.Fill };

        //create the dockable window to hold the solution explorer
        DockableControl dock = new DockableControl() {
            Dock = DockStyle.Fill,
            Title = "Solution Explorer"
        };
        dock.WorkingArea.Controls.Add(p_SolutionExplorer);

        //add the control to the control skeleton
        p_MainBodyContainer.Panel2.Controls.Add(dock);

        #region Dock events
        /*When the dock control is docked, adjust the skeleton to make it visible*/
        dock.DockClicked += delegate(object sender, EventArgs e) {
            p_MainBodyContainer.Panel2Collapsed = false;
        };
        /*When the dock control is undocked, adjust the skeleton to make it invisible*/
        dock.UndockClicked += delegate(object sender, EventArgs e) {
            p_MainBodyContainer.Panel2Collapsed = true;
        };
        /*When the dock is closed, just make it invisible but DON'T dispose it*/
        dock.CloseClicked += delegate(object sender, EventArgs e) {
            p_MainBodyContainer.Panel2Collapsed = true;
        };
        #endregion

        #region Solution events
        p_SolutionExplorer.FileOpened += delegate(SolutionBrowserControl sender, ProjectFile file) {
            AddTab(file.PhysicalLocation);
        };
        p_SolutionExplorer.FileDelete += delegate(SolutionBrowserControl sender, ProjectFile file) {
            RemoveTab(file.PhysicalLocation);
        };
        p_SolutionExplorer.SolutionChanged += delegate(SolutionBrowserControl sender, Solution solution) {
            saveState();

            p_Title = solution.SolutionName + " - " + p_BaseTitle;
            Text = p_Title;
        };
        #endregion

        //load the solution that was loaded in a previous
        //instance of the IDE
        if (RuntimeState.ObjectExists("mainIDE.openedSolution")) {
            string solutionFilename = RuntimeState.GetObjectString("mainIDE.openedSolution");
            if (!File.Exists(solutionFilename)) { return; }
            p_SolutionExplorer.Solution = new Solution(solutionFilename);
        }

        //restore the state of the solution control
        p_SolutionExplorer.LoadTreeExpandState("mainIDE.solutionBrowserState");
    }
Ejemplo n.º 4
0
    private void initializeOutputWindow()
    {
        //create the dockable window for the output window
        DockableControl dock = new DockableControl() {
            Dock = DockStyle.Fill,
            Title = "Output"
        };

        //initialize the output window
        p_OutputWindow = new OutputWindow(p_WorkingBodyContainer.Panel2.Width);
        dock.WorkingArea.Controls.Add(p_OutputWindow);

        #region Output window events
        p_OutputWindow.FileGoto += delegate(ProjectFile file, int line, int column) {
            if (file == null) { return; }

            //get/create the tab for the file
            TabPage page = GetTab(file.PhysicalLocation);
            if (page == null) { page = AddTab(file.PhysicalLocation); }

            //select the line and column
            TextEditor editor = (TextEditor)page.Controls[0];
            editor.SelectWordAtColumn(line - 1, column);
        };
        #endregion

        #region Dock events
        dock.DockClicked += delegate(object sender, EventArgs e) {
            p_WorkingBodyContainer.Panel2Collapsed = false;
        };
        dock.UndockClicked += delegate(object sender, EventArgs e) {
            p_WorkingBodyContainer.Panel2Collapsed = true;
        };
        dock.CloseClicked += delegate(object sender, EventArgs e) {
            p_WorkingBodyContainer.Panel2Collapsed = true;
        };
        #endregion

        //add the dock to the bottom side of the body
        p_WorkingBodyContainer.Panel2.Controls.Add(dock);
        return;
    }
        void HandleInvoked(Object sender, EventArgs args)
        {
            if (!myVegas.ActivateDockView(Config.DisplayExtensionName))
            {
                DockableControl            dockView = new DockableControl(Config.DisplayExtensionName);
                System.Windows.Forms.Label label    = new System.Windows.Forms.Label();

                fromRightBtn          = new Button();
                fromRightBtn.Location = new System.Drawing.Point(3, 156);
                fromRightBtn.Name     = "fromRightBtn";
                fromRightBtn.Size     = new System.Drawing.Size(123, 23);
                fromRightBtn.TabIndex = 0;
                fromRightBtn.Text     = "From Right";
                fromRightBtn.Click   += pushRightClick;
                fromRightBtn.UseVisualStyleBackColor = true;
                dockView.Controls.Add(fromRightBtn);

                fromLeftBtn          = new Button();
                fromLeftBtn.Location = new System.Drawing.Point(3, 185);
                fromLeftBtn.Name     = "fromLeftBtn";
                fromLeftBtn.Size     = new System.Drawing.Size(123, 23);
                fromLeftBtn.TabIndex = 1;
                fromLeftBtn.Text     = "From Left";
                fromLeftBtn.Click   += pushLeftClick;
                fromLeftBtn.UseVisualStyleBackColor = true;
                dockView.Controls.Add(fromLeftBtn);

                label1          = new System.Windows.Forms.Label();
                label1.AutoSize = true;
                label1.Location = new System.Drawing.Point(4, 137);
                label1.Name     = "label1";
                label1.Size     = new System.Drawing.Size(49, 13);
                label1.TabIndex = 2;
                label1.Text     = "Direction";
                dockView.Controls.Add(label1);

                offsetTrackBar               = new TrackBar();
                offsetTrackBar.Location      = new System.Drawing.Point(3, 89);
                offsetTrackBar.Name          = "trackBar";
                offsetTrackBar.Size          = new System.Drawing.Size(123, 45);
                offsetTrackBar.TabIndex      = 3;
                offsetTrackBar.Maximum       = Config.splitOffsetMaximum;
                offsetTrackBar.Minimum       = Config.splitOffsetMinimum;
                offsetTrackBar.Value         = Config.splitOffset;
                offsetTrackBar.TickFrequency = 100;
                offsetTrackBar.Scroll       += OffsetTrackBar_ValueChanged;
                dockView.Controls.Add(offsetTrackBar);

                numericUpDown               = new System.Windows.Forms.NumericUpDown();
                numericUpDown.Location      = new System.Drawing.Point(5, 66);
                numericUpDown.Name          = "numericUpDown";
                numericUpDown.Size          = new System.Drawing.Size(119, 20);
                numericUpDown.TabIndex      = 8;
                numericUpDown.Maximum       = Config.splitOffsetMaximum;
                numericUpDown.Minimum       = Config.splitOffsetMinimum;
                numericUpDown.Value         = Config.splitOffset;
                numericUpDown.ValueChanged += NumericUpDown_ValueChanged;
                dockView.Controls.Add(numericUpDown);

                label2          = new System.Windows.Forms.Label();
                label2.AutoSize = true;
                label2.Location = new System.Drawing.Point(4, 50);
                label2.Name     = "label2";
                label2.Size     = new System.Drawing.Size(75, 13);
                label2.TabIndex = 4;
                label2.Text     = "Transition (ms)";
                dockView.Controls.Add(label2);

                label3          = new System.Windows.Forms.Label();
                label3.AutoSize = true;
                label3.Location = new System.Drawing.Point(4, 10);
                label3.Name     = "label3";
                label3.Size     = new System.Drawing.Size(113, 13);
                label3.TabIndex = 6;
                label3.Text     = "PushBlurTransition 0.1";
                dockView.Controls.Add(label3);

                linkLabel          = new LinkLabel();
                linkLabel.AutoSize = true;
                linkLabel.Font     = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
                linkLabel.Location = new System.Drawing.Point(3, 254);
                linkLabel.Name     = "linkLabel";
                linkLabel.Size     = new System.Drawing.Size(108, 12);
                linkLabel.TabIndex = 7;
                linkLabel.TabStop  = true;
                linkLabel.Click   += LinkLabel_Click;
                linkLabel.Text     = "github.com/KLEEEEEER";
                dockView.Controls.Add(linkLabel);

                dockView.DefaultFloatingSize = new System.Drawing.Size(145, 308);
                dockView.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
                dockView.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);

                myVegas.LoadDockView(dockView);
            }
        }