示例#1
0
        private void CandidateClicked(object sender, RoutedEventArgs e)
        {
            Button btn = sender as Button;

            if (human_list.SelectedIndex > -1)
            {
                int    selInd        = human_list.SelectedIndex;
                Person clickedPerson = Data.HumanCandidates[selInd];
                foreach (Window window in Application.Current.Windows)
                {
                    if (window.GetType() == typeof(MainWindow))
                    {
                        (window as MainWindow).GridPrincipal.Children.Add(new JobInterview(clickedPerson));
                    }
                }
            }
            else if (robot_list.SelectedIndex > -1)
            {
                int selInd = robot_list.SelectedIndex;
                RobotForInterviewAdapter clickedRobot = Data.RobotAdapters[selInd];
                foreach (Window window in Application.Current.Windows)
                {
                    if (window.GetType() == typeof(MainWindow))
                    {
                        (window as MainWindow).GridPrincipal.Children.Add(new JobInterview(clickedRobot));
                    }
                }
            }
            else
            {
                MessageBox.Show("Wybierz kandydata!");
            }
        }
示例#2
0
文件: Data.cs 项目: xlimiii/FutureHR
        private static List <RobotForInterviewAdapter> UploadRobotsForInterviewAdapters()
        {
            List <RobotForInterviewAdapter> rfia = new List <RobotForInterviewAdapter>();

            foreach (Robot robot in RobotCandidates)
            {
                RobotForInterviewAdapter r = new RobotForInterviewAdapter(robot);
                rfia.Add(r);
            }
            return(rfia);
        }