private List<ProjectModel> CreateEmptyProject() { try { var liNewList = new List<ProjectModel>(); for (int i = 0; i < 2; i++) { //lblLabel.Content = fileName.ToString(); ProjectModel x = new ProjectModel("New" + i.ToString()); //fake data: Asset assetNew = new Asset("New Asset1"); assetNew.Command = CMDCommand.copy; assetNew.strDevEnvFile = "c:\\asdf"; assetNew.strStageEnvFile = "d:\\asdf"; assetNew.isEnabled = false; x.AddAsset(assetNew); Asset assetNew2 = new Asset("New Asset2"); assetNew2.Command = CMDCommand.delete; assetNew2.strDevEnvFile = "c:\\asdf34234"; assetNew2.strStageEnvFile = "d:\\asdf234234"; assetNew2.isEnabled = false; x.AddAsset(assetNew2); liNewList.Add(x); } return liNewList; } catch (Exception ex) { lblLabel.Content = ex.Message; throw; } }
//demo data . overrights real data so ahh do not use :D private void Button_Click_1(object sender, RoutedEventArgs e) { try { for (int i = 0; i < 2; i++) { //lblLabel.Content = fileName.ToString(); ProjectModel x = new ProjectModel("Monkey" + i.ToString()); //fake data: Asset assetNew = new Asset("asset1"); assetNew.Command = CMDCommand.copy; assetNew.strDevEnvFile = "c:\\asdf"; assetNew.strStageEnvFile = "d:\\asdf"; assetNew.isEnabled = false; x.AddAsset(assetNew); Asset assetNew2 = new Asset("asset2"); assetNew2.Command = CMDCommand.delete; assetNew2.strDevEnvFile = "c:\\asdf34234"; assetNew2.strStageEnvFile = "d:\\asdf234234"; assetNew2.isEnabled = true; x.AddAsset(assetNew2); liProjects.Add(x); } } catch (Exception ex) { lblLabel.Content = ex.Message; throw; } }