当前位置: 首页>>代码示例>>C#>>正文


C# Panel.BringToFront方法代码示例

本文整理汇总了C#中Panel.BringToFront方法的典型用法代码示例。如果您正苦于以下问题:C# Panel.BringToFront方法的具体用法?C# Panel.BringToFront怎么用?C# Panel.BringToFront使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Panel的用法示例。


在下文中一共展示了Panel.BringToFront方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DockableControl

    public DockableControl()
    {
        Size = new Size(200, 400);

        /*initialize the working area*/
        p_WorkingArea = new Panel() {
            Location = new Point(0, CaptionHeight),
            Size = new Size(
                Width,
                Height - CaptionHeight),
            Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Bottom
        };

        Controls.Add(p_WorkingArea);
        p_WorkingArea.BringToFront();
    }
开发者ID:TomWilsonCoder,项目名称:oside,代码行数:16,代码来源:DockableControl.cs

示例2: BuildURLTabs

    public static TabPage BuildURLTabs(int ID, EventHandler eh)
    {
        try
        {

            TabPage TP = new TabPage(Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetAssembly(typeof(URLTabPlugin)).Location).Replace("_", " "));
            Panel p = new Panel();
            TP.Controls.Add(p);
            p.Dock = DockStyle.Fill;
            p.BringToFront();
            p.Tag = ID;
            p.VisibleChanged += new EventHandler(eh);
            return TP;
        }
        catch (Exception e)
        {
            return null;
        }
    }
开发者ID:ManagedITStack,项目名称:labtech_URLTabPlugin,代码行数:19,代码来源:URLTabPlugin.cs

示例3: MainIDE

    public MainIDE(Splash splash)
    {
        BackColor = Color.FromArgb(255, 200, 200, 200);
        Icon = Icons.GetIcon("icons.logo", 32);
        Text = "OS Development Studio";

        //once the form has loaded, send a signal to the
        //splash screen to close.
        Load += delegate(object sender, EventArgs e) {
            splash.Ready();
            Focus();
        };

        //set the minimum size of the window to 75% of the current screen
        Size screenSize = Screen.FromPoint(Cursor.Position).WorkingArea.Size;
        MinimumSize = new Size(
                (int)(screenSize.Width * 0.75),
                (int)(screenSize.Height * 0.75));

        //create the initial panels
        StatusStrip status = new StatusStrip();
        p_WorkingArea = new Panel { Dock = DockStyle.Fill };
        ToolStrip menu = new ToolStrip {
            GripStyle = ToolStripGripStyle.Hidden,
            Renderer = new ToolStripProfessionalRenderer() {
                RoundedEdges = false
            }
        };

        //add the controls
        Controls.Add(menu);
        Controls.Add(status);
        Controls.Add(p_WorkingArea);
        p_WorkingArea.BringToFront();

        /*Build the main menu items*/
        ToolStripItem fileMenu = menu.Items.Add("File");
        fileMenu.Click += delegate(object sender, EventArgs e) {
            buildSplitContainer(
                null,
                new Control() { BackColor = Color.Red },
                p_SolutionExplorer);
        };
        ToolStripItem editMenu = menu.Items.Add("Edit");
        ToolStripItem buildMenu = menu.Items.Add("Build");
        ToolStripItem helpMenu = menu.Items.Add("Help");
        menu.Items.Add(new ToolStripSeparator());
        ToolStripItem run = menu.Items.Add(Icons.GetBitmap("tools.run", 16));
        run.ToolTipText = "Run";

        /*Test code*/
        Solution solution = new Solution("./testsolution/solution.ossln");

        //initialize the components
        p_SolutionExplorer = new SolutionBrowserControl();
        p_TextEditor = new TextEditor();
        p_SolutionExplorer.AddSolution(solution);

        //create the components to seperate the different working area
        //components.
        buildSplitContainer(null, null, p_SolutionExplorer);
    }
