本文整理汇总了C#中ComboBox.LoadContent方法的典型用法代码示例。如果您正苦于以下问题:C# ComboBox.LoadContent方法的具体用法?C# ComboBox.LoadContent怎么用?C# ComboBox.LoadContent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ComboBox
的用法示例。
在下文中一共展示了ComboBox.LoadContent方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadContent
public override void LoadContent(ContentManager Content)
{
base.LoadContent(Content);
wndPanel.LoadContent(Content);
wndPanel.DrawWindow = false;
UI.Button bClose = new UI.Button(new Rectangle(WindowRectangle.Width - 112, WindowRectangle.Height - 48, 96, 32));
bClose.Parent = wndPanel;
bClose.LoadContent(Content);
bClose.Text = "Cancel";
bClose.Clicked += bClose_Clicked;
wndPanel.AddWindow("btnClose", bClose);
UI.Button bCreate = new UI.Button(new Rectangle(WindowRectangle.Width - bClose.WindowRectangle.Width - 16 - 112, WindowRectangle.Height - 48, 96, 32));
bCreate.Parent = wndPanel;
bCreate.LoadContent(Content);
bCreate.Text = "Create";
bCreate.Clicked += bCreate_Clicked;
wndPanel.AddWindow("btnCreate", bCreate);
UI.ComboBox cboWorldType = new ComboBox(new Rectangle(WindowRectangle.X + 9, WindowRectangle.Y + 104, 256, 32));
cboWorldType.LoadContent(Content);
cboWorldType.AddItem("Forest Jungle");
cboWorldType.AddItem("Prison Cells");
cboWorldType.AddItem("Sandy Beach");
cboWorldType.SelectedItem = "Forest Jungle";
wndPanel.AddWindow("cboWorldType", cboWorldType);
UI.Label lblWorldType = new UI.Label(new Rectangle(0, 74, wndPanel.WindowRectangle.Width, 20));
lblWorldType.Parent = wndPanel;
lblWorldType.LoadContent(Content);
lblWorldType.Text = "World Type";
wndPanel.AddWindow("lblWorldType", lblWorldType);
UI.Label lblName = new UI.Label(new Rectangle(0, 12, wndPanel.WindowRectangle.Width, 20));
lblName.Parent = wndPanel;
lblName.LoadContent(Content);
lblName.Text = "Level Name:";
wndPanel.AddWindow("lblLvlName", lblName);
UI.TextBox txtLevelName = new TextBox(new Rectangle(4, lblName.WindowRectangle.Height * 2, wndPanel.WindowRectangle.Width - 10, 32));
txtLevelName.Parent = wndPanel;
txtLevelName.LoadContent(Content);
txtLevelName.Clicked += txtLevelName_Clicked;
txtLevelName.OnTabPressed += txtLevelName_OnTabPressed;
txtLevelName.Text = "bla";
wndPanel.AddWindow("txtLevelName", txtLevelName);
UI.Label lblSize = new UI.Label(new Rectangle(0, 140, wndPanel.WindowRectangle.Width, 20));
lblSize.Parent = wndPanel;
lblSize.LoadContent(Content);
lblSize.Text = "World Size (In Tiles)";
wndPanel.AddWindow("lblSize", lblSize);
UI.Label lblWorldWidth = new UI.Label(new Rectangle(0, 180, 150, 20));
lblWorldWidth.Parent = wndPanel;
lblWorldWidth.LoadContent(Content);
lblWorldWidth.Text = "World Width:";
wndPanel.AddWindow("lblWorldWidth", lblWorldWidth);
UI.Label lblWorldHeight = new UI.Label(new Rectangle(220, 180, 50, 20));
lblWorldHeight.Parent = wndPanel;
lblWorldHeight.LoadContent(Content);
lblWorldHeight.Text = "World Height:";
wndPanel.AddWindow("lblWorldHeight", lblWorldHeight);
UI.TextBox txtWorldWidth = new TextBox(new Rectangle(140, 175, 80, 32));
txtWorldWidth.Parent = wndPanel;
txtWorldWidth.LoadContent(Content);
txtWorldWidth.MaxLength = 3;
txtWorldWidth.Clicked += txtLevelWidth_Clicked;
txtWorldWidth.OnTabPressed += txtWorldWidth_OnTabPressed;
txtWorldWidth.NumericBox = true;
txtWorldWidth.Text = "22";
wndPanel.AddWindow("txtLevelWidth", txtWorldWidth);
UI.TextBox txtLevelHeight = new TextBox(new Rectangle(360, 175, 80, 32));
txtLevelHeight.Parent = wndPanel;
txtLevelHeight.LoadContent(Content);
txtLevelHeight.NumericBox = true;
txtLevelHeight.MaxLength = 3;
txtLevelHeight.Text = "22";
txtLevelHeight.Clicked += txtLevelHeight_Clicked;
txtLevelHeight.OnTabPressed += txtLevelHeight_OnTabPressed;
wndPanel.AddWindow("txtLevelHeight", txtLevelHeight);
UI.CheckBox chkWater = new CheckBox(new Rectangle(4, WindowRectangle.Height - 48, 150, 24));
chkWater.Parent = wndPanel;
chkWater.LoadContent(Content);
chkWater.Text = "Water Level";
chkWater.WindowClicked += chkWater_WindowClicked;
wndPanel.AddWindow("chkWater", chkWater);
UI.TextBox txtWaterLevel = new TextBox(new Rectangle(160, WindowRectangle.Height - 48, 40, 32));
txtWaterLevel.Parent = wndPanel;
txtWaterLevel.LoadContent(Content);
txtWaterLevel.NumericBox = true;
txtWaterLevel.MaxLength = 1;
txtWaterLevel.Text = DEFAULT_WATER_LEVEL;
//.........这里部分代码省略.........