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);
            }
        }
예제 #2
0
        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);
            }
        }
예제 #3
0
        private void AddPlatformButton_Click(object sender, RoutedEventArgs e)
        {
            EditBusinessFlowAppsPage EBFP = new EditBusinessFlowAppsPage(mBusinessFlow);
            EBFP.ShowAsWindow();

            //make sure all Activities mapped to Application after change
            foreach (Activity activity in mBusinessFlow.Activities)
                if (mBusinessFlow.TargetApplications.Where(x => x.Name == activity.TargetApplication).FirstOrDefault() == null)
                    activity.TargetApplication = mBusinessFlow.TargetApplications[0].Name;
        }
예제 #4
0
        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);
            }
        }