//sync checkbox private void checkBox1_CheckedChanged(object sender, EventArgs e) { //WatcherUtil watcherUtil = new WatcherUtil(); if (checkBox1.Checked == true) { watcherUtil.startServerSync(); watcherUtil.startWatcher(); } else { watcherUtil.stopServerSync(); watcherUtil.stopWatcher(); } }
public void autheticateUser(string name, string email, string password) { if (name == "") { MessageBox.Show("Please Enter your name"); return; } if (!common.isEmailPwdNull(email, password)) { if (common.validateEmail(email)) { NewUser login = new NewUser(); if (login.newRegister(name, email, password)) { this.Hide(); WatcherUtil watcherUtil = new WatcherUtil(email); ClientForm clientForm = new ClientForm(email, watcherUtil); clientForm.Show(); watcherUtil.startServerSync(); watcherUtil.startWatcher(); } else { this.Hide(); SigninForm sf = new SigninForm(); sf.Show(); MessageBox.Show("LoginId or Password Is wrong"); //if user Name is not available in database } } else { MessageBox.Show("Please Enter valid emailID"); } } else { MessageBox.Show("Please Enter Login Id and Password"); } }
public void autheticateUser(string email, string password) { if (!common.isEmailPwdNull(email, password)) { if (common.validateEmail(email)) { Login login = new Login(); if (login.userLogin(email, password)) { this.Hide(); WatcherUtil watcherUtil = new WatcherUtil(email); ClientForm clientForm = new ClientForm(email, watcherUtil); clientForm.Show(); watcherUtil.startServerSync(); watcherUtil.startWatcher(); } else { this.Hide(); LoginForm Lg = new LoginForm(); Lg.Show(); MessageBox.Show("LoginId or Password Is wrong"); //if user Name is not available in database } } else { MessageBox.Show("Please Enter valid emailID"); } } else { MessageBox.Show("Please Enter Login Id and Password"); } }