private void dialogMapBtn_Click(object sender, EventArgs e)
        {
            if (HyperDialog.Dialog != null)
            {
                PropertyMap findResultMap;
                PropertyMap viewResultMap;
                IList <IMappableProperty> temp;

                dialogService.GetViewResponseMap(View, out viewResultMap, out temp, out temp, out temp);
                dialogService.GetViewResponseMap(HyperDialog.Dialog.InterfaceView, out findResultMap, out temp, out temp, out temp);

                using (PropertyMapForm2 form = new PropertyMapForm2())
                {
                    form.PropertyMap = HyperDialog.ResultMap;

                    form.SourceProperties            = viewResultMap.MappedProperties.Cast <IMappableProperty>();
                    form.TargetProperties            = findResultMap.MappedProperties.Cast <IMappableProperty>();
                    form.EnablePropertiesByDefault   = false;
                    form.AllowNonUniquePropertyNames = true;
                    form.IsEditable = this.IsEditable;

                    if (form.ShowDialog() == DialogResult.OK)
                    {
                        HyperDialog.ResultMap = form.PropertyMap;
                    }
                }
            }
        }
        private void modifyViewMapBtn_Click(object sender, EventArgs e)
        {
            if (HyperDialog.Dialog != null)
            {
                PropertyMap requestMap;
                PropertyMap responseMap;
                IList <IMappableProperty> targetProperties = null;
                IList <IMappableProperty> temp;

                dialogService.GetViewRequestMap(HyperDialog.Dialog.InterfaceView, out requestMap, out temp, out temp);
                dialogService.GetViewResponseMap(View, out responseMap, out temp, out temp, out temp);

                targetProperties = new List <IMappableProperty>(responseMap.MappedProperties.Cast <IMappableProperty>());

                IList <UXSessionProperty> sessionProperties = applicationService.GetUXSessionProperties(View.Application);
                targetProperties = new List <IMappableProperty>(targetProperties.Concat <IMappableProperty>(sessionProperties.Cast <IMappableProperty>()));

                using (PropertyMapForm2 form = new PropertyMapForm2())
                {
                    form.PropertyMap = HyperDialog.ViewMap;

                    form.SourceProperties            = requestMap.MappedProperties.Cast <IMappableProperty>();
                    form.TargetProperties            = targetProperties;
                    form.AllowNonUniquePropertyNames = true;
                    form.IsEditable = this.IsEditable;

                    if (form.ShowDialog() == DialogResult.OK)
                    {
                        HyperDialog.ViewMap = form.PropertyMap;
                    }
                }
            }
        }
Example #3
0
        private void deleteServiceMethodMapBtn_Click(object sender, EventArgs e)
        {
            IList <IMappableProperty> sourceProperties;
            IList <IMappableProperty> targetProperties;
            IList <IMappableProperty> temp;
            PropertyMap map;

            applicationService.GetServiceMethodResponseMap(ListBox.RightFindServiceMethod, out map, out temp, out targetProperties);
            applicationService.GetServiceMethodRequestMap(ListBox.RemoveServiceMethod, out map, out sourceProperties, out temp);

            IList <UXSessionProperty> sessionProperties = applicationService.GetUXSessionProperties(FrontendApplication);

            targetProperties = new List <IMappableProperty>(targetProperties.Concat <IMappableProperty>(sessionProperties.Cast <IMappableProperty>()));

            using (PropertyMapForm2 form = new PropertyMapForm2())
            {
                form.PropertyMap      = ListBox.RemoveServiceMethodMap;
                form.SourceProperties = sourceProperties;
                form.TargetProperties = targetProperties;
                form.IsEditable       = this.IsEditable;

                if (form.ShowDialog() == DialogResult.OK)
                {
                    ListBox.RemoveServiceMethodMap = form.PropertyMap;
                }
            }
        }
        private void editMapBtn_Click(object sender, EventArgs e)
        {
            using (PropertyMapForm2 form = new PropertyMapForm2())
            {
                form.FrontendApplication  = this.FrontendApplication;
                form.BackendApplication   = this.BackendApplication;
                form.AllowAddProperty     = true;
                form.IsEditable           = this.IsEditable;
                form.HideSyncronizeButton = true;
                form.UseProvidedMapObject = true;
                form.LockPropertyGrid     = true;

                form.Owner = this;


                IList <IMappableProperty> sourceProperties = new List <IMappableProperty>();
                IList <IMappableProperty> targetProperties = new List <IMappableProperty>();

                form.DeletedMappedProperties = deletedMappedPropertiesInRequestMap;
                form.AddedMappedProperties   = addedMappedPropertiesInRequestMap;

                //uxActionService.GetActionRequestMap(UXAction, out requestMap, out sourceProperties, out targetProperties);

                form.PropertyMap      = UXAction.RequestMap;
                form.SourceProperties = sourceProperties;
                form.TargetProperties = targetProperties;

                if (form.ShowDialog() == DialogResult.OK)
                {
                    try
                    {
                        UXAction.RequestMap = form.PropertyMap;
                        modelService.MergeSaveDomainObject(UXAction.RequestMap);

                        propertyGrid.SelectedObject = UXAction;
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.ToString());
                    }
                }
            }
        }
Example #5
0
        private void modifyMapBtn_Click(object sender, EventArgs e)
        {
            PropertyMapForm2 form = new PropertyMapForm2();

            form.FrontendApplication  = this.FrontendApplication;
            form.BackendApplication   = this.BackendApplication;
            form.AllowAddProperty     = true;
            form.IsEditable           = this.IsEditable;
            form.HideSyncronizeButton = true;
            form.UseProvidedMapObject = true;

            form.Owner = this;

            IList <IMappableProperty> sourceProperties = new List <IMappableProperty>();
            IList <IMappableProperty> targetProperties = new List <IMappableProperty>();

            form.PropertyMap      = Workflow.RequestMap;
            form.SourceProperties = sourceProperties;
            form.TargetProperties = targetProperties;

            form.DeletedMappedProperties = deletedMappedPropertiesInRequestMap;
            form.AddedMappedProperties   = addedMappedPropertiesInRequestMap;

            if (form.ShowDialog() == DialogResult.OK)
            {
                try
                {
                    Workflow.RequestMap = form.PropertyMap;

                    TypeProvider typeProvider = workflowControl.GetService(typeof(ITypeProvider)) as TypeProvider;
                    typeProvider.RemoveAssembly(requestType.Assembly);

                    requestType = WorkflowTypeFactory.CreateRequestType(Workflow);
                    typeProvider.AddAssembly(requestType.Assembly);
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.ToString());
                }
            }
        }
Example #6
0
        private void rightServiceMethodMapBtn_Click(object sender, EventArgs e)
        {
            IList <IMappableProperty> sourceProperties;
            IList <IMappableProperty> targetProperties;
            IList <IMappableProperty> temp;
            PropertyMap map;

            dialogService.GetViewResponseMap(View, out map, out temp, out temp, out targetProperties);
            applicationService.GetServiceMethodRequestMap(ListBox.RightFindServiceMethod, out map, out sourceProperties, out temp);

            using (PropertyMapForm2 form = new PropertyMapForm2())
            {
                form.PropertyMap      = ListBox.RightFindServiceMethodMap;
                form.SourceProperties = sourceProperties;
                form.TargetProperties = targetProperties;
                form.IsEditable       = this.IsEditable;

                if (form.ShowDialog() == DialogResult.OK)
                {
                    ListBox.RightFindServiceMethodMap = form.PropertyMap;
                }
            }
        }