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


C# Controls.Manager类代码示例

本文整理汇总了C#中TomShane.Neoforce.Controls.Manager的典型用法代码示例。如果您正苦于以下问题:C# Manager类的具体用法?C# Manager怎么用?C# Manager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Manager类属于TomShane.Neoforce.Controls命名空间,在下文中一共展示了Manager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SideBarPanel

    ////////////////////////////////////////////////////////////////////////////           
    ////////////////////////////////////////////////////////////////////////////

    #endregion

    #region //// Properties ////////

    ////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////    

    #endregion

    #region //// Construstors //////

    ////////////////////////////////////////////////////////////////////////////       
    public SideBarPanel(Manager manager): base(manager)
    {     
      CanFocus = false;
      Passive = true;
      Width = 64;
      Height = 64;
    }
开发者ID:VivekRajagopal,项目名称:Neoforce-Mono,代码行数:22,代码来源:SidebarPanel.cs

示例2: TabPage

		////////////////////////////////////////////////////////////////////////////

		#endregion

		#region //// Constructors //////

		////////////////////////////////////////////////////////////////////////////
		public TabPage(Manager manager)
			: base(manager)
		{
			Color = Color.Transparent;
			Passive = true;
			CanFocus = false;
		}
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:14,代码来源:TabControl.cs

示例3: Show

 public static void Show(Manager manager, Era era, string title)
 {
     NewEraWindow msgBox = new NewEraWindow(manager, era);
     msgBox.Text = title;
     msgBox.Resizable = false;
     msgBox.ShowModal();
 }
开发者ID:mrommel,项目名称:MiRo.SimHexWorld,代码行数:7,代码来源:NewEraWindow.cs

示例4: LoadContent

        protected override void LoadContent(PloobsEngine.Engine.GraphicInfo GraphicInfo, PloobsEngine.Engine.GraphicFactory factory, PloobsEngine.SceneControl.IContentManager contentManager)
        {
            base.LoadContent(GraphicInfo, factory, contentManager);

            ngui = Gui as NeoforceGui;
            manager = ngui.Manager;

            Window window = new Window(manager);
            window.Init();
            window.Text = "Options";
            window.Width = 480;
            window.Height = 200;
            window.Center();
            window.Visible = true;

            Button button = new Button(manager);
            button.Init();
            button.Text = "OK";
            button.Width = 72;
            button.Height = 24;
            button.Left = (window.ClientWidth / 2) - (button.Width / 2);
            button.Top = window.ClientHeight - button.Height - 8;
            button.Anchor = Anchors.Bottom;
            button.Parent = window;
            button.Click += new TomShane.Neoforce.Controls.EventHandler(button_Click);

            manager.Add(window);
        }
开发者ID:tubitos,项目名称:1,代码行数:28,代码来源:Options.cs

示例5: GameMapBox

        public GameMapBox(Manager manager)
            : base(manager)
        {
            _mapRenderer = new MapRenderer(manager);

            Initialize();
        }
开发者ID:mrommel,项目名称:MiRo.SimHexWorld,代码行数:7,代码来源:GameMapBox.cs

示例6: StackPanel

      private const int refreshTime = 300; //ms
    #endregion
   
    #region //// Constructors //////

    ////////////////////////////////////////////////////////////////////////////
    public StackPanel(Manager manager, Orientation orientation): base(manager)
    {
      this.orientation = orientation;
      this.Color = Color.Transparent;
      this.autoRefresh = true;
      refreshTimer = new TimeSpan(0, 0, 0, 0, refreshTime);
    }
开发者ID:Kammikazy,项目名称:Neoforce-Mono,代码行数:13,代码来源:StackPanel.cs

