private void xExpandActionBtn_Click(object sender, RoutedEventArgs e) { mActionEditPage.ShowAsWindow(windowStyle: eWindowShowStyle.OnlyDialog); mActionEditPage.Width = xMainFrame.ActualWidth; mActionEditPage.HorizontalAlignment = HorizontalAlignment.Stretch; xMainFrame.Refresh(); }
private void AddActionButton_Click(object sender, RoutedEventArgs e) { if (mActions.CurrentItem == null) { Reporter.ToUser(eUserMsgKey.AskToSelectAction); return; } Act act = (Act)((Act)(mActions.CurrentItem)).CreateCopy(); SetActionDetails(act); mContext.BusinessFlow.AddAct(act); int selectedActIndex = -1; ObservableList <IAct> actsList = mContext.BusinessFlow.CurrentActivity.Acts; if (actsList.CurrentItem != null) { selectedActIndex = actsList.IndexOf((Act)actsList.CurrentItem); } if (selectedActIndex >= 0) { actsList.Move(actsList.Count - 1, selectedActIndex + 1); } ActionEditPage AEP = new ActionEditPage(act); AEP.ShowAsWindow(); }
private void AnalyzerItemsGrid_RowDoubleClick(object sender, EventArgs e) { //show the item edit page if (AnalyzerItemsGrid.CurrentItem is AnalyzeAction) { AnalyzeAction currentAnalyzeAction = (AnalyzeAction)AnalyzerItemsGrid.CurrentItem; Act actionIssue = currentAnalyzeAction.mAction; actionIssue.SolutionFolder = App.UserProfile.Solution.Folder.ToUpper(); ActionEditPage actedit = new ActionEditPage(actionIssue, General.RepositoryItemPageViewMode.Child, currentAnalyzeAction.mBusinessFlow, currentAnalyzeAction.mActivity); //setting the BusinessFlow on the Action in Order to save //actedit.mActParentBusinessFlow = ((AnalyzeAction)AnalyzerItemsGrid.CurrentItem).mBusinessFlow; //actedit.ap = null; actedit.ShowAsWindow(eWindowShowStyle.Dialog); } if (AnalyzerItemsGrid.CurrentItem is AnalyzeActivity) { AnalyzeActivity currentAnalyzeActivity = (AnalyzeActivity)AnalyzerItemsGrid.CurrentItem; Activity ActivityIssue = currentAnalyzeActivity.mActivity; //ActivityIssue.SolutionFolder = App.UserProfile.Solution.Folder.ToUpper(); ActivityEditPage ActivityEdit = new ActivityEditPage(ActivityIssue, General.RepositoryItemPageViewMode.Child, currentAnalyzeActivity.mBusinessFlow); //setting the BusinessFlow on the Activity in Order to save //ActivityEdit.mBusinessFlow = ((AnalyzeActivity)AnalyzerItemsGrid.CurrentItem).mBusinessFlow; //ActivityEdit.ap = null; ActivityEdit.ShowAsWindow(eWindowShowStyle.Dialog); } }
private void AnalyzerItemsGrid_RowDoubleClick(object sender, EventArgs e) { //show the item edit page if (AnalyzerItemsGrid.CurrentItem is AnalyzeAction) { AnalyzeAction currentAnalyzeAction = (AnalyzeAction)AnalyzerItemsGrid.CurrentItem; Act actionIssue = currentAnalyzeAction.mAction; actionIssue.SolutionFolder = WorkSpace.Instance.Solution.Folder.ToUpper(); ActionEditPage actedit = new ActionEditPage(actionIssue, General.eRIPageViewMode.ChildWithSave, currentAnalyzeAction.mBusinessFlow, currentAnalyzeAction.mActivity); //setting the BusinessFlow on the Action in Order to save //actedit.mActParentBusinessFlow = ((AnalyzeAction)AnalyzerItemsGrid.CurrentItem).mBusinessFlow; //actedit.ap = null; actedit.ShowAsWindow(eWindowShowStyle.Dialog); } if (AnalyzerItemsGrid.CurrentItem is AnalyzeActivity) { AnalyzeActivity currentAnalyzeActivity = (AnalyzeActivity)AnalyzerItemsGrid.CurrentItem; Activity ActivityIssue = currentAnalyzeActivity.mActivity; //ActivityIssue.SolutionFolder = WorkSpace.Instance.Solution.Folder.ToUpper(); GingerWPF.BusinessFlowsLib.ActivityPage ActivityEdit = new GingerWPF.BusinessFlowsLib.ActivityPage(ActivityIssue, new Context() { BusinessFlow = currentAnalyzeActivity.mBusinessFlow }, General.eRIPageViewMode.ChildWithSave); //setting the BusinessFlow on the Activity in Order to save //ActivityEdit.mBusinessFlow = ((AnalyzeActivity)AnalyzerItemsGrid.CurrentItem).mBusinessFlow; //ActivityEdit.ap = null; ActivityEdit.ShowAsWindow(eWindowShowStyle.Dialog); } }
private void EditAction(object sender, RoutedEventArgs e) { Act a = ((CommonFunctionMapping)CommonFunctionMappingUCGrid.CurrentItem).TargetAction; ActionEditPage actedit = new ActionEditPage(a); actedit.ShowAsWindow(); }
private void AddAction() { if (ActionsTabs.SelectedContent != null && ((ucGrid)ActionsTabs.SelectedContent).CurrentItem != null) { if (((Act)(((ucGrid)ActionsTabs.SelectedContent).CurrentItem)).AddActionWizardPage != null) { _pageGenericWin.Close(); string classname = ((Act)(((ucGrid)ActionsTabs.SelectedContent).CurrentItem)).AddActionWizardPage; Type t = Assembly.GetExecutingAssembly().GetType(classname); if (t == null) { throw new Exception("Action edit page not found - " + classname); } WizardBase wizard = (GingerWPF.WizardLib.WizardBase)Activator.CreateInstance(t); WizardWindow.ShowWizard(wizard); } else { Act aNew = null; if (ActionsTabs.SelectedContent != null && ((ucGrid)ActionsTabs.SelectedContent).CurrentItem != null) { aNew = (Act)(((Act)(((ucGrid)ActionsTabs.SelectedContent).CurrentItem)).CreateCopy()); } else { Reporter.ToUser(eUserMsgKeys.NoItemWasSelected); return; } aNew.SolutionFolder = App.UserProfile.Solution.Folder.ToUpper(); //adding the new act after the selected action in the grid //TODO: Add should be after the last, Insert should be in the middle... int selectedActIndex = -1; if (mActionsList.CurrentItem != null) { selectedActIndex = mActionsList.IndexOf((Act)mActionsList.CurrentItem); } mActionsList.Add(aNew); if (selectedActIndex >= 0) { mActionsList.Move(mActionsList.Count - 1, selectedActIndex + 1); } _pageGenericWin.Close(); //allowing to edit the action ActionEditPage actedit = new ActionEditPage(aNew); actedit.ShowAsWindow(); } } }
private void AddActionButton_Click(object sender, RoutedEventArgs e) { Act act = (Act)((Act)(mActions.CurrentItem)).CreateCopy(); act.Active = true; App.BusinessFlow.AddAct(act); ActionEditPage AEP = new ActionEditPage(act); AEP.ShowAsWindow(); }
private void grdActions_grdMain_MouseDoubleClick(object sender, EventArgs e) { Act a = (Act)grdActions.CurrentItem; a.SolutionFolder = App.UserProfile.Solution.Folder.ToUpper(); ActionEditPage actedit = new ActionEditPage(a, EditMode); actedit.ap = this; actedit.ShowAsWindow(); }
private void AddActionButton_Click(object sender, RoutedEventArgs e) { if (mActions.CurrentItem == null) { Reporter.ToUser(eUserMsgKeys.AskToSelectAction); return; } Act act = (Act)((Act)(mActions.CurrentItem)).CreateCopy(); act.Active = true; act.AddNewReturnParams = true; ElementLocator EL = (ElementLocator)mLocators.CurrentItem; if ((mActions.CurrentItem).GetType() == typeof(ActUIElement)) { ActUIElement aaa = (ActUIElement)mActions.CurrentItem; ActUIElement actUI = (ActUIElement)act; actUI.ElementLocateBy = EL.LocateBy; actUI.ElementLocateValue = EL.LocateValue; actUI.Value = ValueTextBox.Text; actUI.GetOrCreateInputParam(ActUIElement.Fields.ControlActionValue, ValueTextBox.Text); actUI.GetOrCreateInputParam(ActUIElement.Fields.ElementType, aaa.GetInputParamValue(ActUIElement.Fields.ElementType)); actUI.GetOrCreateInputParam(ActUIElement.Fields.ControlAction, aaa.GetInputParamValue(ActUIElement.Fields.ControlAction)); actUI.GetOrCreateInputParam(ActUIElement.Fields.ElementAction, aaa.GetInputParamValue(ActUIElement.Fields.ElementAction)); actUI.GetOrCreateInputParam(ActUIElement.Fields.WhereColSelector, aaa.GetInputParamValue(ActUIElement.Fields.WhereColSelector)); actUI.GetOrCreateInputParam(ActUIElement.Fields.WhereColumnTitle, aaa.GetInputParamValue(ActUIElement.Fields.WhereColumnTitle)); actUI.GetOrCreateInputParam(ActUIElement.Fields.WhereColumnValue, aaa.GetInputParamValue(ActUIElement.Fields.WhereColumnValue)); actUI.GetOrCreateInputParam(ActUIElement.Fields.WhereOperator, aaa.GetInputParamValue(ActUIElement.Fields.WhereOperator)); actUI.GetOrCreateInputParam(ActUIElement.Fields.WhereProperty, aaa.GetInputParamValue(ActUIElement.Fields.WhereProperty)); act = actUI; } else { act.LocateBy = EL.LocateBy; act.LocateValue = EL.LocateValue; act.Value = ValueTextBox.Text; } App.BusinessFlow.AddAct(act); int selectedActIndex = -1; ObservableList <Act> actsList = App.BusinessFlow.CurrentActivity.Acts; if (actsList.CurrentItem != null) { selectedActIndex = actsList.IndexOf((Act)actsList.CurrentItem); } if (selectedActIndex >= 0) { actsList.Move(actsList.Count - 1, selectedActIndex + 1); } ActionEditPage AEP = new ActionEditPage(act); AEP.ShowAsWindow(); }
private void EditAction(object sender, RoutedEventArgs e) { if (xActionsGrid.CurrentItem != null) { Act a = (Act)xActionsGrid.CurrentItem; ActionEditPage actedit = new ActionEditPage(a, General.RepositoryItemPageViewMode.SharedReposiotry, new GingerCore.BusinessFlow(), new GingerCore.Activity()); actedit.ShowAsWindow(eWindowShowStyle.Dialog); } else { Reporter.ToUser(eUserMsgKeys.AskToSelectItem); } }
private void EditAct(object sender, RoutedEventArgs e) { if (mListView.List.SelectedItems != null && mListView.List.SelectedItems.Count > 0) { Act a = (Act)mListView.CurrentItem; ActionEditPage actedit = new ActionEditPage(a, General.eRIPageViewMode.SharedReposiotry, new GingerCore.BusinessFlow(), new GingerCore.Activity()); actedit.ShowAsWindow(eWindowShowStyle.Dialog); } else { Reporter.ToUser(eUserMsgKey.AskToSelectItem); } }
private void EditAction(object sender, RoutedEventArgs e) { if (grdActions.CurrentItem != null) { Act a = (Act)grdActions.CurrentItem; ActionEditPage actedit = new ActionEditPage(a, EditMode); actedit.ap = this; actedit.ShowAsWindow(); } else { Reporter.ToUser(eUserMsgKeys.AskToSelectItem); } }
private void grdActions_grdMain_MouseDoubleClick(object sender, EventArgs e) { Act a = (Act)grdActions.CurrentItem; a.SolutionFolder = WorkSpace.UserProfile.Solution.Folder.ToUpper(); a.Context = new Context() { BusinessFlow = mBusinessFlow }; ActionEditPage actedit = new ActionEditPage(a, EditMode); actedit.ap = this; actedit.ShowAsWindow(); }
private void EditSelectedAction() { if (grdActions.CurrentItem != null) { Act a = (Act)grdActions.CurrentItem; a.SolutionFolder = WorkSpace.Instance.Solution.Folder.ToUpper(); a.Context = mContext; ActionEditPage actedit = new ActionEditPage(a, EditMode); actedit.ap = this; actedit.ShowAsWindow(); } else { Reporter.ToUser(eUserMsgKey.AskToSelectItem); } }
private void AddActionButton_Click(object sender, RoutedEventArgs e) { if (mActions.CurrentItem == null) { Reporter.ToUser(eUserMsgKey.AskToSelectAction); return; } Act act = (Act)((Act)(mActions.CurrentItem)).CreateCopy(); SetActionDetails(act); act.Context = mContext; mContext.BusinessFlow.AddAct(act, true); ActionEditPage AEP = new ActionEditPage(act); AEP.ShowAsWindow(); }
private void AvailableActionsGrid_RowDoubleClick(object sender, EventArgs e) { // we can decide based on the action added if we need to open the ActionEdit Page to get more info bool bOpenActionEditPage = true; // User want to add action to flow Act act = (Act)AvailableActionsGrid.CurrentItem; //TODO: If this is set value action open VE //TODO: if it is validate - then do all and no show? if (act is ActUIElement) { ActUIElement AUIE = (ActUIElement)act; if (AUIE.ElementAction == ActUIElement.eElementAction.SetValue) { ValueExpressionEditorPage pa = new ValueExpressionEditorPage(act, ActUIElement.Fields.Value); pa.ShowAsWindow(eWindowShowStyle.Dialog); bOpenActionEditPage = false; } if (AUIE.ElementAction == ActUIElement.eElementAction.Click) { bOpenActionEditPage = false; } } if (bOpenActionEditPage) { ActionEditPage p = new ActionEditPage(act); p.ShowAsWindow(); } // TODO: allow cancel in window mBusinessFlow.CurrentActivity.Acts.Add(act); RefreshDiagram(); }
private void AddAction() { if (ActionsTabs.SelectedContent != null && ((ucGrid)ActionsTabs.SelectedContent).CurrentItem != null) { if (((Act)(((ucGrid)ActionsTabs.SelectedContent).CurrentItem)).AddActionWizardPage != null) { _pageGenericWin.Close(); string classname = ((Act)(((ucGrid)ActionsTabs.SelectedContent).CurrentItem)).AddActionWizardPage; Type t = Assembly.GetExecutingAssembly().GetType(classname); if (t == null) { throw new Exception("Action edit page not found - " + classname); } WizardBase wizard = (GingerWPF.WizardLib.WizardBase)Activator.CreateInstance(t); WizardWindow.ShowWizard(wizard); } else { Act aNew = null; if (ActionsTabs.SelectedContent != null && ((ucGrid)ActionsTabs.SelectedContent).CurrentItem != null) { Act selectedAction = (Act)(((ucGrid)ActionsTabs.SelectedContent).CurrentItem); aNew = (Act)selectedAction.CreateCopy(); // copy param ex info for (int i = 0; i < selectedAction.InputValues.Count; i++) { aNew.InputValues[i].ParamTypeEX = selectedAction.InputValues[i].ParamTypeEX; } } else { Reporter.ToUser(eUserMsgKeys.NoItemWasSelected); return; } aNew.SolutionFolder = App.UserProfile.Solution.Folder.ToUpper(); //adding the new act after the selected action in the grid //TODO: Add should be after the last, Insert should be in the middle... int selectedActIndex = -1; if (mActionsList.CurrentItem != null) { selectedActIndex = mActionsList.IndexOf((Act)mActionsList.CurrentItem); } mActionsList.Add(aNew); if (selectedActIndex >= 0) { mActionsList.Move(mActionsList.Count - 1, selectedActIndex + 1); } _pageGenericWin.Close(); //allowing to edit the action ActionEditPage actedit = new ActionEditPage(aNew); actedit.ShowAsWindow(); if (aNew is ActPlugIn) { ActPlugIn p = (ActPlugIn)aNew; // TODO: add per group or... !!!!!!!!! //Check if target already exist else add it // TODO: search only in targetplugin type TargetPlugin targetPlugin = (TargetPlugin)(from x in App.BusinessFlow.TargetApplications where x.Name == p.ServiceId select x).SingleOrDefault(); if (targetPlugin == null) { // check if interface add it // App.BusinessFlow.TargetApplications.Add(new TargetPlugin() { AppName = p.ServiceId }); App.BusinessFlow.TargetApplications.Add(new TargetPlugin() { PluginId = p.PluginId, ServiceId = p.ServiceId }); //Search for default agent which match App.AutomateTabGingerRunner.UpdateApplicationAgents(); // TODO: update automate page target/agent // if agent not found auto add or ask user } } } } }
private void AddAction() { if (ActionsTabs.SelectedContent != null && ((ucGrid)ActionsTabs.SelectedContent).CurrentItem != null) { Act selectedAction = (Act)(((ucGrid)ActionsTabs.SelectedContent).CurrentItem); //warn regarding Leagacy Actions if (LegacyActionsTab.IsSelected) { if (selectedAction is IObsoleteAction) { eUserMsgSelection userSelection = Reporter.ToUser(eUserMsgKey.WarnAddLegacyActionAndOfferNew, ((IObsoleteAction)selectedAction).TargetActionTypeName()); if (userSelection == eUserMsgSelection.Yes) { selectedAction = ((IObsoleteAction)selectedAction).GetNewAction(); } else if (userSelection == eUserMsgSelection.Cancel) { return;//do not add any action } } else { if (Reporter.ToUser(eUserMsgKey.WarnAddLegacyAction) == eUserMsgSelection.No) { return;//do not add any action } } } if (selectedAction.AddActionWizardPage != null) { _pageGenericWin.Close(); string classname = selectedAction.AddActionWizardPage; Type t = Assembly.GetExecutingAssembly().GetType(classname); if (t == null) { throw new Exception("Action edit page not found - " + classname); } WizardBase wizard = (GingerWPF.WizardLib.WizardBase)Activator.CreateInstance(t, mContext); WizardWindow.ShowWizard(wizard); } else { Act newAction = null; newAction = (Act)selectedAction.CreateCopy(); newAction.Context = mContext; // copy param ex info for (int i = 0; i < selectedAction.InputValues.Count; i++) { newAction.InputValues[i].ParamTypeEX = selectedAction.InputValues[i].ParamTypeEX; } newAction.SolutionFolder = WorkSpace.Instance.Solution.Folder.ToUpper(); //adding the new act after the selected action in the grid //TODO: Add should be after the last, Insert should be in the middle... int selectedActIndex = -1; if (mActionsList.CurrentItem != null) { selectedActIndex = mActionsList.IndexOf((IAct)mActionsList.CurrentItem); } mActionsList.Add(newAction); if (selectedActIndex >= 0) { mActionsList.Move(mActionsList.Count - 1, selectedActIndex + 1); } _pageGenericWin.Close(); //allowing to edit the action ActionEditPage actedit = new ActionEditPage(newAction); actedit.ShowAsWindow(); if (newAction is ActPlugIn) { ActPlugIn p = (ActPlugIn)newAction; // TODO: add per group or... !!!!!!!!! //Check if target already exist else add it // TODO: search only in targetplugin type TargetPlugin targetPlugin = (TargetPlugin)(from x in mBusinessFlow.TargetApplications where x.Name == p.ServiceId select x).SingleOrDefault(); if (targetPlugin == null) { // check if interface add it // App.BusinessFlow.TargetApplications.Add(new TargetPlugin() { AppName = p.ServiceId }); mBusinessFlow.TargetApplications.Add(new TargetPlugin() { PluginId = p.PluginId, ServiceId = p.ServiceId }); //Search for default agent which match mContext.Runner.UpdateApplicationAgents(); // TODO: update automate page target/agent // if agent not found auto add or ask user } } } } else { Reporter.ToUser(eUserMsgKey.NoItemWasSelected); return; } }