private void UserLogout_Click(object sender, RoutedEventArgs e) { Collections.clearInstance(); User.clearInstance(); LoginRegistrationControl.clearInstance(); DBReadWrite.clearInstance(); LoginRegister lr = new LoginRegister(); lr.Show(); p.Close(); }
private void init() { List <string> salaryRangeList = new List <string>(); List <string> jobTypeList = new List <string>(); List <string> skillList = LoginRegistrationControl.getInstance().getAvailableSkills(); salaryRangeList.Add("5000-10000"); salaryRangeList.Add("10000-20000"); salaryRangeList.Add("20000-40000"); salaryRangeList.Add("40000-80000"); salaryRangeList.Add("80000-120000"); salaryRangeList.Add("120000-150000"); salaryRangeList.Add("150000-200000"); jobTypeList.Add("Temporary"); jobTypeList.Add("Permanent"); empTypeComboBox.ItemsSource = jobTypeList; if (updateVacancy) { empTypeComboBox.SelectedIndex = Convert.ToByte(vacancy.JobType); } else { empTypeComboBox.SelectedIndex = 0; } salBrcktComboBox.ItemsSource = salaryRangeList; if (updateVacancy) { foreach (string sr in salaryRangeList) { if (sr == vacancy.MinimumSalary + "-" + vacancy.MaximumSalary) { salBrcktComboBox.SelectedValue = sr; } } } else { salBrcktComboBox.SelectedIndex = 0; } skillComboBox.ItemsSource = skillList; }
private void senderLabel_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { LoginRegistrationControl lrc = LoginRegistrationControl.getInstance(); AnotherProfile newprofile; if (mail.SenderUserName == currentUser.UserName) { newprofile = new AnotherProfile(mail.ReceiverUserName); newprofile.Show(); newprofile.Activate(); newprofile.Topmost = true; // important newprofile.Focus(); } else if (mail.ReceiverUserName == currentUser.UserName) { newprofile = new AnotherProfile(mail.SenderUserName); newprofile.Show(); newprofile.Activate(); newprofile.Topmost = true; // important newprofile.Focus(); } }