private void LRProceed_Click(object sender, RoutedEventArgs e)
 {
     if (LRTabControl.SelectedIndex == 0)
     {
         if (LUsernameBox.Text != "")
         {
             if (loginRegistrationControl.login(LUsernameBox.Text, LPasswordBox.Password.ToString()))
             {
                 currentUser = User.getInstance();
                 Profile jp = new Profile(currentUser);
                 jp.Show();
                 this.Hide();
             }
             else
             {
                 MessageBox.Show("Username Password Mismatch");
             }
         }
         else
         {
             MessageBox.Show("Enter User Name to Login Your Account");
         }
     }
     else if (LRTabControl.SelectedIndex == 1)
     {
         if (RUsernameBox.Text != "")
         {
             if (!loginRegistrationControl.checkUser(RUsernameBox.Text))
             {
                 if (RPassBox.Password.ToString() == RPassConfirmBox.Password.ToString())
                 {
                     currentUser              = User.getInstance();
                     currentUser.UserName     = RUsernameBox.Text.Trim();
                     currentUser.UserPassword = RPassBox.Password.ToString();
                     ChooseProfile cp = new ChooseProfile(this);
                     cp.Show();
                     this.Hide();
                 }
                 else
                 {
                     MessageBox.Show("Passwords don't match");
                 }
             }
             else
             {
                 MessageBox.Show("An Account is already created with this Username");
             }
         }
         else
         {
             MessageBox.Show("Enter User Name & Password to Create a new Account");
         }
     }
 }
Example #2
0
        public RecruiterRegistration(ChooseProfile cp)
        {
            InitializeComponent();
            init();
            this.cpWindow = cp;

            Uri uri = new Uri("pack://application:,,,/JobBoard.WpfApplication;Component/Resources/profileimage.png", UriKind.Absolute);
            StreamResourceInfo sri = Application.GetResourceStream(uri);

            defaultPhoto = System.Drawing.Image.FromStream(sri.Stream);
            SetDefaultProfileimage();
        }
        public JobSeekerRegistration(ChooseProfile cp)
        {
            InitializeComponent();
            this.cpWindow = cp;

            List <string> skillList = lrControl.getAvailableSkills();

            comboBox.ItemsSource = skillList;

            Uri uri = new Uri("pack://application:,,,/JobBoard.WpfApplication;Component/Resources/profileimage.png", UriKind.Absolute);
            StreamResourceInfo sri = Application.GetResourceStream(uri);

            defaultPhoto = System.Drawing.Image.FromStream(sri.Stream);
            SetDefaultProfileimage();
        }