コード例 #1
0
        private async Task InitializeAsync()
        {
            try
            {
                List <string> initialModels = await InitModelsInForm();

                if (initialModels.Count() != 3)
                {
                    throw new Exception();
                }
                List <Patient> patients = tcpService.InitPatientsInForm(initialModels[0]);
                List <Ward>    wards    = tcpService.InitWardsInForm(initialModels[1]);
                List <Doctor>  doctors  = tcpService.InitDoctorsInForm(initialModels[2]);
                InitializeComponent();
                PatientListBox.ItemsSource       = patients;
                WardListBox.ItemsSource          = wards;
                DoctorListBox.ItemsSource        = doctors;
                DateOfReceiptPicker.SelectedDate = DateTime.Now;
            }
            catch (Exception)
            {
                throw;
            }
        }