public override void AddTreeItem() { //TODO: change to wizard string BizFlowName = string.Empty; if (GingerCore.General.GetInputWithValidation("Add " + GingerDicser.GetTermResValue(eTermResKey.BusinessFlow), GingerDicser.GetTermResValue(eTermResKey.BusinessFlow) + " Name:", ref BizFlowName)) { BusinessFlow BizFlow = WorkSpace.Instance.GetNewBusinessFlow(BizFlowName); if (WorkSpace.Instance.Solution.ApplicationPlatforms.Count != 1) { EditBusinessFlowAppsPage EBFP = new EditBusinessFlowAppsPage(BizFlow, true); EBFP.ResetPlatformSelection(); EBFP.Title = "Configure " + GingerDicser.GetTermResValue(eTermResKey.BusinessFlow) + " Target Application(s)"; EBFP.ShowAsWindow(eWindowShowStyle.Dialog, false); } else { BizFlow.TargetApplications.Add(new TargetApplication() { AppName = WorkSpace.Instance.Solution.MainApplication }); BizFlow.CurrentActivity.TargetApplication = BizFlow.TargetApplications[0].Name; } mBusFlowsFolder.AddRepositoryItem(BizFlow); } }
public override void AddTreeItem() { string BizFlowName = string.Empty; if (GingerCore.General.GetInputWithValidation("Add " + GingerDicser.GetTermResValue(eTermResKey.BusinessFlow), GingerDicser.GetTermResValue(eTermResKey.BusinessFlow) + " Name:", ref BizFlowName, System.IO.Path.GetInvalidFileNameChars())) { BusinessFlow BizFlow = LocalRepository.CreateNewBizFlow(BizFlowName); if (App.UserProfile.Solution.ApplicationPlatforms.Count != 1) { EditBusinessFlowAppsPage EBFP = new EditBusinessFlowAppsPage(BizFlow); EBFP.ResetPlatformSelection(); EBFP.Title = "Configure " + GingerDicser.GetTermResValue(eTermResKey.BusinessFlow) + " Target Application(s)"; EBFP.ShowAsWindow(eWindowShowStyle.Dialog, false); } BizFlow.FileName = LocalRepository.GetRepoItemFileName(BizFlow, Path); BusinessFlowTreeItem BFTI = new BusinessFlowTreeItem(); BFTI.BusinessFlow = BizFlow; ITreeViewItem addTreeViewItem = mTreeView.Tree.AddChildItemAndSelect(this, BFTI); //Must do the action after the node was added to tree! BizFlow.Save(); //add BF to cach App.LocalRepository.AddItemToCache(BizFlow); //refresh header- to reflect source control state mTreeView.Tree.RefreshHeader(addTreeViewItem); } }
public override void AddTreeItem() { //TODO: change to wizard string BizFlowName = string.Empty; if (GingerCore.General.GetInputWithValidation("Add " + GingerDicser.GetTermResValue(eTermResKey.BusinessFlow), GingerDicser.GetTermResValue(eTermResKey.BusinessFlow) + " Name:", ref BizFlowName, System.IO.Path.GetInvalidFileNameChars())) { BusinessFlow BizFlow = App.CreateNewBizFlow(BizFlowName); if (App.UserProfile.Solution.ApplicationPlatforms.Count != 1) { EditBusinessFlowAppsPage EBFP = new EditBusinessFlowAppsPage(BizFlow); EBFP.ResetPlatformSelection(); EBFP.Title = "Configure " + GingerDicser.GetTermResValue(eTermResKey.BusinessFlow) + " Target Application(s)"; EBFP.ShowAsWindow(eWindowShowStyle.Dialog, false); } mBusFlowsFolder.AddRepositoryItem(BizFlow); } }