private void BindControlsToBusinessFlow() { //General Info Section Bindings BindingHandler.ObjFieldBinding(xNameTextBlock, TextBlock.TextProperty, mBusinessFlow, nameof(BusinessFlow.Name)); BindingHandler.ObjFieldBinding(xNameTextBlock, TextBlock.ToolTipProperty, mBusinessFlow, nameof(BusinessFlow.Name)); mBusinessFlow.PropertyChanged -= mBusinessFlow_PropertyChanged; mBusinessFlow.PropertyChanged += mBusinessFlow_PropertyChanged; UpdateDescription(); //Activities Tab Bindings mBusinessFlow.AttachActivitiesGroupsAndActivities(); mBusinessFlow.Activities.CollectionChanged -= Activities_CollectionChanged; mBusinessFlow.Activities.CollectionChanged += Activities_CollectionChanged; UpdateActivitiesTabHeader(); if (mActivitiesPage != null && xActivitisTab.IsSelected) { mActivitiesPage.UpdateBusinessFlow(mBusinessFlow); } //Variables Tab Bindings mBusinessFlow.Variables.CollectionChanged -= Variables_CollectionChanged; mBusinessFlow.Variables.CollectionChanged += Variables_CollectionChanged; UpdateVariabelsTabHeader(); if (mVariabelsPage != null && xVariablesTab.IsSelected) { mVariabelsPage.UpdateParent(mBusinessFlow); } //Configurations Tab Bindings if (mConfigurationsPage != null && xConfigurationsTab.IsSelected) { mConfigurationsPage.UpdateBusinessFlow(mBusinessFlow); } }
private void BindControlsToActivity() { if (mPageViewMode != Ginger.General.eRIPageViewMode.View) { mActivity.SaveBackup(); } //General Info Section Bindings BindingHandler.ObjFieldBinding(xNameTextBlock, TextBlock.TextProperty, mActivity, nameof(Activity.ActivityName)); BindingHandler.ObjFieldBinding(xNameTextBlock, TextBlock.ToolTipProperty, mActivity, nameof(Activity.ActivityName)); mActivity.PropertyChanged -= mActivity_PropertyChanged; mActivity.PropertyChanged += mActivity_PropertyChanged; UpdateDescription(); xSharedRepoInstanceUC.Init(mActivity, mContext.BusinessFlow); //Actions Tab Bindings mActivity.Acts.CollectionChanged -= Acts_CollectionChanged; mActivity.Acts.CollectionChanged += Acts_CollectionChanged; UpdateActionsTabHeader(); if (mActionsPage != null && xActionsTab.IsSelected) { mActionsPage.UpdateActivity(mActivity); } //Variables Tab Bindings mActivity.Variables.CollectionChanged -= Variables_CollectionChanged; mActivity.Variables.CollectionChanged += Variables_CollectionChanged; UpdateVariabelsTabHeader(); if (mVariabelsPage != null && xVariablesTab.IsSelected) { mVariabelsPage.UpdateParent(mActivity); } //Configurations Tab Bindings if (mConfigurationsPage != null && xConfigurationsTab.IsSelected) { mConfigurationsPage.UpdateActivity(mActivity); } }