protected override String GetErrorMessage(out bool infoMode)
        {
            infoMode = false;

            // Skip containment checking if the control is placed in MobileUserControl
            if (DesignerAdapterUtil.InMobileUserControl(_panel))
            {
                return(null);
            }

            if (DesignerAdapterUtil.InUserControl(_panel))
            {
                infoMode = true;
                return(MobileControlDesigner._userControlWarningMessage);
            }

            if (!DesignerAdapterUtil.InMobilePage(_panel))
            {
                return(SR.GetString(SR.MobileControl_MobilePageErrorMessage));
            }

            if (!ValidContainment)
            {
                return(SR.GetString(SR.MobileControl_FormPanelContainmentErrorMessage));
            }

            return(null);
        }
        protected virtual String GetErrorMessage(out bool infoMode)
        {
            infoMode = false;

            if (!DesignerAdapterUtil.InMobileUserControl(_control))
            {
                if (DesignerAdapterUtil.InUserControl(_control))
                {
                    infoMode = true;
                    return(MobileControlDesigner._userControlWarningMessage);
                }

                if (!DesignerAdapterUtil.InMobilePage(_control))
                {
                    return(MobileControlDesigner._mobilePageErrorMessage);
                }

                if (!ValidContainment)
                {
                    return(MobileControlDesigner._formPanelContainmentErrorMessage);
                }
            }

            if (CurrentChoice != null && !IsHTMLSchema(CurrentChoice))
            {
                infoMode = true;
                return(_nonHtmlSchemaErrorMessage);
            }

            // Containment is valid, return null;
            return(null);
        }
示例#3
0
        protected override String GetErrorMessage(out bool infoMode)
        {
            infoMode = false;

            if (!DesignerAdapterUtil.InMobileUserControl(_styleSheet))
            {
                if (DesignerAdapterUtil.InUserControl(_styleSheet))
                {
                    infoMode = true;
                    return(MobileControlDesigner._userControlWarningMessage);
                }

                if (!DesignerAdapterUtil.InMobilePage(_styleSheet))
                {
                    return(MobileControlDesigner._mobilePageErrorMessage);
                }
            }

            if (!ValidContainment)
            {
                return(MobileControlDesigner._topPageContainmentErrorMessage);
            }

            // No error condition, return null;
            return(null);
        }
示例#4
0
        protected override String GetErrorMessage(out bool infoMode)
        {
            infoMode = false;

            if (DesignerAdapterUtil.InMobileUserControl(_textView))
            {
                return(null);
            }

            if (DesignerAdapterUtil.InUserControl(_textView))
            {
                infoMode = true;
                return(MobileControlDesigner._userControlWarningMessage);
            }

            if (!DesignerAdapterUtil.InMobilePage(_textView))
            {
                return(MobileControlDesigner._mobilePageErrorMessage);
            }

            if (!ValidContainment)
            {
                return(MobileControlDesigner._formPanelContainmentErrorMessage);
            }

            // Containment is valid, return null;
            return(null);
        }
示例#5
0
        protected override String GetErrorMessage(out bool infoMode)
        {
            infoMode = false;

            if (!DesignerAdapterUtil.InMobileUserControl(_form))
            {
                if (DesignerAdapterUtil.InUserControl(_form))
                {
                    infoMode = true;
                    return(MobileControlDesigner._userControlWarningMessage);
                }

                if (!DesignerAdapterUtil.InMobilePage(_form))
                {
                    return(SR.GetString(SR.MobileControl_MobilePageErrorMessage));
                }
            }

            if (!ValidContainment)
            {
                return(SR.GetString(SR.MobileControl_TopPageContainmentErrorMessage));
            }

            return(null);
        }
        protected virtual String GetErrorMessage(out bool infoMode)
        {
            infoMode = false;

            // Skip containment checking if the control is placed in MobileUserControl
            if (!DesignerAdapterUtil.InMobileUserControl(_mobileControl))
            {
                if (DesignerAdapterUtil.InUserControl(_mobileControl))
                {
                    infoMode = true;
                    return(MobileControlDesigner._userControlWarningMessage);
                }

                if (!DesignerAdapterUtil.InMobilePage(_mobileControl))
                {
                    return(_mobilePageErrorMessage);
                }

                if (!ValidContainment)
                {
                    return(_formPanelContainmentErrorMessage);
                }
            }

            bool containsTag;
            bool containsDataboundLiteral;

            _mobileControl.GetControlText(out containsTag, out containsDataboundLiteral);

            if (containsTag)
            {
                return(SR.GetString(SR.MobileControl_InnerTextCannotContainTagsDesigner));
            }

            // Containment is valid, return null;
            return(null);
        }