本文整理汇总了C#中ProgressBar.BindTo方法的典型用法代码示例。如果您正苦于以下问题:C# ProgressBar.BindTo方法的具体用法?C# ProgressBar.BindTo怎么用?C# ProgressBar.BindTo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProgressBar
的用法示例。
在下文中一共展示了ProgressBar.BindTo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: luoElamaLaskuri
void luoElamaLaskuri()
{
elamalaskuri = new DoubleMeter(250);
elamalaskuri.MaxValue = 250;
elamalaskuri.LowerLimit += tapaVihollinen;
ProgressBar elamaPalkki = new ProgressBar(1200, 40);
elamaPalkki.Y = Screen.Top - 80;
elamaPalkki.X = -85;
elamaPalkki.Color = Color.Transparent;
elamaPalkki.BarColor = Color.Blue;
elamaPalkki.BorderColor = Color.White;
elamaPalkki.BindTo(elamalaskuri);
Add(elamaPalkki);
}
示例2: CreateOSD
void CreateOSD()
{
jumpPowerMeter = new DoubleMeter(0.0, 0.0, JUMP_POWAH_MAX);
speedMeter = new DoubleMeter(0.0, 0.0, RUN_SPEED_MAX);
catsSavedMeter = new IntMeter(0);
ProgressBar jumpPB = new ProgressBar(200, 20);
jumpPB.Position = new Vector(Screen.Left + 150, Screen.Top - 40);
jumpPB.BindTo(jumpPowerMeter);
jumpPB.BarColor = Color.Red;
jumpPB.Color = Color.White;
Add(jumpPB);
ProgressBar speedPB = new ProgressBar(200, 20);
speedPB.Position = new Vector(Screen.Right - 150, Screen.Top - 40);
speedPB.BindTo(speedMeter);
speedPB.BarColor = Color.Blue;
speedPB.Color = Color.White;
Add(speedPB);
Label lives = new Label("Lives left: 1 of 1");
lives.Y = Screen.Top - 40;
lives.Font = Font.DefaultBold;
lives.TextColor = Color.White;
Add(lives);
Label points = new Label("");
points.IntFormatString = "Cats rescued: {0:D1}";
points.Y = Screen.Top - 80;
points.Font = Font.DefaultBold;
points.TextColor = Color.White;
points.BindTo(catsSavedMeter);
Add(points);
}