Example #1
0
        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");
            }
        }
Example #2
0
        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");
            }
        }
 public SharedFolderForm(ClientForm clientForm)
 {
     InitializeComponent();
     this.clientForm = clientForm;
     CenterToScreen();
 }