private void selectWin(string pageStr) { UserControl showPage = null; if (pageStr.Equals(UCConst.PageConstName.DownRecord)) { showPage = new DownRecord(); } else if (pageStr.Equals(UCConst.PageConstName.DownResource)) { showPage = new DownResource(); } win.ShowPage.Content = showPage; }
public DownResourceViewModel(DownResource win) { SelectProductCommand = new RelayCommand <string>((x) => { selectWin(x); }); SelectedCategoryCommand = new RelayCommand <CategoryTextImage>((x) => { API.API selfApi = new API.API(); _ = selfApi.UpdateLocalFiles(x); }); SelectedMaterialCategoryCommand = new RelayCommand <CategoryTextImage>(x => { API.API selfApi = new API.API(); _ = selfApi.UpdateLocalFilesByMaterial(x); }); this.win = win; }