예제 #1
0
        /// <inheritdoc/>
        public override void CreateControlsForModule()
        {
            var result = ApplicationBase.Current.ModuleAnalyser.SortProperties(uiModule.ModuleItemType);

            UIElement previousControl = null;

            foreach (var item in result)
            {
                if (item.Value.PropertyAttributes.FirstOrDefault(x => x.GetType() == typeof(UIIgnoreAttribute)) != null)
                {
                    continue;
                }

                var uiParamsAttr = item.Value.PropertyAttributes.FirstOrDefault(x => x.GetType() == typeof(UIParamsAttribute));

                if ((uiParamsAttr != null && !(uiParamsAttr as UIParamsAttribute).ReadOnlyMode) || uiParamsAttr == null)
                {
                    mainContent.Children.Add(ControlCreator.CreateEditableControl(item, ref previousControl, uiModule));
                }
                else
                {
                    mainContent.Children.Add(ControlCreator.CreateDetailControl(item, ref previousControl));
                }
            }

            FillPredefinedValues();
        }
예제 #2
0
        /// <inheritdoc/>
        public override void CreateControlsForModule()
        {
            var result = ApplicationBase.Current.ModuleAnalyser.SortProperties(uiModule.ModuleItemType);

            UIElement previousControl = null;

            foreach (var item in result)
            {
                if (item.Value.PropertyAttributes.FirstOrDefault(x => x.GetType() == typeof(UIIgnoreAttribute)) != null)
                {
                    continue;
                }

                mainContent.Children.Add(ControlCreator.CreateDetailControl(item, ref previousControl));
            }

            FillPredefinedValues();
        }