public void SetMyFolderDataViewModel(MyFolderDataViewModel myFolderData) { try { viewModel.CurrentMyFolderData = myFolderData; foreach (var item in viewModel.CurrentMyFolderData.UnChekedWordInfos) { foreach (var infoDetail in item.UnChekedWordDetailInfos) { if (!string.IsNullOrEmpty(infoDetail.SourceDBID)) { infoDetail.SourceDBImgPath = AppDomain.CurrentDomain.BaseDirectory + "Resources/DBTypeLogo/" + infoDetail.SourceDBID + ".png"; } else { infoDetail.SourceDBImgPath = AppDomain.CurrentDomain.BaseDirectory + "Resources/DBTypeLogo/Default.png"; } } foreach (var infoDetail in item.UnChekedWordInLineDetailInfos) { infoDetail.InLineKeyTextRangeStart = -1; } } LoadData(); } catch (Exception ex) { } }
public ImgWindow(MyFolderDataViewModel myFolder) { InitializeComponent(); this.DataContext = viewModel; this.myFolder = myFolder; }