public ChangeQuestionView(string _value, ControlPanelView _cp, UserModel _um) { InitializeComponent(); if (_value.Equals("question")) { panel2.Visible = true; this.Text = "Изменение секретного вопроса - Bona Fides"; } else { panel1.Visible = true; this.Text = "Изменение ответа - Bona Fides"; } phaseChangingAnswer = 1; phaseChangingQuestion = 1; controlControlPanelView = _cp; um = _um; label3.Text = "Вопрос: " + um.SecretQuestion; label4.Text = "Вопрос: " + um.SecretQuestion; controlSecuredPasswordController = new SecuredPasswordController(); controlLoginFormController = new LoginFormController(this); }
public RegisterAnEmployeeView(MainFormView _mf) { InitializeComponent(); tb_Name.Focus(); mf = _mf; lfController = new LoginFormController(this); spController = new SecuredPasswordController(); }
public RestorePasswordView(LoginFormView _lf) { InitializeComponent(); lfController = new LoginFormController(this); spControl = new SecuredPasswordController(); controlLoginFormView = _lf; ChangedSuccessfully = false; label1.Text = message1; phase = 1; }
public RestorePasswordView(ControlPanelView _cp, UserModel _um) { InitializeComponent(); lfController = new LoginFormController(this); spControl = new SecuredPasswordController(); controlControlPanelView = _cp; um = _um; ChangedSuccessfully = false; label1.Text = message2; phase = 2; tb_Input1.Visible = false; tb_Input2.Visible = true; label2.Visible = true; label1.Text = message2; label2.Text = um.SecretQuestion; this.Text = "Изменение пароля"; tb_Input2.Focus(); }
/* Конструктор */ public LoginFormView() { //показывает картинку при запуске программы //StartImage startImg = new StartImage(); //startImg.Show(); //this.Refresh(); //startImg.Refresh(); //System.Threading.Thread.Sleep(2000); //startImg.Close(); //перестали показывать картинку при запуске программы int prC = 0; foreach (Process pr in Process.GetProcesses()) { if (pr.ProcessName == "Bona Fides") { prC++; } } if (prC > 1) { MessageBox.Show("Приложение уже запущено!", "Ошибка"); Process.GetCurrentProcess().Kill(); } InitializeComponent(); string UserName = Environment.UserName; path = @"C:\Users\" + Environment.UserName + @"\AppData\Local\secure.txt"; ReSignIn = false; //если хотим не закрыть программу, а перезайти с главной формы firstLoad = true; SignInWithSaveMe = false; lfController = new LoginFormController(this); sp = new SecuredPasswordController(); LoadLogin(); }