示例#1
0
        private void butChange_Click(object sender, EventArgs e)
        {
            FormSecurityLock FormS = new FormSecurityLock();

            FormS.ShowDialog();            //prefs are set invalid within that form if needed.
            if (PrefC.GetInt(PrefName.SecurityLockDays) > 0)
            {
                textDaysLock.Text = PrefC.GetInt(PrefName.SecurityLockDays).ToString();
            }
            else
            {
                textDaysLock.Text = "";
            }
            if (PrefC.GetDate(PrefName.SecurityLockDate).Year > 1880)
            {
                textDateLock.Text = PrefC.GetDate(PrefName.SecurityLockDate).ToShortDateString();
            }
            else
            {
                textDateLock.Text = "";
            }
        }
        private void butChange_Click(object sender, EventArgs e)
        {
            //Copied from FormGlobalSecurity.
            FormSecurityLock FormS = new FormSecurityLock();

            FormS.ShowDialog();            //prefs are set invalid within that form if needed.
            if (PrefC.GetInt(PrefName.SecurityLockDays) > 0)
            {
                textDaysLock.Text = PrefC.GetInt(PrefName.SecurityLockDays).ToString();
            }
            else
            {
                textDaysLock.Text = "";
            }
            if (PrefC.GetDate(PrefName.SecurityLockDate).Year > 1880)
            {
                textDateLock.Text = PrefC.GetDate(PrefName.SecurityLockDate).ToShortDateString();
            }
            else
            {
                textDateLock.Text = "";
            }
            checkLockIncludesAdmin.Checked = PrefC.GetBool(PrefName.SecurityLockIncludesAdmin);
        }
示例#3
0
文件: FormSecurity.cs 项目: mnisl/OD
		private void butChange_Click(object sender,EventArgs e) {
			FormSecurityLock FormS=new FormSecurityLock();
			FormS.ShowDialog();//prefs are set invalid within that form if needed.
			if(PrefC.GetInt(PrefName.SecurityLockDays)>0){
				textDaysLock.Text=PrefC.GetInt(PrefName.SecurityLockDays).ToString();
			}
			else{
				textDaysLock.Text="";
			}
			if(PrefC.GetDate(PrefName.SecurityLockDate).Year>1880) {
				textDateLock.Text=PrefC.GetDate(PrefName.SecurityLockDate).ToShortDateString();
			}
			else {
				textDateLock.Text="";
			}
		}