示例7: CreatePlayerInfo

        public virtual void CreatePlayerInfo(Manager manager, Player player, Control control, ref int yPos)
        {
            var playerAvatar = player.Avatar;

            var imageIcon = new Button(manager) {
                Glyph = new Glyph(playerAvatar),
                Height = (int)(playerAvatar.Height / 1.5),
                Width = (int)(playerAvatar.Width / 1.5),
                Left = 16,
                Top = 16,
                Parent = control,
                Color = player.PlayerColor,
                Name = IgnoreString
            };
            imageIcon.Init();
            imageIcon.FocusGained += (sender, args) => imageIcon.Enabled = false;

            var descriptionText = new Label(manager) {
                Left = imageIcon.Left + imageIcon.Width + 16, Width = 200,
                Height = imageIcon.Height,
                Top = 25,
                Text = String.Format(
                    "Player Name : {0}\n\n" +
                    "Player Cash : ${1:N0}\n\n" +
                    "Player Total Worth : ${2:N0}\n\n" +
                    "Player Position : {3:N0}\n\n",
                    player.Name, player.Cash, player.TotalValue, PlayerPos(player)),
                Alignment = Alignment.TopLeft,
                Parent = control,
                Name = IgnoreString
            };
            descriptionText.Init();

            yPos = imageIcon.Top + imageIcon.Height + 16;
        }
开发者ID:AlanFoster,项目名称:Game-of-Life,代码行数:35,代码来源:PlayerTab.cs

示例8: StartupDialogSystem

 public StartupDialogSystem(Manager p_manager, Dictionary<string, Texture2D> p_textures)
 {
     manager = p_manager;
     hasChangedTilemap = false;
     requestToChangeTilemap = false;
     textures = p_textures;
 }
开发者ID:Hoodad,项目名称:Editor_TLCB,代码行数:7,代码来源:StartupDialogSystem.cs

示例9: Window

        ////////////////////////////////////////////////////////////////////////////
        public Window(Manager manager)
            : base(manager)
        {
            CheckLayer(Skin, lrWindow);
              CheckLayer(Skin, lrCaption);
              CheckLayer(Skin, lrFrameTop);
              CheckLayer(Skin, lrFrameLeft);
              CheckLayer(Skin, lrFrameRight);
              CheckLayer(Skin, lrFrameBottom);
              CheckLayer(Manager.Skin.Controls[skButton], lrButton);
              CheckLayer(Manager.Skin.Controls[skShadow], lrShadow);

              SetDefaultSize(640, 480);
              SetMinimumSize(100, 75);

              btnClose = new Button(manager);
              btnClose.Skin = new SkinControl(Manager.Skin.Controls[skButton]);
              btnClose.Init();
              btnClose.Detached = true;
              btnClose.CanFocus = false;
              btnClose.Text = null;
              btnClose.Click += new EventHandler(btnClose_Click);
              btnClose.SkinChanged += new EventHandler(btnClose_SkinChanged);

              AdjustMargins();

              AutoScroll = true;
              Movable = true;
              Resizable = true;
              Center();

              Add(btnClose, false);

              oldAlpha = Alpha;
        }
开发者ID:benburt,项目名称:Neoforce-Mono,代码行数:36,代码来源:Window.cs

示例10: Timer

 /// <summary>
 /// Class constructor.
 /// </summary>
 public Timer(Manager manager)
     : base(manager)
 {
     //Initialize stuff
     m_Font = null;
     m_Time = TimeSpan.Zero;
 }
开发者ID:yggy123,项目名称:closed-sky,代码行数:10,代码来源:Timer.cs

示例11: ComboBox

        /// <summary>
        /// Creates a new combo box control.
        /// </summary>
        /// <param name="manager">GUI manager for the combo box control.</param>
        public ComboBox(Manager manager)
            : base(manager)
        {
            // Set dimensions of the combo box text box control.
            Height = 20;
            Width = 64;
            ReadOnly = true;

            // Configure the combo box drop-down button control.
            btnDown = new Button(Manager);
            btnDown.Init();
            btnDown.Skin = new SkinControl(Manager.Skin.Controls["ComboBox.Button"]);
            btnDown.CanFocus = false;
            btnDown.Click += new EventHandler(btnDown_Click);
            Add(btnDown, false);

            // Configure the combo box drop-down list control.
            lstCombo = new ListBox(Manager);
            lstCombo.Init();
            lstCombo.HotTrack = true;
            lstCombo.Detached = true;
            lstCombo.Visible = false;
            lstCombo.Click += new EventHandler(lstCombo_Click);
            lstCombo.FocusLost += new EventHandler(lstCombo_FocusLost);
            lstCombo.Items = items;
            manager.Input.MouseDown += new MouseEventHandler(Input_MouseDown);
        }
开发者ID:Rfvgyhn,项目名称:Neoforce,代码行数:31,代码来源:ComboBox.cs

