private void LoadData() { FileInfo olderfile = new FileInfo(Application.StartupPath + "\\" + "old.xml"); FileInfo newfile = new FileInfo(Application.StartupPath + "\\" + "new.xml"); contentType modelold = Deserializer <contentType>(olderfile); contentType modelnew = Deserializer <contentType>(newfile); clientInfoVm = new ClientInfoGroupItemViewModel(modelold.clientInfo, modelnew.clientInfo); relativeInfoVm = new RelativeInfoGroupItemViewModel(modelold.clientInfo.Id, modelold.relativeInfos, modelnew.relativeInfos); documentDataVm = new DocumentDataGroupItemViewModel(modelold.clientInfo.Id, modelold.documentDatas, modelnew.documentDatas); measureLawVm = new MeasureLawGroupItemViewModel(modelold.clientInfo.Id, modelold.measureLaws, modelnew.measureLaws); var measureLawGroup = new GroupDataExpandRowControl(measureLawVm, "Massnahmen"); measureLawGroup.Dock = DockStyle.Top; this.xtraScrollableControl1.Controls.Add(measureLawGroup); var documentDataGroup = new GroupDataExpandRowControl(documentDataVm, "Dokumente"); documentDataGroup.Dock = DockStyle.Top; this.xtraScrollableControl1.Controls.Add(documentDataGroup); var relativeInfoGroup = new GroupDataExpandRowControl(relativeInfoVm, "Angehörige"); relativeInfoGroup.Dock = DockStyle.Top; this.xtraScrollableControl1.Controls.Add(relativeInfoGroup); var clientInfoGroup = new GroupDataControl(clientInfoVm); clientInfoGroup.Dock = DockStyle.Top; this.xtraScrollableControl1.Controls.Add(clientInfoGroup); }
private void CreateControlWithData(GroupItemModelBase dataModel, string headerText) { if (dataModel.ExpandRow) { var controlGroup = new GroupDataExpandRowControl(dataModel, headerText); controlGroup.Dock = DockStyle.Top; this.xtraScrollableControl1.Controls.Add(controlGroup); } else { var controlGroup = new GroupDataControl(dataModel); controlGroup.Dock = DockStyle.Top; this.xtraScrollableControl1.Controls.Add(controlGroup); } }