本文整理汇总了C#中InputMode.ShowDialog方法的典型用法代码示例。如果您正苦于以下问题:C# InputMode.ShowDialog方法的具体用法?C# InputMode.ShowDialog怎么用?C# InputMode.ShowDialog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类InputMode
的用法示例。
在下文中一共展示了InputMode.ShowDialog方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LinkLabel1_LinkClicked
private void LinkLabel1_LinkClicked(System.Object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
{
InputMode inputmode = new InputMode();
switch (rms_var.FoodInputMode)
{
case 0: //菜品编码
inputmode.RadioButton1.Checked = true;
break;
case 1: //拼音码
inputmode.RadioButton2.Checked = true;
break;
case 2: //类别编码
inputmode.RadioButton3.Checked = true;
break;
case 3: //菜品类别
inputmode.RadioButton4.Checked = true;
break;
}
inputmode.ShowDialog();
switch (rms_var.FoodInputMode)
{
case 0:
LinkLabel1.Text = "菜品编码:";
Panel9.Hide();
Button11.Hide();
Button12.Hide();
Panel7.Hide();
Button7.Hide();
Button8.Hide();
txtFoodCode.Show();
txtFoodCode.BringToFront();
txtFoodCode.Focus();
txtFoodCode.SelectAll();
Panel8.Top = txtFoodCode.Top + txtFoodCode.Height + 5;
Panel8.Height = Panel1.Height - txtFoodCode.Height - 12;
break;
case 1:
LinkLabel1.Text = "拼音码:";
Panel9.Hide();
Button11.Hide();
Button12.Hide();
Panel7.Hide();
Button7.Hide();
Button8.Hide();
txtFoodCode.Show();
txtFoodCode.BringToFront();
txtFoodCode.Focus();
txtFoodCode.SelectAll();
Panel8.Top = txtFoodCode.Top + txtFoodCode.Height + 5;
Panel8.Height = Panel1.Height - txtFoodCode.Height - 12;
break;
case 2:
LinkLabel1.Text = "类别编码:";
Panel9.Hide();
Button11.Hide();
Button12.Hide();
Panel7.Hide();
Button7.Hide();
Button8.Hide();
txtFoodCode.Show();
txtFoodCode.BringToFront();
txtFoodCode.Focus();
txtFoodCode.SelectAll();
Panel8.Top = txtFoodCode.Top + txtFoodCode.Height + 5;
Panel8.Height = Panel1.Height - txtFoodCode.Height - 12;
break;
case 3:
LinkLabel1.Text = "菜品类别:";
txtFoodCode.Hide();
Panel9.Show();
Button11.Show();
Button12.Show();
Panel7.Show();
Button7.Show();
Button8.Show();
Panel8.Top = Button7.Top + Button7.Height;
Panel8.Height = Panel1.Height - Button7.Top - Button9.Height + 24;
break;
}
}