コード例 #1
0
ファイル: FormSwitch.cs プロジェクト: DilshanMeegoda/MIT
        private View getView(ReportElement element, List <ReportElement> elementList)
        {
            LinearLayout view = new LinearLayout(contextx);

            switch (element.Type)
            {
            case "textfield":
                view = new FormEditText(contextx, element, UserID, OwnerID, VerifierID, reportStatus);
                break;

            case "textfieldint":
                view = new FormIntEditText(contextx, element, UserID, OwnerID, VerifierID, reportStatus);
                break;

            case "slider":
                view = new FormSlider(contextx, element, UserID, OwnerID, VerifierID, reportStatus);
                break;

            case "signature":
                view = new FormSignature(contextx, element, section, UserID, OwnerID, VerifierID, formType, reportStatus, elementList);
                break;

            case "Button":
                view = new FormButton(contextx, element, OwnerID, VerifierID);
                break;

            case "yesno":
                view = new FormSwitch(contextx, element, UserID, OwnerID, VerifierID, formType, reportStatus, section, imageLoader);
                break;

            case "multilinetextfield":
                view = new FormMultiLineEditText(contextx, element, UserID, OwnerID, VerifierID, reportStatus);
                break;

            case "datetime":
                view = new FormDateTime(contextx, element, OwnerID, VerifierID);
                break;

            case "date":
                view = new FormDate(contextx, element, UserID, OwnerID, VerifierID, reportStatus);
                break;

            case "time":
                view = new FormTime(contextx, element, UserID, OwnerID, VerifierID, reportStatus);
                break;

            case "camera":
                view = new FormCamera(contextx, element, UserID, OwnerID, VerifierID, reportStatus, section, section, elementList);
                break;

            case "checkbox":
                view = new FormCheckBox(contextx, element, UserID, OwnerID, VerifierID, reportStatus, formType, section, imageLoader);
                break;

            case "dropdown":
                view = new FormDropDown(contextx, element, UserID, OwnerID, VerifierID, reportStatus);
                break;

            case "mainandsubfield":
                view = new FormHeaderSubElement(contextx, element, UserID, VerifierID);
                break;

            case "updown":
                view = new FormPlusMinusCounter(contextx, element, UserID, OwnerID, VerifierID, reportStatus);
                break;

            case "gps":
                view = new FormGPS(contextx, element, OwnerID, UserID, VerifierID, reportStatus);
                break;

            case "tabularform":
                view = new FormTabular(contextx, element, OwnerID, VerifierID, section, reportStatus);
                break;
            }
            return(view);
        }