C#:多个用户设置? [英] C#: Multiple user settings?

查看:85
本文介绍了C#:多个用户设置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我一直在环顾四周,但找不到合适的答案。



是否可以执行以下操作:



我在Winform上有三个复选框。



现在我创建两个设置文件。



在settings1中,默认情况下,所有三个复选框的'选中状态为TRUE。

在settings2中,每个复选框的默认状态为FALSE。



有没有办法在运行时或用户交互时应用setting1或setting2(按钮点击,......)?

Hello all,

I''ve been looking around but did not find an appropriate answer.

Is it possible to do the following:

I have three checkboxes on a Winform.

Now I create two settings files.

In settings1, all three checkboxes'' checked state is TRUE by default.
In settings2, the default states are FALSE for each checkbox.

Is there any way to either apply setting1 or setting2 at runtime or at user interaction (button click, ...)?

推荐答案

我无法清楚地理解你的问题..



但是如果你需要检查一个CheckBox在运行时使用:



I am unable clearly understand your question..

But if you need to Check a CheckBox in runtime use :

Checkbox1.Enabled = true;
Checkbox2.Enabled = true;
Checkbox3.Enabled = true;


嗨朋友Little Bit Confusion但是可能吧帮助你



if(Setting1 == true)//可以使设置条件成立的东西

{

Checkbox1.Enabled = true;

Checkbox2.Enabled = true;

Checkbox3.Enabled = true;

MessageBox.show(Setting1 Successfully应用);

}

if(Setting2 == true)

{

Checkbox1.Enabled = false;

Checkbox2.Enabled = false;

Checkbox3.Enabled = false;

MessageBox.show(Setting2 Successfully Applied);

}

有许多事件,例如(按钮,加载,Check_Change等)可以帮助运行这些条件

谢谢
Hi Friend Little Bit Confusion but may it helps you

if(Setting1== true) // something that can make Settings condition true
{
Checkbox1.Enabled = true;
Checkbox2.Enabled = true;
Checkbox3.Enabled = true;
MessageBox.show("Setting1 Successfully Applied ");
}
if(Setting2==true)
{
Checkbox1.Enabled = false;
Checkbox2.Enabled = false;
Checkbox3.Enabled = false;
MessageBox.show("Setting2 Successfully Applied ");
}
there is many Events e.g(Button, Load, Check_Change etc) that can help to run these conditions
thanks


这篇关于C#:多个用户设置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