예제 #1
0
        public UserSettingForm()
        {
            SetStyle(
                ControlStyles.AllPaintingInWmPaint | //不闪烁
                ControlStyles.OptimizedDoubleBuffer  //支持双缓存
                , true);
            InitializeComponent();

            AutoScale(this);
            //加载上次保存的用户设置
            comboBox1.Text       = INIhelp.GetValue("当前用户");
            textBox1.Text        = INIhelp.GetValue("背光时间");
            dateTimePicker2.Text = INIhelp.GetValue("时钟设置");
            textBox2.Text        = INIhelp.GetValue("修改密码");
            comboBox2.Text       = INIhelp.GetValue("蜂鸣器");
            textBox3.Text        = INIhelp.GetValue("修改加密锁");
        }
예제 #2
0
        public MainSettingForm()
        {
            SetStyle(
                ControlStyles.AllPaintingInWmPaint | //不闪烁
                ControlStyles.OptimizedDoubleBuffer  //支持双缓存
                , true);
            InitializeComponent();
            AutoScale(this);

            HomeForm.xinlei = false;
            if (INIhelp.GetValue("当前用户") != "管理员权限")
            {
                flag = true;
            }
            else
            {
                flag = false;
            }
        }
예제 #3
0
        public RuanxianweiForm()
        {
            SetStyle(
                ControlStyles.AllPaintingInWmPaint | //不闪烁
                ControlStyles.OptimizedDoubleBuffer  //支持双缓存
                , true);
            InitializeComponent();
            AutoScale(this);
            //加载软限位设置(读上次保存)
            textBox1.Text = INIhelp.GetValue("X轴上限位");
            textBox4.Text = INIhelp.GetValue("X轴下限位");

            textBox2.Text = INIhelp.GetValue("Z轴上限位");
            textBox5.Text = INIhelp.GetValue("Z轴下限位");

            textBox8.Text = INIhelp.GetValue("Y轴上限位");
            textBox6.Text = INIhelp.GetValue("Y轴下限位");

            textBox9.Text = INIhelp.GetValue("O轴上限位");
            textBox7.Text = INIhelp.GetValue("O轴下限位");
        }
예제 #4
0
        private void ret_btn3_Click(object sender, EventArgs e)
        {
            //点击返回保存用户设置
            INIhelp.SetValue("当前用户", comboBox1.Text);
            INIhelp.SetValue("背光时间", textBox1.Text);
            INIhelp.SetValue("时钟设置", dateTimePicker2.Text);
            INIhelp.SetValue("修改密码", textBox2.Text);
            INIhelp.SetValue("蜂鸣器", comboBox2.Text);
            INIhelp.SetValue("修改加密锁", textBox3.Text);

            if (INIhelp.GetValue("当前用户") != "管理员权限")
            {
                MainSettingForm.flag = true;
            }
            else
            {
                MainSettingForm.flag = false;
            }

            this.Close();
            this.DialogResult = DialogResult.OK;
        }
예제 #5
0
        /// <summary>
        /// 获取指示灯状态
        /// </summary>
        private void getStatus()
        {
            if (INIhelp.GetValue(GlobalV.sts3) == "1")
            {
                button3.BackColor = Color.Red;
            }
            if (INIhelp.GetValue(GlobalV.sts3) == "0")
            {
                button3.BackColor = Color.Transparent;
            }

            if (INIhelp.GetValue(GlobalV.sts4) == "1")
            {
                button4.BackColor = Color.Red;
            }
            if (INIhelp.GetValue(GlobalV.sts4) == "0")
            {
                button4.BackColor = Color.Transparent;
            }

            if (INIhelp.GetValue(GlobalV.sts5) == "1")
            {
                button5.BackColor = Color.Red;
            }
            if (INIhelp.GetValue(GlobalV.sts5) == "0")
            {
                button5.BackColor = Color.Transparent;
            }

            if (INIhelp.GetValue(GlobalV.sts6) == "1")
            {
                button6.BackColor = Color.Red;
            }
            if (INIhelp.GetValue(GlobalV.sts6) == "0")
            {
                button6.BackColor = Color.Transparent;
            }

            if (INIhelp.GetValue(GlobalV.sts7) == "1")
            {
                button7.BackColor = Color.Red;
            }
            if (INIhelp.GetValue(GlobalV.sts7) == "0")
            {
                button7.BackColor = Color.Transparent;
            }

            if (INIhelp.GetValue(GlobalV.sts8) == "1")
            {
                button8.BackColor = Color.Red;
            }
            if (INIhelp.GetValue(GlobalV.sts8) == "0")
            {
                button8.BackColor = Color.Transparent;
            }

            if (INIhelp.GetValue(GlobalV.sts9) == "1")
            {
                button9.BackColor = Color.Red;
            }
            if (INIhelp.GetValue(GlobalV.sts9) == "0")
            {
                button9.BackColor = Color.Transparent;
            }

            if (INIhelp.GetValue(GlobalV.sts10) == "1")
            {
                button10.BackColor = Color.Red;
            }
            if (INIhelp.GetValue(GlobalV.sts10) == "0")
            {
                button10.BackColor = Color.Transparent;
            }

            if (INIhelp.GetValue(GlobalV.sts11) == "1")
            {
                button11.BackColor = Color.Red;
            }
            if (INIhelp.GetValue(GlobalV.sts11) == "0")
            {
                button11.BackColor = Color.Transparent;
            }

            if (INIhelp.GetValue(GlobalV.sts12) == "1")
            {
                button12.BackColor = Color.Red;
            }
            if (INIhelp.GetValue(GlobalV.sts12) == "0")
            {
                button12.BackColor = Color.Transparent;
            }

            if (INIhelp.GetValue(GlobalV.sts13) == "1")
            {
                button13.BackColor = Color.Red;
            }
            if (INIhelp.GetValue(GlobalV.sts13) == "0")
            {
                button13.BackColor = Color.Transparent;
            }

            if (INIhelp.GetValue(GlobalV.sts14) == "1")
            {
                button14.BackColor = Color.Red;
            }
            if (INIhelp.GetValue(GlobalV.sts14) == "0")
            {
                button14.BackColor = Color.Transparent;
            }

            if (INIhelp.GetValue(GlobalV.sts15) == "1")
            {
                button15.BackColor = Color.Red;
            }
            if (INIhelp.GetValue(GlobalV.sts15) == "0")
            {
                button15.BackColor = Color.Transparent;
            }

            if (INIhelp.GetValue(GlobalV.sts16) == "1")
            {
                button16.BackColor = Color.Red;
            }
            if (INIhelp.GetValue(GlobalV.sts16) == "0")
            {
                button16.BackColor = Color.Transparent;
            }

            if (INIhelp.GetValue(GlobalV.sts17) == "1")
            {
                button17.BackColor = Color.Red;
            }
            if (INIhelp.GetValue(GlobalV.sts17) == "0")
            {
                button17.BackColor = Color.Transparent;
            }
        }