示例12: VTank

        /// <summary>
        /// Game constructor.  Creates a new GraphicsDeviceManager and sets the root directory to "Content".
        /// </summary>
        public VTank()
        {
            GraphicsDeviceManager = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";
            Manager = new Manager(this, GraphicsDeviceManager);
            GraphicsDeviceManager.PreparingDeviceSettings += this.graphics_PreparingDeviceSettings;

            FormManager = new FormManager(GraphicsDeviceManager, this, Manager);
            Manager.SkinDirectory = @"Content\Skins\";

            // Set the resolution and full screen values in constructor so that it starts
            // with these values without needing graphics.ApplyChanges().
            Options = Options.ReadOptions();
            invocationBuffer = new InvocationBuffer();
            string resolution = Options.Video.Resolution;
            int width = int.Parse(resolution.Substring(0, resolution.IndexOf("x")));
            int height = int.Parse(resolution.Substring(resolution.IndexOf("x") + 1));

            GraphicsDeviceManager.PreferredBackBufferWidth = width;
            GraphicsDeviceManager.PreferredBackBufferHeight = height;
            GraphicsDeviceManager.IsFullScreen = !Options.Video.Windowed;

            Width = width;
            Height = height;
        }
开发者ID:summer-of-software,项目名称:vtank,代码行数:28,代码来源:VTank.cs

示例13: StateSystem

 public StateSystem(Manager p_manager)
     : base()
 {
     shouldShutdown = false;
     manager = p_manager;
     canvasCanBeReached = false;
 }
开发者ID:Hoodad,项目名称:Editor_TLCB,代码行数:7,代码来源:StateSystem.cs

示例14: CollapsePanel

        public CollapsePanel(Manager manager, Control parent, string Name, int expandedHeight = 100, bool extended = true)
        {
            this.panel = new GroupPanel(manager);
            panel.Init();
            panel.Height = expandedHeight;
            panel.Width = parent.Width - 20;
            panel.Resizable = true;
            //panel.Text = "  " + Name.Trim();
            Text = Name;
            this.collapseButton = new Button(manager);
            collapseButton.Init();
            collapseButton.Width = 15;
            collapseButton.Height = 18;
            collapseButton.Text = "^";
            collapseButton.Click += collapseButton_Click;
            this.ExpandedHeight = expandedHeight;

            this.panelControls = new Dictionary<string, Control>();
            this.parent = parent;
            parent.Add(panel);
            parent.Add(collapseButton);
            this.IsExtended = extended;

            parent.Refresh();
        }
开发者ID:GameMakersUnion,项目名称:BoulderDash-OrbIt,代码行数:25,代码来源:CollapsePanel.cs

示例15: ListBox

        ////////////////////////////////////////////////////////////////////////////       
        public ListBox(Manager manager)
            : base(manager)
        {
            Width = 64;
            Height = 64;
            MinimumHeight = 16;

            sbVert = new ScrollBar(Manager, Orientation.Vertical);
            sbVert.Init();
            sbVert.Parent = this;
            sbVert.Left = Left + Width - sbVert.Width - Skin.Layers["Control"].ContentMargins.Right;
            sbVert.Top = Top + Skin.Layers["Control"].ContentMargins.Top;
            sbVert.Height = Height - Skin.Layers["Control"].ContentMargins.Vertical;
            sbVert.Anchor = Anchors.Top | Anchors.Right | Anchors.Bottom;
            sbVert.PageSize = 25;
            sbVert.Range = 1;
            sbVert.PageSize = 1;
            sbVert.StepSize = 10;

            pane = new ClipBox(manager);
            pane.Init();
            pane.Parent = this;
            pane.Top = Skin.Layers["Control"].ContentMargins.Top;
            pane.Left = Skin.Layers["Control"].ContentMargins.Left;
            pane.Width = Width - sbVert.Width - Skin.Layers["Control"].ContentMargins.Horizontal - 1;
            pane.Height = Height - Skin.Layers["Control"].ContentMargins.Vertical;
            pane.Anchor = Anchors.All;
            pane.Passive = true;
            pane.CanFocus = false;
            pane.Draw += new DrawEventHandler(DrawPane);

            CanFocus = true;
            Passive = false;
        }
开发者ID:Kammikazy,项目名称:NeoforceControls-SharpDX,代码行数:35,代码来源:ListBox.cs


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