开发者ID:TomWilsonCoder,项目名称:oside,代码行数:62,代码来源:MainIDE+-+Copy.cs

示例4: MainIDE

    public MainIDE(Splash splash)
    {
        BackColor = Color.FromArgb(255, 230, 230, 230);
        ForeColor = Color.Black;

        Icon = Icons.GetIcon("icons.logo", 32);
        Text = "OS Development Studio";

        //trigger initialization of the text editor core
        TextEditor.Initialize();

        //once the form has loaded, send a signal to the
        //splash screen to close.
        Load += delegate(object sender, EventArgs e) {
            splash.Ready();
            Focus();
        };

        //load the size and location of the window the last time the application
        //was running.
        if (RuntimeState.ObjectExists("mainIDE.windowRect")) {
            RuntimeState.RECTANGLE rect = (RuntimeState.RECTANGLE)RuntimeState.GetObject(
                "mainIDE.windowRect",
                typeof(RuntimeState.RECTANGLE));
            //StartPosition = FormStartPosition.Manual;
            Location = new Point(rect.X, rect.Y);
            Size = new Size(rect.Width, rect.Height);

            //restore the window state
            if (RuntimeState.ObjectExists("mainIDE.windowState")) {
                WindowState = (FormWindowState)(byte)RuntimeState.GetObject(
                    "mainIDE.windowState",
                    typeof(byte));
            }
        }
        else {
            //set the initial size of the window to 75% of the current screen
            Size screenSize = Screen.FromPoint(Cursor.Position).WorkingArea.Size;
            Size = new Size(
                    (int)(screenSize.Width * 0.75),
                    (int)(screenSize.Height * 0.75));
            StartPosition = FormStartPosition.CenterScreen;
        }

        #region Create the initial panels
        p_StatusStrip = new StatusStrip { BackColor = BackColor };
        p_WorkingArea = new Panel { Dock = DockStyle.Fill };
        ToolStrip menu = new ToolStrip {
            GripStyle = ToolStripGripStyle.Hidden,
            Renderer = new toolStripRenderer(),
            BackColor = BackColor,
            ForeColor = ForeColor
        };
        p_Menu = menu;
        Controls.Add(menu);
        Controls.Add(p_StatusStrip);
        Controls.Add(p_WorkingArea);
        p_WorkingArea.BringToFront();
        #endregion

        #region Menu
        /*Build the main menu items*/
        menu.Items.Add(new ToolStripMenuItem("File", null, getFileMenuItems()));
        menu.Items.Add(new ToolStripMenuItem("Edit", null, getEditMenuItems()));
        menu.Items.Add(new ToolStripMenuItem("Build", null, getBuildMenuItems()));
        menu.Items.Add(new ToolStripMenuItem("Tools", null, getToolsMenuItems()));
        menu.Items.Add(new ToolStripMenuItem("Help", null, getHelpMenuItems()));

        /*Build shortcuts*/
        menu.Items.Add(new ToolStripSeparator());
        p_MenuStripRunButton = menu.Items.Add(null, Icons.GetBitmap("tools.run", 16), menu_build_run);
        menu.Items.Add(null, Icons.GetBitmap("tools.stop", 16), menu_build_stop);
        menu.Items.Add(new ToolStripSeparator());
        menu.Items.Add(null, Icons.GetBitmap("tools.build", 16), menu_build_build);
        #endregion

        //initialize the components
        initializeComponentSkeleton();
        initializeSolutionBrowser();
        initializeFileEditor();
        initializeOutputWindow();
        initializeStatusStrip();

        //create a UI update timer
        Timer updTimer = new Timer() {
            Interval = 30,
            Enabled = true
        };
        updTimer.Tick += uiUpdate;

        //clean up
        p_WorkingArea.BringToFront();
        p_SaveStateEnabled = true;
    }
开发者ID:TomWilsonCoder,项目名称:oside,代码行数:94,代码来源:MainIDE.cs


注:本文中的Panel.BringToFront方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。