public async Task Init() { Group.SetSpecialtyService(SpecialtyDataService); Student.SetService(GroupDataService); Group.SetStudentService(StudentDataService); if (SettingsManager.GetBool("LocalMode")) { LoadExamples(); return; } try { await SpecialtyDataService.Refresh(); await GroupDataService.Refresh(); await StudentDataService.Refresh(); } catch (Exception e) { MessageBox.Show($"Не удалось подключиться к серверу!\n{e.Message}"); Environment.Exit(-1); } }