110,538
社区成员
发帖
与我相关
我的任务
分享
namespace Client
{
public partial class DefaultMenuView : BaseView
{
public override void OnLoad()
{
DefaultMenuView DefaultMenuView = new DefaultMenuView();
MenuSelect MenuSelect = new MenuSelect();
MenuSelect.defaultMenuView = DefaultMenuView;
this.Controls.Add(DefaultMenuView);
this.Controls.Add(MenuSelect);
}
public DefaultMenuView()
{
InitializeComponent();
this.title = "主菜单";
btnqueryview.Visible = true;
}
private void btnqueryview_Click(object sender, EventArgs e)
{
parentForm.LoadView(typeof(DataQueryView));
}
private void btninsert_Click(object sender, EventArgs e)
{
parentForm.LoadView(typeof(insert));
}
private void btnExit_Click(object sender, EventArgs e)
{
if (DialogResult.Yes == MessageBox.Show("确定要注销吗?", "确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2))
{
this.ParentForm.LoadView(typeof(entry));
}
}
private void btnconfig_Click(object sender, EventArgs e)
{
this.ParentForm.LoadView(typeof(MenuSelect));
}
}
}
public partial class MenuSelect : BaseView
{
private DefaultMenuView _defaultMenuView = null;
public DefaultMenuView defaultMenuView
{
set { _defaultMenuView = value; }
}
public MenuSelect()
{
InitializeComponent();
}
private void btnExit_Click(object sender, EventArgs e)
{
this.ParentForm.LoadView(typeof(DefaultMenuView));
}
private void btnSure_Click(object sender, EventArgs e)
{
if (this.checkBox1.Checked)
{
_defaultMenuView.btnqueryview.Visible = true;
}
else
{
_defaultMenuView.btnqueryview.Visible = false;
}
}
}