本文整理汇总了C#中ListBox.Disable方法的典型用法代码示例。如果您正苦于以下问题:C# ListBox.Disable方法的具体用法?C# ListBox.Disable怎么用?C# ListBox.Disable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ListBox
的用法示例。
在下文中一共展示了ListBox.Disable方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InitToolBarWindow
protected void InitToolBarWindow()
{
ToolBar = new Window(UI.GetInterface(Name), null, "Tools", TextOrientation.Center, Vector2.Zero, new Vector2(122, Game1.ScreenHeight - 21), true, false, true, true);
ToolBar.MinimizedPosition = new Vector2(Game1.ScreenWidth - ToolBar.Size.X, 25);
//Brush
ToolBar.AddElement(new TextureButton(UI.GetInterface(Name), Content.Load<Texture2D>("UI/Textures/brush"),
new Vector2(5, 5), new Vector2(50, 50), new Vector2(UI.BGOffset), origin, hover, pressed, false));
//Bucket
ToolBar.AddElement(new TextureButton(UI.GetInterface(Name), Content.Load<Texture2D>("UI/Textures/bucket"),
new Vector2(60, 5), new Vector2(50, 50), new Vector2(UI.BGOffset), origin, hover, pressed, false));
//Erasor
ToolBar.AddElement(new TextureButton(UI.GetInterface(Name), Content.Load<Texture2D>("UI/Textures/bucket"),
new Vector2(5, 60), new Vector2(50, 50), new Vector2(UI.BGOffset), origin, hover, pressed, false));
ToolBar.AddElement(new Label(UI.GetInterface(Name), "Layer: base", 12, TextOrientation.Center, new Vector2(2, 200), new Vector2(117, 25), Color.Black, origin));
ToolBar.AddElement(new Button(UI.GetInterface(Name), "<", 12, TextOrientation.Center, new Vector2(3, 230), new Vector2(25, 25), origin, hover, pressed));
ToolBar.AddElement(new Button(UI.GetInterface(Name), ">", 12, TextOrientation.Center, new Vector2(33, 230), new Vector2(25, 25), origin, hover, pressed));
ToolBar.AddElement(new Button(UI.GetInterface(Name), "+", 12, TextOrientation.Center, new Vector2(63, 230), new Vector2(25, 25), origin, hover, pressed));
ToolBar.AddElement(new Button(UI.GetInterface(Name), "-", 12, TextOrientation.Center, new Vector2(93, 230), new Vector2(25, 25), origin, hover, pressed));
ltlb = new ListBox(UI.GetInterface(Name), 12, TextOrientation.Left, new Vector2(5, 270), new Vector2(110, 200), Color.Black, Color.White, origin, hover);
ltlb.Disable();
ToolBar.AddElement(ltlb);
ToolBar[0].Clicked += (sender) =>
{
Map.CurrentBrush.SetBrush(new BrushTool(Map.CurrentBrush.Tool.BaseTile, Map.CurrentBrush.Tool.BrushSize));
};
ToolBar[1].Clicked += (sender) =>
{
Map.CurrentBrush.SetBrush(new FillTool(Map.CurrentBrush.Tool.BaseTile));
};
ToolBar[2].Clicked += (sender) =>
{
Map.CurrentBrush.SetBrush(new BrushTool(Map.Settings.AccessibleTiles.PlaceholderTile, Map.CurrentBrush.Tool.BrushSize));
};
ToolBar[4].Clicked += (sender) =>
{
Map.SetActiveLayer(Map.ActiveLayerIndex - 1);
};
ToolBar[5].Clicked += (sender) =>
{
Map.SetActiveLayer(Map.ActiveLayerIndex + 1);
};
ToolBar[6].Clicked += (sender) =>
{
GameStateManager.TransitionState(GameStateManager.NewLayerPrefs);
};
ToolBar[7].Clicked += (sender) =>
{
Map.RemoveActiveLayer();
};
}