private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { var data = (Person)PersonListBinding.Current; switch (e.ColumnIndex) { case 0: EventConsultationListBinding.DataSource = data.EventConsultations.ToList(); ConsultationListBinding.DataSource = data.Consultations.ToList(); dtgvConsultations.DataSource = ConsultationListBinding; eventConsultationsDtgv.DataSource = EventConsultationListBinding; propertyGrid1.SelectedObject = data; break; case 1: var pg = ControlsFactory.Resolve <ManagePersonPage>(); pg.GetModelData(data); DialogActivator.OpenDialog(pg, $"Edit person detail: {data.FullName}.", () => { HealthCenterService.ModifyProfile(data); }); break; case 2: ExcelReports.GeneratePersonReport(data); break; } }
private async void LoadDetails() { var control = ControlsFactory.ResolveWpfControl <EventsView>(); elementHost1.Child = control; var data = await HealthCenterService.LoadEvents(); EventList = data.ToList(); control.ExportAction = () => { ExcelReports.GenerateEventParticipants(EventList); }; control.ExportSingleAction = (ev) => { ExcelReports.GemerateParticipantEvent(ev); }; control.ViewAction = (obj) => { CurrentEvent = obj; EventLogBinding.DataSource = obj.Logs.ToList(); dtgvPersonevents.DataSource = EventLogBinding; }; control.CreateAction = () => { var pg = ControlsFactory.Resolve <ManageEventsPage>(); var currentevent = new PersonEvents(); pg.GetModelData(currentevent); DialogActivator.OpenDialog(pg, $"New event", () => { HealthCenterService.CreateEvent(currentevent); LoadDetails(); }); }; control.UpdateAction = (obj) => { var pg = ControlsFactory.Resolve <ManageEventsPage>(); var currentevent = obj; pg.GetModelData(currentevent); DialogActivator.OpenDialog(pg, $"Update event {obj.Title}", () => { HealthCenterService.ModifyEvent(currentevent); LoadDetails(); }); }; control.LoadEvents(data); LoadEventParticipantChart(); LoadEventPersonCategoriesChart(); }
// => active public void ToggleActive(string[] lines, DialogActivator da) { gm.DialogOpen = true; this.da = da; dialogLines = lines; dialogBox.SetActive(true); StartCoroutine("typeText"); }
void clear() { StopAllCoroutines(); dialogText.text = ""; dialogBadgeText.text = ""; dialogLines = null; da = null; currentLine = 0; focussed = false; }
private void toolStripButton1_Click(object sender, EventArgs e) { var pg = ControlsFactory.Resolve <ManageAccountPage>(); var data = new Account(); pg.GetModelData(data); DialogActivator.OpenDialog(pg, "New account detail", () => { HealthCenterService.CreateAccount(data); }); }
private void CreateBtn_Click(object sender, EventArgs e) { var pg = ControlsFactory.Resolve <ManagePersonPage>(); var data = new Person(); pg.GetModelData(data); DialogActivator.OpenDialog(pg, "New person detail", () => { HealthCenterService.CreateProfile(data); }); }
private void toolStripButton1_Click(object sender, EventArgs e) { var pg = ControlsFactory.Resolve <ManageCreateNewConsultationPage>(); DialogActivator.OpenDialog(pg, $"New participant", async() => { pg.Data.Event = CurrentEvent.Id; await HealthCenterService.CreateEventLogs(pg.Data); LoadDetails(); }); }
private void toolStripButton2_Click(object sender, EventArgs e) { var pg = ControlsFactory.Resolve <ManageCategoryPage>(); var data = new PersonCategory(); pg.GetModelData(data); DialogActivator.OpenDialog(pg, "New Category", () => { HealthCenterService.CreateCategory(data); }); }
private void dtgvailment_CellClick(object sender, DataGridViewCellEventArgs e) { switch (e.ColumnIndex) { case 0: var pg = ControlsFactory.Resolve <ManageAilmentPage>(); var data = (Ailments)AilmentListBinding.Current; pg.GetModelData(data); DialogActivator.OpenDialog(pg, "Modify Ailment", () => { HealthCenterService.ModifyAilment(data); }); break; } }
private void dtgvConsultations_CellClick(object sender, DataGridViewCellEventArgs e) { var person = (Person)PersonListBinding.Current; var data = (Consultation)ConsultationListBinding.Current; switch (e.ColumnIndex) { case 0: var pg = ControlsFactory.Resolve <ManageConsultationPage>(); pg.GetModelData(data); DialogActivator.OpenDialog(pg, $"Edit medical consultation {person.FullName}", async() => { await HealthCenterService.ModifyMedicalConsultation(data); }); break; } }
private void toolStripButton1_Click(object sender, EventArgs e) { var person = (Person)PersonListBinding.Current; var pg = ControlsFactory.Resolve <ManageConsultationPage>(); var data = new Consultation() { PersonId = person.Id }; pg.GetModelData(data); DialogActivator.OpenDialog(pg, "New medical consultation", async() => { await HealthCenterService.CreateMedicalConsultation(data); }); }
private void dtgvAcc_CellClick(object sender, DataGridViewCellEventArgs e) { var data = (Account)AccountListBinding.Current; switch (e.ColumnIndex) { case 0: AccountLogsListBinding.DataSource = data.Logs.ToList(); dtgvlogs.DataSource = AccountLogsListBinding; break; case 1: var pg = ControlsFactory.Resolve <ManageAccountPage>(); pg.GetModelData(data); DialogActivator.OpenDialog(pg, "New account detail", () => { HealthCenterService.ModifyAccount(data); }); break; } }
public void UnregisterDialogEntity(DialogActivator dialogEntity) { dialogEntities.Remove(dialogEntity); }
public void RegisterDialogEntity(DialogActivator newDialogEntity) { dialogEntities.Add(newDialogEntity); }