Exemplo n.º 1
0
        //────────────────────────────────────────

        protected override void Parse_ChildNodes(
            XmlElement cur_X,
            Configurationtree_Node cur_Cf,
            MemoryApplication memoryApplication,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0);

            log_Method.BeginMethod(Info_XmlToConf.Name_Library, this, "Parse_ChildNodes", log_Reports);
            //
            //

            XmlElement err_XAEelem66 = null;

            // <a-empty-field>要素のリスト
            XmlNodeList child_XNl = cur_X.ChildNodes;

            foreach (XmlNode child_XNode in child_XNl)
            {
                if (XmlNodeType.Element == child_XNode.NodeType)
                {
                    XmlElement xChild = (XmlElement)child_XNode;
                    err_XAEelem66 = xChild;

                    string sName_Fnc = xChild.GetAttribute(PmNames.S_NAME.Name_Attribute);

                    if (NamesFnc.S_VLD_EMPTY_FIELD == sName_Fnc)
                    {
                        //
                        // <a-empty-field>要素
                        XmlToConfigurationtree_C15_Elm to = XmlToConfigurationtree_Collection.GetTranslatorByFncName(sName_Fnc, log_Reports);
                        to.XmlToConfigurationtree(
                            xChild,
                            cur_Cf,
                            memoryApplication,
                            log_Reports
                            );
                    }
                    else
                    {
                        //
                        // エラー。
                        goto gt_Error_UndefinedChild13;
                    }
                }
            }
            goto gt_EndMethod;
            //
            //
            #region 異常系
            //────────────────────────────────────────
gt_Error_UndefinedChild13:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー411!", log_Method);

                StringBuilder t = new StringBuilder();
                t.Append("<f-all-true>要素に、<a-emtpy-field>要素以外の要素");
                t.Append(Environment.NewLine);
                t.Append("[");
                t.Append(err_XAEelem66.Name);
                t.Append("]が含まれていました。");
                t.Append(Environment.NewLine);
                t.Append(Environment.NewLine);

                // ヒント

                r.Message = t.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
gt_EndMethod:
            log_Method.EndMethod(log_Reports);
        }
Exemplo n.º 2
0
        //────────────────────────────────────────

        protected override void Parse_ChildNodes(
            XmlElement cur_X,
            Configurationtree_Node cur_Cf,
            MemoryApplication memoryApplication,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

            log_Method.BeginMethod(Info_XmlToConf.Name_Library, this, "Parse_ChildNodes", log_Reports);
            //

            XmlElement err_XADisplay = null;

            Usercontrol uct = null;

            if (log_Reports.Successful)
            {
                Configuration_Node cf_Control = cur_Cf.GetParentByNodename(
                    NamesNode.S_CONTROL1, EnumConfiguration.Tree, true, log_Reports);

                if (log_Reports.Successful)
                {
                    uct = Utility_XmlToConfigurationtree_NodeImpl.GetUsercontrol(
                        (Configurationtree_Node)cf_Control, memoryApplication, log_Reports);
                }
            }

            if (log_Reports.Successful)
            {
                if (uct is UsercontrolListbox)
                {
                    //
                    // リストボックスなら。
                    UsercontrolListbox uctLst = (UsercontrolListbox)uct;

                    //
                    // <a-select-record>、<a-display>要素
                    //
                    XmlNodeList child_XNl = cur_X.ChildNodes;

                    foreach (XmlNode x_childNode in child_XNl)
                    {
                        if (XmlNodeType.Element == x_childNode.NodeType)
                        {
                            XmlElement xChild = (XmlElement)x_childNode;
                            err_XADisplay = xChild;

                            string child_SName_Fnc = xChild.GetAttribute(PmNames.S_NAME.Name_Attribute);

                            //
                            //
                            if (NamesFnc.S_VLD_DISPLAY == child_SName_Fnc)//【変更 2012-07-19】
                            {
                                XmlToConfigurationtree_C15_Elm to = XmlToConfigurationtree_Collection.GetTranslatorByFncName(child_SName_Fnc, log_Reports);
                                to.XmlToConfigurationtree(
                                    xChild,
                                    cur_Cf,
                                    memoryApplication,
                                    log_Reports
                                    );
                            }
                            else if (NamesFnc.S_VLD_SELECT_RECORD == child_SName_Fnc)
                            {
                                // Sf:Vld-SelectRecord;

                                XmlToConfigurationtree_C15_Elm to = XmlToConfigurationtree_Collection.GetTranslatorByFncName(child_SName_Fnc, log_Reports);
                                to.XmlToConfigurationtree(
                                    xChild,
                                    cur_Cf,
                                    memoryApplication,
                                    log_Reports
                                    );
                            }
                            else
                            {
                                //
                                // エラー。
                                goto gt_Error_UndefinedChild11;
                            }
                        }
                    }
                }
            }

            goto gt_EndMethod;
            //
            #region 異常系
            //────────────────────────────────────────
gt_Error_UndefinedChild11:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー385!", log_Method);

                StringBuilder s = new StringBuilder();
                s.Append("<f-list-box-validation>要素に、<a-display><a-select-record>要素以外の要素");
                s.Append(Environment.NewLine);
                s.Append("[");
                s.Append(err_XADisplay.Name);
                s.Append("]が含まれていました。");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                // ヒント

                r.Message = s.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
gt_Error_UndefinedClass:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー386!", log_Method);

                StringBuilder s = new StringBuilder();
                s.Append("なんらかのエラー。");
                s.Append(Environment.NewLine);

                // ヒント

                r.Message = s.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
gt_EndMethod:
            log_Method.EndMethod(log_Reports);
        }