Esempio n. 1
0
        //────────────────────────────────────────

        /// <summary>
        /// クリアー
        /// </summary>
        public void Clear(MemoryApplication owner_MemoryApplication)
        {
            Log_Method  log_Method             = new Log_MethodImpl(1, Log_ReportsImpl.BDebugmode_Static);
            Log_Reports log_Reports_ThisMethod = new Log_ReportsImpl(log_Method);

            log_Method.BeginMethod(Info_MiddleImpl.Name_Library, this, "Clear", log_Reports_ThisMethod);
            //

            this.owner_MemoryApplication = owner_MemoryApplication;

            this.cur_Configurationtree = new Configurationtree_NodeImpl("<clear>", null);
            if (null == this.memoryAaeditorxml_Editor)
            {
                this.memoryAaeditorxml_Editor = new MemoryAaeditorxml_EditorImpl(null);
            }
            else
            {
                if (log_Method.CanDebug(1))
                {
                    log_Method.WriteDebug_ToConsole("「エディター設定ファイル・モデル」をクリアーします。");
                }

                this.memoryAaeditorxml_Editor.Clear();
            }


            goto gt_EndMethod;
            //
gt_EndMethod:
            log_Method.EndMethod(log_Reports_ThisMethod);
            log_Reports_ThisMethod.EndLogging(log_Method);
        }
Esempio n. 2
0
        //────────────────────────────────────────

        /// <summary>
        /// ユーザー定義関数を登録します。
        /// </summary>
        /// <param name="sName"></param>
        /// <param name="e_Func"></param>
        /// <param name="log_Reports"></param>
        public void AddFunction(string sName, Expression_Node_Function ec_CommonFunction, Log_Reports log_Reports)
        {
            Log_Method log_Method = new Log_MethodImpl(0);

            log_Method.BeginMethod(Info_MiddleImpl.Name_Library, this, "AddFunc", log_Reports);

            if (log_Method.CanDebug(1))
            {
            }

            //
            //

            if (this.dictionary_Item.ContainsKey(sName))
            {
                goto gt_Error_Exists;
            }

            this.dictionary_Item.Add(sName, ec_CommonFunction);

            if (log_Method.CanDebug(1))
            {
                log_Method.WriteDebug_ToConsole(" ユーザー定義関数の追加登録 [" + sName + "]");
            }

            goto gt_EndMethod;
            //
            //
            #region 異常系
            //────────────────────────────────────────
gt_Error_Exists:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲設定エラー101!", log_Method);
                r.Message = "ユーザー定義関数[" + sName + "]は既に定義されていますが、さらに定義されました。同じ名前のユーザー定義関数は1つしか定義してはいけません。";
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
gt_EndMethod:
            log_Method.EndMethod(log_Reports);
        }
Esempio n. 3
0
        //────────────────────────────────────────
        #endregion



        #region アクション
        //────────────────────────────────────────

        /// <summary>
        /// 関数を登録します。
        /// </summary>
        /// <param name="sName_Fnc"></param>
        /// <param name="expr_Func"></param>
        public static void SetFunction(string sName_Fnc, Expression_Node_Function expr_Func, Log_Reports log_Reports)
        {
            Log_Method log_Method = new Log_MethodImpl(1);

            log_Method.BeginMethod(Info_Functions.Name_Library, "Collection_Function", "SetFunction", log_Reports);
            //

            dictionary_Interlibrary[sName_Fnc] = expr_Func;
            if (log_Method.CanDebug(1))
            {
                log_Method.WriteDebug_ToConsole("関数[" + sName_Fnc + "]を登録しました。dictionary.count=[" + dictionary_Interlibrary.Count + "]");
            }

            //
            log_Method.EndMethod(log_Reports);
        }
Esempio n. 4
0
        /// <summary>
        /// 変数設定ファイルを読込みます。
        /// </summary>
        public void LoadVariables(
            String sFpath_Startup,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

            log_Method.BeginMethod(Info_MiddleImpl.Name_Library, this, "LoadVariables", log_Reports);
            //

            if (log_Method.CanDebug(1))
            {
                log_Method.WriteDebug_ToConsole("「変数登録ファイル」を読込みます。");
            }

            Table_Humaninput xenonTable_Variables;

            this.TryGetTable_Variables(
                out xenonTable_Variables,
                sFpath_Startup,
                log_Reports
                );

            if (null == xenonTable_Variables)
            {
                //変数登録ファイルが無ければ無視。
                goto gt_EndMethod;
            }

            if (log_Reports.Successful)
            {
                //this.Owner_MemoryApplication.MemoryVariables.Load(
                this.Load(
                    xenonTable_Variables,
                    log_Reports
                    );
            }

            goto gt_EndMethod;
            //
gt_EndMethod:
            log_Method.EndMethod(log_Reports);
        }
Esempio n. 5
0
        /// <summary>
        /// クリアーします。
        /// </summary>
        public void Clear(MemoryApplication owner_MemoryApplication)
        {
            Log_Method  log_Method             = new Log_MethodImpl(1, Log_ReportsImpl.BDebugmode_Static);
            Log_Reports log_Reports_ThisMethod = new Log_ReportsImpl(log_Method);

            log_Method.BeginMethod(Info_MiddleImpl.Name_Library, this, "Clear", log_Reports_ThisMethod);
            //

            this.owner_MemoryApplication = owner_MemoryApplication;

            if (null == this.DictionaryExpression_Item)
            {
                this.dictionaryExpression_Item = new Dictionary <string, Expression_Node_String>();
            }
            else
            {
                if (log_Method.CanDebug(1))
                {
                    log_Method.WriteDebug_ToConsole("次の変数を消します。");
                    log_Method.WriteDebug_ToConsole("────────────────────");
                    foreach (KeyValuePair <string, Expression_Node_String> kvp in this.DictionaryExpression_Item)
                    {
                        log_Method.WriteDebug_ToConsole("  " + kvp.Key + "=" + kvp.Value.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports_ThisMethod));
                    }
                    log_Method.WriteDebug_ToConsole("────────────────────");
                }

                this.DictionaryExpression_Item.Clear();
            }

            this.parent_Variablesconfig_Configurationtree = null;


            goto gt_EndMethod;
            //
gt_EndMethod:
            log_Method.EndMethod(log_Reports_ThisMethod);
            log_Reports_ThisMethod.EndLogging(log_Method);
        }
Esempio n. 6
0
        //────────────────────────────────────────

        /// <summary>
        /// 【追加 2012-07-05】
        /// </summary>
        /// <param name="s_Cur"></param>
        /// <param name="e_Cur"></param>
        /// <param name="bRequired_NameAttr"></param>
        /// <param name="bRequired_ValueAttrIsChild"></param>
        /// <param name="log_Reports"></param>
        public static void ParseAttr_InAnotherLibrary(
            Configurationtree_Node cur_Cf,
            Expression_Node_String cur_Ec,
            bool bRequired_NameAttr,         //name属性が必須な場合、真。
            bool bRequired_ValueAttrIsChild, //value属性を、子<f-str>にする場合、真。
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

            log_Method.BeginMethod(Info_ConfigurationtreeToExpression.Name_Library, "SToE_F14n16_AbstractImpl_", "ParseAttr_InAnotherLibrary", log_Reports);

            if (log_Method.CanDebug(1))
            {
                //d_ParsingLog.Increment("(5.FElem汎用)"+s_Cur.Name_Node);
            }


            ConfigurationtreeToExpression_F14_FncImpl_ dammy = new ConfigurationtreeToExpression_F14_FncImpl_();//メソッドが使いたいだけなので、何でもいい。

            dammy.ParseAttr_InConfigurationtreeToExpression(
                cur_Cf,
                cur_Ec,
                bRequired_NameAttr,
                bRequired_ValueAttrIsChild,
                log_Reports
                );

            goto gt_EndMethod;
            //
            //
gt_EndMethod:

            if (Log_ReportsImpl.BDebugmode_Static)
            {
                //d_ParsingLog.Decrement(s_Cur.Name_Node);
            }
            log_Method.EndMethod(log_Reports);
        }
Esempio n. 7
0
        //────────────────────────────────────────

        /// <summary>
        /// S → E。
        /// </summary>
        public void Translate(
            MemoryApplication memoryApplication,
            Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

            log_Method.BeginMethod(Info_ConfigurationtreeToExpression.Name_Library, this, "SToE", log_Reports);

            if (log_Method.CanDebug(1))
            {
                pg_ParsingLog.Increment("(41)バリデーションファイル");
            }

            //
            //
            //
            //

            if (log_Reports.Successful)
            {
                //
                // コントロール順
                memoryApplication.MemoryForms.ForEach_Children(delegate(string sKey, Usercontrol uct, ref bool bRemove, ref bool bBreak)
                {
                    if (uct is UsercontrolListbox)
                    {
                        //
                        // リストボックスなら。
                        UsercontrolListbox uctLst = (UsercontrolListbox)uct;

                        List <Configurationtree_Node> cfList_ValidatorConfig = uctLst.ControlCommon.Configurationtree_Control.GetChildrenByNodename(NamesNode.S_CODEFILE_VALIDATORS, false, log_Reports);
                        if (1 < cfList_ValidatorConfig.Count)
                        {
                            throw new Exception("バリデーター設定要素が2つ以上ありました。");
                        }
                        else if (0 < cfList_ValidatorConfig.Count)
                        {
                            Configurationtree_Node cf_ValidatorConfig = cfList_ValidatorConfig[0];

                            // (Sv)コントロールのSv
                            {
                                ConfigurationtreeToExpression_V52_FListboxValidationImpl_ to = new ConfigurationtreeToExpression_V52_FListboxValidationImpl_();

                                List <Configurationtree_Node> cfList_Validation = cf_ValidatorConfig.GetChildrenByNodename(NamesNode.S_F_LISTBOX_VALIDATION, false, log_Reports);

                                foreach (Configurationtree_Node child_Cf in cfList_Validation)
                                {
                                    //
                                    // <f-list-box-validation>
                                    to.Translate(
                                        child_Cf,
                                        uctLst,
                                        memoryApplication,
                                        pg_ParsingLog,
                                        log_Reports
                                        );
                                }//foreach
                            }

                            {
                                ConfigurationtreeToUsercontrol_V52_ValidatorImpl_ to = new ConfigurationtreeToUsercontrol_V52_ValidatorImpl_();

                                List <Configurationtree_Node> cfList_Validator = cf_ValidatorConfig.GetChildrenByNodename(NamesNode.S_VALIDATOR, false, log_Reports);
                                foreach (Configurationtree_Node cf in cfList_Validator)
                                {
                                    to.ConfigurationtreeToUsercontrol(
                                        cf,
                                        uct,
                                        pg_ParsingLog,
                                        log_Reports
                                        );
                                }
                            }
                        }//Ov
                    }
                    else
                    {
                    }
                });
            }

            goto gt_EndMethod;


            //
            //
            //
            //
gt_EndMethod:

            if (Log_ReportsImpl.BDebugmode_Static)
            {
                pg_ParsingLog.Decrement("(41)バリデーションファイル");
            }
            log_Method.EndMethod(log_Reports);
        }
Esempio n. 8
0
        //────────────────────────────────────────

        /// <summary>
        /// 親要素に、この要素を追加。
        /// </summary>
        protected override void LinkToParent(
            Configurationtree_Node cur_Cf, Configurationtree_Node parent_Cf, MemoryApplication memoryApplication, Log_Reports log_Reports)
        {
            Log_Method log_Method = new Log_MethodImpl(0);

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


            //
            // name属性は必須。
            //
            string sName_Fnc;

            cur_Cf.Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sName_Fnc, true, log_Reports);
            if (!log_Reports.Successful)
            {
                goto gt_EndMethod;
                //goto gt_Error_UndefinedFncNameAttr;
            }

            string parent_SName_Fnc;

            {
                //
                // ※注意 <data >も、<fnc >扱い。name属性を持っていない。
                //
                bool bRequired = false;
                parent_Cf.Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out parent_SName_Fnc, bRequired, log_Reports);

                if (!log_Reports.Successful)
                {
                    goto gt_EndMethod;
                    //goto gt_Error_UndefinedFncNameAttr;
                }
            }



            if (NamesFnc.S_WHERE == sName_Fnc)
            {
                //
                //
                //
                // 親へ連結。
                //
                //
                //
                parent_Cf.List_Child.Add(
                    cur_Cf,
                    log_Reports
                    );

                // デバッグ出力
                if (log_Method.CanDebug(1))
                {
                    Log_TextIndented s = new Log_TextIndentedImpl();
                    parent_Cf.ToText_Locationbreadcrumbs(s);
                    //log_Method.WriteDebug_ToConsole( "<fnc name=”[" + sFncName + "]”>要素 親要素「S■[" + s_Parent.Name_Node + "]」の子リストに、自分を追加。 子要素の数は[" + s_Cur.CountChildNodes + "]でした。");
                    log_Method.WriteDebug_ToConsole("<fnc name=”[" + sName_Fnc + "]”>要素 親要素「S■[" + parent_Cf.Name + "]」の『属性[" + cur_Cf.Name + "]』に、自分「S■[" + cur_Cf.Name + "]」を追加。 子要素の数は[" + cur_Cf.List_Child.Count + "]でした。 Place=[" + s.ToString() + "]");
                }
            }
            else if (NamesFnc.S_CASE == sName_Fnc)
            {
                //
                // 親要素は Sf:switch; である必要があります。
                //
                if (NamesFnc.S_SWITCH != parent_SName_Fnc)
                {
                    if (log_Reports.CanCreateReport)
                    {
                        Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                        r.SetTitle("▲エラー308!", log_Method);

                        Log_TextIndented s = new Log_TextIndentedImpl();

                        s.Append("Sf:case;系要素の親は f-switch を期待します。");
                        s.Newline();
                        s.Newline();

                        s.Append("親ノード名=[");
                        s.Append(parent_Cf.Name);
                        s.Append("]");
                        s.Newline();
                        s.Newline();

                        // ヒント
                        s.Append(r.Message_Configuration(parent_Cf));

                        r.Message = s.ToString();
                        log_Reports.EndCreateReport();
                    }

                    goto gt_EndMethod;
                }

                // 要素の(OAelemListではなく)OAcaseListに、この Sf:case; 要素を追加。

                //
                //
                //
                // 親へ連結。
                //
                //
                //
                parent_Cf.List_Child.Add(
                    cur_Cf,
                    log_Reports
                    );
            }
            else if (
                NamesFnc.S_ITEM_LABEL2 == sName_Fnc
                )
            {
                //
                //
                //
                // 親へ連結。
                //
                //
                //
                parent_Cf.List_Child.Add(
                    cur_Cf,
                    log_Reports
                    );
            }
            else if (
                NamesFnc.S_ITEM_VALUE == sName_Fnc
                )
            {
                //
                //
                //
                // 親へ連結。
                //
                //
                //
                parent_Cf.List_Child.Add(
                    cur_Cf,
                    log_Reports
                    );
            }
            else if (
                NamesFnc.S_ITEM_GRAY_OUT == sName_Fnc
                )
            {
                //
                //
                //
                // 親へ連結。
                //
                //
                //
                parent_Cf.List_Child.Add(
                    cur_Cf,
                    log_Reports
                    );
            }
            else if (
                NamesFnc.S_RECORD_SET_SAVE_TO2 == sName_Fnc
                )
            {
                //
                // 暫定で、親要素は<f-all-true>である必要があります。
                //
                if (NamesFnc.S_ALL_TRUE != parent_SName_Fnc)
                {
                    if (log_Reports.CanCreateReport)
                    {
                        Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                        r.SetTitle("▲エラー404!", log_Method);

                        Log_TextIndented s = new Log_TextIndentedImpl();

                        s.Append("<a-empty-field>系要素の親は <f-all-true> であることを期待します。");
                        s.Newline();
                        s.Newline();

                        s.Append("oFnode.NodeName=[");
                        s.Append(parent_Cf.Name);
                        s.Append("]");
                        s.Newline();
                        s.Newline();

                        // ヒント
                        s.Append(r.Message_Configuration(parent_Cf));

                        r.Message = s.ToString();
                        log_Reports.EndCreateReport();
                    }

                    goto gt_EndMethod;
                }

                if (!(NamesFnc.S_ALL_TRUE == parent_SName_Fnc))
                {
                    if (log_Reports.CanCreateReport)
                    {
                        Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                        r.SetTitle("▲エラー403!", log_Method);

                        Log_TextIndented s = new Log_TextIndentedImpl();

                        s.Append("内部プログラムのミス。");
                        s.Newline();
                        s.Append("<a-empty-field>系要素の親が、OFAllTrueImplクラスでありませんでした。");
                        s.Newline();
                        s.Newline();

                        s.Append("oFnode.NodeName=[");
                        s.Append(parent_Cf.Name);
                        s.Append("]");
                        s.Newline();
                        s.Newline();

                        s.Append("oFnode.GetType().Name=[");
                        s.Append(parent_Cf.GetType().Name);
                        s.Append("]");
                        s.Newline();
                        s.Newline();

                        // ヒント
                        s.Append(r.Message_Configuration(parent_Cf));

                        r.Message = s.ToString();
                        log_Reports.EndCreateReport();
                    }

                    goto gt_EndMethod;
                }

                // 親要素の(OAelemListではなく)OArecordSetSaveToListに、この<fnc name=”Sf:a-record-set-save-to;”>要素を追加。

                //
                //
                //
                // 親へ連結。
                //
                //
                //
                parent_Cf.List_Child.Add(
                    cur_Cf,
                    log_Reports
                    );
            }
            else if (
                NamesFnc.S_EMPTY_FIELD == sName_Fnc
                )
            {
                //
                // 親要素は<f-all-true>である必要があります。
                //
                if (NamesFnc.S_ALL_TRUE != parent_SName_Fnc)
                {
                    if (log_Reports.CanCreateReport)
                    {
                        Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                        r.SetTitle("▲エラー405!", log_Method);

                        Log_TextIndented s = new Log_TextIndentedImpl();

                        s.Append("<a-empty-field>系要素の親は <f-all-true> であることを期待します。");
                        s.Newline();
                        s.Newline();

                        s.Append("oFnode.NodeName=[");
                        s.Append(parent_Cf.Name);
                        s.Append("]");
                        s.Newline();
                        s.Newline();

                        // ヒント
                        s.Append(r.Message_Configuration(parent_Cf));

                        r.Message = s.ToString();
                        log_Reports.EndCreateReport();
                    }

                    goto gt_EndMethod;
                }

                if (!(NamesFnc.S_ALL_TRUE == parent_SName_Fnc))
                {
                    if (log_Reports.CanCreateReport)
                    {
                        Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                        r.SetTitle("▲エラー406!", log_Method);

                        Log_TextIndented s = new Log_TextIndentedImpl();

                        s.Append("内部プログラムのミス。");
                        s.Newline();
                        s.Append("<a-empty-field>系要素の親が、OFAllTrueImplクラスでありませんでした。");
                        s.Newline();
                        s.Newline();

                        s.Append("oFnode.NodeName=[");
                        s.Append(parent_Cf.Name);
                        s.Append("]");
                        s.Newline();
                        s.Newline();

                        s.Append("oFnode.GetType().Name=[");
                        s.Append(parent_Cf.GetType().Name);
                        s.Append("]");
                        s.Newline();
                        s.Newline();

                        // ヒント
                        s.Append(r.Message_Configuration(parent_Cf));

                        r.Message = s.ToString();
                        log_Reports.EndCreateReport();
                    }

                    goto gt_EndMethod;
                }

                //
                // <f-all-true>

                //
                // 親要素の(OAelemListではなく)OAemptyFldListに、この<a-empty-field>要素を追加。

                //
                //
                //
                // 親へ連結。
                //
                //
                //
                parent_Cf.List_Child.Add(
                    cur_Cf,
                    log_Reports
                    );
            }
            else
            {
                // 親要素「S■??」に、この「S■fnc」要素を追加。
                // 同名要素が複数個並ぶので、属性ではなく子要素として追加する。

                //
                //
                //
                // 親へ連結。
                //
                //
                //
                parent_Cf.List_Child.Add(
                    cur_Cf,
                    log_Reports
                    );

                if (log_Method.CanDebug(1))
                {
                    log_Method.WriteDebug_ToConsole("<fnc name=”[" + sName_Fnc + "]”>要素 親要素「S■[" + parent_Cf.Name + "]」の子リストに、自分を追加。 子要素の数は[" + cur_Cf.List_Child.Count + "]でした。");
                }
            }


            goto gt_EndMethod;
            //
            //
gt_EndMethod:
            log_Method.EndMethod(log_Reports);
        }
Esempio n. 9
0
        //────────────────────────────────────────

        public void Translate(
            Configurationtree_Node cur_Conf,//Sv_3FListboxValidation
            UsercontrolListbox uctLst,
            MemoryApplication memoryApplication,
            Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

            log_Method.BeginMethod(Info_ConfigurationtreeToExpression.Name_Library, this, "SToE", log_Reports);

            if (log_Method.CanDebug(1))
            {
                pg_ParsingLog.Increment("(34)" + cur_Conf.Name);
            }

            //
            //

            // バリデーター設定要素
            Configurationtree_Node cf_ValidatorConfig;
            {
                List <Configurationtree_Node> cfList_ValidatorConfig = uctLst.ControlCommon.Configurationtree_Control.GetChildrenByNodename(NamesNode.S_CODEFILE_VALIDATORS, false, log_Reports);

                if (1 < cfList_ValidatorConfig.Count)
                {
                    throw new Exception("バリデーター設定要素が2つ以上ありました。");
                }
                else if (0 < cfList_ValidatorConfig.Count)
                {
                    cf_ValidatorConfig = cfList_ValidatorConfig[0];
                }
                else
                {
                    cf_ValidatorConfig = null;
                }
            }



            //
            //
            //
            // 自
            //
            //
            //
            Expressionv_3FListboxValidationImpl cur_Exprv = new Expressionv_3FListboxValidationImpl(null, cf_ValidatorConfig, memoryApplication);

            //
            //
            //
            // 子
            //
            //
            //
            List <Configurationtree_Node> cfList_Fnc = cur_Conf.GetChildrenByNodename(NamesNode.S_FNC, false, log_Reports);

            // #デバッグ中
            //d_InMethod.WriteDebug_ToConsole(1, " <a-display>数=[" + sv_Cur.Sv_ADisplayList.Count + "]");
            //d_InMethod.WriteDebug_ToConsole(1, " <fnc name=”a-record-set-save-to”>数=[" + sv_Cur.Sv_ASelectRecordList.Count + "]");

            foreach (Configurationtree_Node child_Cf in cfList_Fnc)
            {
                string sName_Fnc;
                child_Cf.Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sName_Fnc, true, log_Reports);

                if (NamesFnc.S_VLD_SELECT_RECORD == sName_Fnc)
                {
                    ConfigurationtreeToExpression_V53_ASelectRecordImpl_ to = new ConfigurationtreeToExpression_V53_ASelectRecordImpl_();
                    to.Translate(
                        child_Cf,
                        cur_Exprv,
                        memoryApplication,
                        pg_ParsingLog,
                        log_Reports
                        );
                }
                else if (NamesFnc.S_VLD_DISPLAY == sName_Fnc)
                {
                    // <a-display>要素
                    ConfigurationtreeToExpression_V53_ADisplayImpl_ to = new ConfigurationtreeToExpression_V53_ADisplayImpl_();
                    to.Translate(
                        child_Cf,
                        cur_Exprv,
                        uctLst,
                        memoryApplication,
                        pg_ParsingLog,
                        log_Reports
                        );
                }
                else
                {
                    log_Method.WriteError_ToConsole("未実装です。");
                    throw new Exception("未実装です。");
                }
            }


            goto gt_EndMethod;


            //
            //
            //
            //
gt_EndMethod:

            if (Log_ReportsImpl.BDebugmode_Static)
            {
                pg_ParsingLog.Decrement(cur_Conf.Name);
            }
            log_Method.EndMethod(log_Reports);
        }
Esempio n. 10
0
        //────────────────────────────────────────

        /// <summary>
        /// <f-param>
        /// </summary>
        /// <param name="oFStrNode"></param>
        /// <param name="nFAelem"></param>
        /// <param name="moOpyopyo"></param>
        /// <param name="log_Reports"></param>
        public override void Translate(
            Configurationtree_Node cur_Cf,    //<f-param>
            Expression_Node_String parent_Ec, //親<●●>要素。汎用。
            MemoryApplication memoryApplication,
            Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

            log_Method.BeginMethod(Info_ConfigurationtreeToExpression.Name_Library, this, "SToE", log_Reports);

            if (log_Method.CanDebug(1))
            {
                pg_ParsingLog.Increment("(28)" + cur_Cf.Name);
            }

            //
            //
            //
            //


            //
            //
            //
            // 自
            //
            //
            //
            Expression_FparamImpl cur_Ec = new Expression_FparamImpl(parent_Ec, cur_Cf, memoryApplication);


            //
            //
            //
            // 属性
            //
            //
            //
            if (log_Reports.Successful)
            {
                // 非必須 call=”” call属性がなくても正常です。子要素を見に行きます。
                this.ParseAttr_InConfigurationtreeToExpression(
                    cur_Cf,
                    cur_Ec,
                    false, //name属性は無い。
                    true,  //valueは子f-strに変換。
                    log_Reports
                    );
            }


            //
            //
            //
            // 子
            //
            //
            //
            {
                // 子<●●> TODO:子call属性要素。
                this.ParseChild_InConfigurationtreeToExpression(
                    cur_Cf,
                    cur_Ec,
                    memoryApplication,
                    pg_ParsingLog,
                    log_Reports
                    );
            }
            //ystem.Console.WriteLine(this.GetType().Name + "#SToE: ──────────属性ここまで");


            //
            //
            //
            // 親へ連結
            //
            //
            //
            {
                parent_Ec.List_Expression_Child.Add(cur_Ec, log_Reports);
            }

            //
            //
            //
            //

            if (Log_ReportsImpl.BDebugmode_Static)
            {
                pg_ParsingLog.Decrement(cur_Cf.Name);
            }
            log_Method.EndMethod(log_Reports);
        }
Esempio n. 11
0
        //────────────────────────────────────────

        protected override Configurationtree_Node CreateMyself(
            XmlElement cur_X,
            Configurationtree_Node parent_Cf,
            MemoryApplication memoryApplication,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(1);

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

            if (log_Method.CanDebug(1))
            {
            }

            //
            //

            Configurationtree_Node cur_Cf = null;

            //
            // name属性は必須。
            //
            string sName_Fnc = cur_X.GetAttribute(PmNames.S_NAME.Name_Attribute);

            if ("" == sName_Fnc)
            {
                goto gt_Error_UndefinedFncNameAttr;
            }

            //
            //

            if (
                NamesFnc.S_CELL == sName_Fnc ||           //Sf:cell;
                NamesFnc.S_WHERE == sName_Fnc ||          //Sf:where;
                NamesFnc.S_REC_COND == sName_Fnc ||       //Sf:rec-cond;
                NamesFnc.S_VALUE_CONTROL == sName_Fnc ||
                NamesFnc.S_CASE == sName_Fnc ||           //Sf:case;”
                NamesFnc.S_LISTBOX_LABELS == sName_Fnc || //Sf:list-box-labels;
                NamesFnc.S_SWITCH == sName_Fnc ||         //Sf:switch;
                NamesFnc.S_ITEM_LABEL2 == sName_Fnc ||    //Sf:item-label;
                NamesFnc.S_ITEM_VALUE == sName_Fnc ||     //Sf:item-value;
                NamesFnc.S_ITEM_GRAY_OUT == sName_Fnc ||  //Sf:item-gray-out;
                NamesFnc.S_TEXT_TEMPLATE == sName_Fnc ||  //Sf:text-template;
                NamesFnc.S_EMPTY_FIELD == sName_Fnc ||
                NamesFnc.S_ALL_TRUE == sName_Fnc
                )
            {
                cur_Cf = new Configurationtree_NodeImpl(NamesNode.S_FNC, parent_Cf);
            }
            else if (NamesNode.S_DATA == cur_X.Name)
            {
                // 【追加】
                cur_Cf = new Configurationtree_NodeImpl(NamesNode.S_DATA, parent_Cf);
            }
            else if (NamesFnc.S_RECORD_SET_SAVE_TO2 == sName_Fnc)
            {
                // ノード名は fnc では。
                cur_Cf = new Configurationtree_NodeImpl(NamesNode.S_A_RECORD_SET_SAVE_TO, parent_Cf);
            }
            else
            {
                // <fnc name=”Sa:入力値の確定;”>
                // などがここにくる。
                cur_Cf = new Configurationtree_NodeImpl(NamesNode.S_FNC, parent_Cf);
            }


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

                Log_TextIndented s = new Log_TextIndentedImpl();

                s.Append("<fnc>要素に、name属性が指定されていませんでした。");
                s.Newline();
                s.Newline();

                // ヒント
                s.Append(r.Message_Configuration(parent_Cf));

                r.Message = s.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
gt_EndMethod:
            log_Method.EndMethod(log_Reports);
            return(cur_Cf);
        }
Esempio n. 12
0
        //────────────────────────────────────────

        /// <summary>
        /// 「S■f-var」
        /// </summary>
        /// <param name="oFStrNode"></param>
        /// <param name="nFAelem"></param>
        /// <param name="moOpyopyo"></param>
        /// <param name="log_Reports"></param>
        public override void Translate(
            Configurationtree_Node cur_Cf,    //「S■f-var」
            Expression_Node_String parent_Ec, //親<●●>
            MemoryApplication memoryApplication,
            Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

            log_Method.BeginMethod(Info_ConfigurationtreeToExpression.Name_Library, this, "SToE", log_Reports);

            if (log_Method.CanDebug(1))
            {
                pg_ParsingLog.Increment("(33)" + cur_Cf.Name);
            }

            //
            //
            //
            //


            //
            //
            //
            // 自
            //
            //
            //
            Expression_FvarImpl cur_Ec = new Expression_FvarImpl(parent_Ec, cur_Cf, memoryApplication);


            //
            //
            //
            // 属性
            //
            //
            //
            if (log_Reports.Successful)
            {
                this.ParseAttr_InConfigurationtreeToExpression(
                    cur_Cf,
                    cur_Ec,
                    false, //name属性は無い。
                    false, //value属性は、子<f-str>にしない。
                    log_Reports
                    );
            }


            //
            //
            //
            // 子
            //
            //
            //
            {
                // 非必須 value=”” value属性がなくても正常です。子要素を見に行きます。
                if (cur_Cf.Dictionary_Attribute.ContainsKey(PmNames.S_VALUE.Name_Pm))
                {
                    string sValue;
                    cur_Cf.Dictionary_Attribute.TryGetValue(PmNames.S_VALUE, out sValue, true, log_Reports);
                    cur_Ec.AppendTextNode(
                        sValue,
                        cur_Cf,
                        log_Reports
                        );
                }
            }


            //
            //
            //
            // 子
            //
            //
            //
            {
                this.ParseChild_InConfigurationtreeToExpression(
                    cur_Cf,
                    cur_Ec,
                    memoryApplication,
                    pg_ParsingLog,
                    log_Reports
                    );
            }


            //
            //
            //
            // 親へ連結
            //
            //
            //
            {
                parent_Ec.List_Expression_Child.Add(
                    cur_Ec,
                    log_Reports
                    );
            }

            //
            //
            //
            //

            if (Log_ReportsImpl.BDebugmode_Static)
            {
                pg_ParsingLog.Decrement(cur_Cf.Name);
            }
            log_Method.EndMethod(log_Reports);
        }
Esempio n. 13
0
        //────────────────────────────────────────

        /// <summary>
        /// <f-cell>→M
        /// </summary>
        /// <param name="outputValueStr"></param>
        /// <param name="nKeyExpected"></param>
        /// <param name="nFcell"></param>
        /// <param name="moApplication"></param>
        /// <param name="log_Reports"></param>
        public void Translate(
            string sOutputValue,
            Expression_Node_String ec_KeyExpected,
            Expression_Node_String ec_SfCell,//Sf:cell;相当と想定。
            MemoryApplication moApplication,
            Log_Reports log_Reports
            )
        {
            Log_Method pg_Method = new Log_MethodImpl(0);

            pg_Method.BeginMethod(Info_Controls.Name_Library, this, "EToM2", log_Reports);
            //
            //

            string sName_Fnc;

            ec_SfCell.TrySelectAttribute(out sName_Fnc, PmNames.S_NAME.Name_Pm, EnumHitcount.One, log_Reports);
            if (NamesFnc.S_CELL != sName_Fnc)
            {
                // エラー。
                goto gt_Error_NotSfcell;
            }


            string sSelectedFldName;

            if (log_Reports.Successful)
            {
                bool bHit = ec_SfCell.TrySelectAttribute(
                    out sSelectedFldName,
                    PmNames.S_SELECT.Name_Pm,
                    EnumHitcount.One_Or_Zero,
                    log_Reports
                    );

                //if (!bHit)
                //{
                //    // 【追加 2012-07-10】
                //    // Sf:cell; の子要素arg1 には、name="select" のものがある。本来これは属性連結しておいて欲しい。
                //    List<Expression_Node_String> list_Arg1 = e_SfCell.SelectDirectchildByNodename(NamesNode.S_ARG1, false, EnumHitcount.Unconstraint, log_Reports);

                //    d_InMethod.WriteDebug_ToConsole(1, "sSelectedFldNameが属性になかった。子要素arg1(" + list_Arg1 .Count+ "個)から探す。");
                //    if (0<d_InMethod.NDebugLevel && list_Arg1.Count<=0)
                //    {
                //        Log_TextIndented s = new Log_TextIndentedImpl();
                //        e_SfCell.ToText_Snapshot(s);
                //        d_InMethod.WriteDebug_ToConsole(1, s.ToString());
                //    }

                //    EUtil_NodeImpl.SelectItemsByAttrAsCsv(list_Arg1, PmNames.NAME.SAttrName, ValuesAttr.S_SELECT, false, EnumHitcount.First_Exist, log_Reports);

                //    if (log_Reports.Successful)
                //    {
                //        sSelectedFldName = list_Arg1[0].Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports);
                //    }
                //}
            }
            else
            {
                sSelectedFldName = "";
            }


            Expression_Node_String ec_KeyFldName1 = null;

            if (log_Reports.Successful)
            {
                Expression_Node_String ec_Where = null;

                //
                // 「E■where」は子要素。
                //

                // 再検索。
                ec_SfCell.List_Expression_Child.ForEach(delegate(Expression_Node_String ec_Child, ref bool bRemove, ref bool bBreak)
                {
                    string sValue;
                    ec_Child.TrySelectAttribute(out sValue, PmNames.S_NAME.Name_Pm, EnumHitcount.One, log_Reports);

                    if (NamesNode.S_FNC == ec_Child.Cur_Configuration.Name &&
                        NamesFnc.S_WHERE == sValue)
                    {
                        ec_Where = ec_Child;

                        if (pg_Method.CanDebug(2))
                        {
                            pg_Method.WriteDebug_ToConsole("子「E■[" + ec_Child.Cur_Configuration.Name + "]」。子要素数=[" + ec_Where.List_Expression_Child.Count + "]");
                        }

                        ec_Where.List_Expression_Child.ForEach(delegate(Expression_Node_String e_Item, ref bool bRemove2, ref bool bBreak2)
                        {
                            if (NamesNode.S_FNC == e_Item.Cur_Configuration.Name)
                            {
                                Expression_Node_String ec_Field;
                                bool bHit3 = e_Item.TrySelectAttribute(out ec_Field, PmNames.S_FIELD.Name_Pm, EnumHitcount.One_Or_Zero, log_Reports);
                                if (bHit3)
                                {
                                    //「E■f-cell」/「E■@where」/「E■fnc field=”★”」。
                                    ec_KeyFldName1 = ec_Field;

                                    if (pg_Method.CanDebug(2))
                                    {
                                        pg_Method.WriteDebug_ToConsole("「E■f-cell」/「E■a-where」/「E■fnc field=”[" + ec_KeyFldName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports) + "]”」。");
                                    }
                                }
                                else
                                {
                                    throw new Exception("ここは通らない?");
                                }
                            }
                            else
                            {
                                // #エラー
                                System.Console.WriteLine(Info_Controls.Name_Library + ":" + this.GetType().Name + "#EToM: 「E■fnc」がありませんでした。");
                            }
                        });
                    }
                    else
                    {
                        if (pg_Method.CanDebug(2))
                        {
                            pg_Method.WriteDebug_ToConsole("(無視)  子「E■[" + ec_Child.Cur_Configuration.Name + "]」。");
                        }
                    }
                });

                if (null == ec_Where)
                {
                    // #エラー
                    System.Console.WriteLine(Info_Controls.Name_Library + ":" + this.GetType().Name + "#EToM: 「E■f-cell」に、子「E■where」が無かった? そういう場合(無条件)もある。");
                }
            }
            else
            {
                ec_KeyFldName1 = null;
            }


            //
            // from
            //
            Expression_Node_String ec_TableName1;//ソース情報利用

            if (log_Reports.Successful)
            {
                // Sf:cell; に from が指定されていない?
                bool bHit = ec_SfCell.TrySelectAttribute(
                    out ec_TableName1,
                    PmNames.S_FROM.Name_Pm,
                    EnumHitcount.One,
                    log_Reports
                    );

                //if (null == e_TableName1)
                //{
                //    d_InMethod.WriteDebug_ToConsole(1, "e_TableName1が属性になかった。子要素arg1から探す。");
                //    // 【追加 2012-07-10】
                //    // Sf:cell; の子要素arg1 には、name=”from” のものがある。本来これは属性連結しておいて欲しい。
                //    List<Expression_Node_String> list_Arg1 = e_SfCell.SelectDirectchildByNodename(NamesNode.S_ARG1, false, EnumHitcount.Unconstraint, log_Reports);
                //    EUtil_NodeImpl.SelectItemsByAttrAsCsv(list_Arg1, PmNames.NAME.SAttrName, ValuesAttr.S_FROM, false, EnumHitcount.First_Exist, log_Reports);

                //    if (log_Reports.Successful)
                //    {
                //        e_TableName1 = list_Arg1[0];
                //    }
                //}
            }
            else
            {
                ec_TableName1 = null;
            }


            //
            // required
            //
            bool bExpectedValueRequired = false;

            if (log_Reports.Successful)
            {
                string sRequired1;
                bool   bHit = ec_SfCell.TrySelectAttribute(out sRequired1, PmNames.S_REQUIRED.Name_Pm, EnumHitcount.One_Or_Zero, log_Reports);
                if (bHit)
                {
                    // 【旧仕様】
                    bool bParseSuccessful = bool.TryParse(sRequired1, out bExpectedValueRequired);
                }
                else
                {
                    // 【新仕様】

                    //
                    // 新仕様では、「E■f-cell/@E■where/E■prm name=”required”」。
                    //
                    {
                        Expression_Node_String ec_Where;
                        bool bHit1 = ec_SfCell.TrySelectAttribute(out ec_Where, PmNames.S_WHERE.Name_Pm, EnumHitcount.One_Or_Zero, log_Reports);
                        if (bHit1)
                        {
                            throw new Exception("こーこは通らない?");
                        }
                    }
                }
            }
            else
            {
            }


            // e_TableName を取得してから引数エラーチェック。
            if (null == ec_KeyExpected)
            {
                // エラー
                goto gt_Error_NullKeyExpected;
            }

            // ──────────

            Table_Humaninput o_Table;

            if (log_Reports.Successful)
            {
                o_Table = moApplication.MemoryTables.GetTable_HumaninputByName(ec_TableName1, true, log_Reports);
                // エラー時には、エラーメッセージを出させます。

                if (null == o_Table)
                {
                    //
                    // エラー中断。
                    goto gt_Error_NotFoundTable;
                }
                else
                {
                    //
                    // 正常時
                    //
                    //.WriteLine("(" + Info_Forms .LibraryName+ ")" + this.GetType().NFcName + "#...: (1)テーブル検索終了 refOTable=[" + refOTable.SourceFilePath + "]");
                }
            }
            else
            {
                o_Table = null;
            }


            string err_SKeyFldName;
            string err_SSelectedFldName;

            // field=""。
            Fielddefinition o_KeyFldDef;

            if (log_Reports.Successful)
            {
                //
                // 検索のキーとなるフィールドの定義を調べます。
                //

                List <string> sList_KeyFldName;
                {
                    sList_KeyFldName = new List <string>();

                    string sKeyFldName = ec_KeyFldName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports);
                    if ("" == sKeyFldName.Trim())
                    {
                        // エラー
                        err_SKeyFldName = sKeyFldName;
                        goto gt_Error_EmptyKeyField;
                    }
                    sList_KeyFldName.Add(sKeyFldName);
                    if (sList_KeyFldName.Count < 1)
                    {
                        // エラー
                        err_SKeyFldName = sKeyFldName;
                        goto gt_Error_ZeroKeyField;
                    }
                }

                RecordFielddefinition recordFielddefinition;
                bool bHit = o_Table.TryGetFieldDefinitionByName(
                    out recordFielddefinition,
                    sList_KeyFldName,
                    true,
                    log_Reports
                    );
                if (!log_Reports.Successful || !bHit)
                {
                    goto gt_EndMethod;
                }

                o_KeyFldDef = recordFielddefinition.ValueAt(0);
            }
            else
            {
                o_KeyFldDef = null;
            }


            RecordFielddefinition recordFielddefinition_Selected;

            if (log_Reports.Successful)
            {
                // 選択対象のフィールドの定義を調べます。

                List <string> sList_SelectedFldName;
                {
                    sList_SelectedFldName = new CsvTo_ListImpl().Read(sSelectedFldName);
                    foreach (string sName in sList_SelectedFldName)
                    {
                        if ("" == sName.Trim())
                        {
                            // エラー
                            err_SSelectedFldName = sSelectedFldName;
                            goto gt_Error_EmptySelectField;
                        }
                    }

                    if (sList_SelectedFldName.Count < 1)
                    {
                        // エラー
                        err_SSelectedFldName = sSelectedFldName;
                        goto gt_Error_ZeroSelectField;
                    }
                }

                bool bHit = o_Table.TryGetFieldDefinitionByName(
                    out recordFielddefinition_Selected,
                    sList_SelectedFldName,
                    false,
                    log_Reports
                    );
                if (!log_Reports.Successful || !bHit)
                {
                    goto gt_EndMethod;
                }
            }
            else
            {
                recordFielddefinition_Selected = null;
            }



            if (log_Reports.Successful)
            {
                if (null == o_KeyFldDef)
                {
                    //
                    // エラー中断。
                    goto gt_Error_NotFoundKeyFldDefinition;
                }
            }



            if (log_Reports.Successful)
            {
                if (recordFielddefinition_Selected.Count < 1)
                {
                    //
                    // エラー中断。
                    goto gt_Error_NotFoundSelectFldDefinition;
                }
            }


            if (log_Reports.Successful)
            {
                List <DataRow> dst_Row = new List <DataRow>();


                string             sKeyFieldName         = ec_KeyFldName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports);
                string             sExpectedValue        = ec_KeyExpected.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports);
                Configuration_Node cf_WrittenPlace_Query = ec_SfCell.Cur_Configuration;

                SelectPerformerImpl sp = new SelectPerformerImpl();
                sp.Select(
                    out dst_Row,
                    sKeyFieldName,
                    sExpectedValue,
                    bExpectedValueRequired,
                    o_KeyFldDef,
                    o_Table.DataTable,
                    cf_WrittenPlace_Query,
                    log_Reports
                    );



                if (0 < dst_Row.Count)
                {
                    //.WriteLine("(" + Info_Forms .LibraryName+ ")" + this.GetType().NFcName + "#...: (6a)該当 recordSet.Count=[" + recordSet.Count + "]");

                    foreach (DataRow row in dst_Row)
                    {
                        ToMemory_CellImpl updater = new ToMemory_CellImpl();

                        recordFielddefinition_Selected.ForEach(delegate(Fielddefinition fielddefinition_Selected, ref bool isBreak2, Log_Reports log_Reports2)
                        {
                            updater.ToMemory_ToSelectedField(
                                sOutputValue,
                                ec_SfCell,
                                row,
                                fielddefinition_Selected,
                                log_Reports
                                );
                        }, log_Reports);
                    }
                }
                else
                {
                    // エラー。
                    goto gt_Error_NotFoundRecord;
                }
            }

            goto gt_EndMethod;
            //
            //
gt_Error_NotSfcell:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー909!", pg_Method);

                Log_TextIndented s = new Log_TextIndentedImpl();

                s.Append("Sf:cell;でないExpression_Node_Stringが指定されました。");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                // ヒント
                s.Append(r.Message_Configuration(ec_SfCell.Cur_Configuration));
                if (null != ec_SfCell)
                {
                    ec_SfCell.ToText_Snapshot(s);
                }

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

                StringBuilder s = new StringBuilder();

                s.Append("引数e_KeyExpectedにヌルが指定されました。 e_KeyExpected=[");
                s.Append(ec_KeyExpected);
                s.Append("]");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                s.Append("  this.TableName=[");
                s.Append(ec_TableName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports));
                s.Append("]");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                // ヒント
                s.Append(r.Message_Configuration(ec_SfCell.Cur_Configuration));

                r.Message = s.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;

gt_Error_EmptyKeyField:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー903!", pg_Method);

                StringBuilder s = new StringBuilder();

                s.Append("fieldで指定されたキーフィールドの名前が空文字列でした。 err_SKeyFldName=[");
                s.Append(err_SKeyFldName);
                s.Append("]");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                s.Append("  this.TableName=[");
                s.Append(ec_TableName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports));
                s.Append("]");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                // ヒント
                s.Append(r.Message_Configuration(ec_SfCell.Cur_Configuration));

                r.Message = s.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;

gt_Error_ZeroKeyField:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー902!", pg_Method);

                StringBuilder s = new StringBuilder();

                s.Append("fieldで指定されたキーフィールドの個数が0個でした。 err_SKeyFldName=[");
                s.Append(err_SKeyFldName);
                s.Append("]");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                s.Append("  this.TableName=[");
                s.Append(ec_TableName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports));
                s.Append("]");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                // ヒント
                s.Append(r.Message_Configuration(ec_SfCell.Cur_Configuration));

                r.Message = s.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;

gt_Error_EmptySelectField:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー904!", pg_Method);

                StringBuilder s = new StringBuilder();

                s.Append("selectで指定されたフィールドの名前に空文字列がありました。 err_SSelectedFldName=[");
                s.Append(err_SSelectedFldName);
                s.Append("]");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                s.Append("  this.TableName=[");
                s.Append(ec_TableName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports));
                s.Append("]");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                // ヒント
                s.Append(r.Message_Configuration(ec_SfCell.Cur_Configuration));

                r.Message = s.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;

gt_Error_ZeroSelectField:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー901!", pg_Method);

                StringBuilder s = new StringBuilder();

                s.Append("selectで指定されたフィールドの個数が0個でした。 err_SSelectedFldName=[");
                s.Append(err_SSelectedFldName);
                s.Append("]");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                s.Append("  this.TableName=[");
                s.Append(ec_TableName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports));
                s.Append("]");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                // ヒント
                s.Append(r.Message_Configuration(ec_SfCell.Cur_Configuration));

                r.Message = s.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;

            // エラー。
gt_Error_NotFoundTable:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー1011!", pg_Method);

                StringBuilder s = new StringBuilder();

                s.Append(" ヌル=refTable");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                s.Append("  this.TableName=[");
                s.Append(ec_TableName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports));
                s.Append("]");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                // ヒント
                s.Append(r.Message_Configuration(ec_SfCell.Cur_Configuration));

                r.Message = s.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;

gt_Error_NotFoundKeyFldDefinition:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー478!", pg_Method);

                StringBuilder t = new StringBuilder();

                t.Append(" キーフィールドの定義を取得できませんでした。");
                t.Append(Environment.NewLine);

                t.Append("「E■[");
                t.Append(ec_KeyFldName1.Cur_Configuration.Name);
                t.Append("]」、キーフィールド名=[");
                t.Append(ec_KeyFldName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports));
                t.Append("]");
                t.Append(Environment.NewLine);
                t.Append(Environment.NewLine);

                // ヒント
                t.Append(r.Message_Configuration(ec_SfCell.Cur_Configuration));

                r.Message = t.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;

gt_Error_NotFoundSelectFldDefinition:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー479!", pg_Method);

                StringBuilder t = new StringBuilder();

                t.Append(" 取得データが入っているはずのフィールドの定義を取得できませんでした。");
                t.Append(Environment.NewLine);
                t.Append("  指定されたフィールド名=[");
                t.Append(sSelectedFldName);
                t.Append("]");
                t.Append(Environment.NewLine);
                t.Append(Environment.NewLine);

                // ヒント
                t.Append(r.Message_Configuration(ec_SfCell.Cur_Configuration));

                r.Message = t.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;

gt_Error_NotFoundRecord:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー344!", pg_Method);

                string sDebugExceptedKey = ec_KeyExpected.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports);

                Log_TextIndented s = new Log_TextIndentedImpl();

                s.Append("【失敗】");
                s.Newline();
                s.Newline();

                s.Append("[");
                s.Append(o_Table.Name);
                s.Append("](テーブル)には、");
                s.Append(Environment.NewLine);

                s.Append("[");
                s.Append(ec_KeyFldName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports));
                s.Append("]フィールドに");

                s.Append("[");
                s.Append(sDebugExceptedKey);
                s.Append("]が入っているレコードは、見つかりませんでした。");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);
                s.Append("この入力したデータは、入力が確定されず、無視されています。");
                s.Append(Environment.NewLine);

                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);
                s.Append("もしかして?");
                s.Append(Environment.NewLine);
                s.Append(" ・ツールの不便さにより、手入力で");
                s.Append(Environment.NewLine);
                s.Append("  指定のテーブルに ID付きのレコードの空欄を");
                s.Append(Environment.NewLine);
                s.Append("  予め 作っておかなければならなかった、といった決まりごとはありませんか?");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);
                s.Append(" ・それとも、それ以外の理由?");
                s.Append(Environment.NewLine);

                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);
                s.Append("────────以下はプログラマー用の情報。");
                s.Append(Environment.NewLine);


                // ヒント
                s.Append(r.Message_Configuration(ec_SfCell.Cur_Configuration));

                r.Message = s.ToString();

                //essageBox.Show(r.SMsg(log_Reports), Info_Forms.LibraryName + ":" + this.GetType().Name );
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;
            //
            //
gt_EndMethod:
            pg_Method.EndMethod(log_Reports);
        }
Esempio n. 14
0
        //────────────────────────────────────────

        public void ConfigurationtreeToUsercontrol(
            Configurationtree_Node cur_Cf,//Sv_3Validator <validator>
            Usercontrol ucontrol,
            Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

            log_Method.BeginMethod(Info_ConfigurationtreeToExpression.Name_Library, this, "SToFc", log_Reports);

            if (log_Method.CanDebug(1))
            {
                pg_ParsingLog.Increment("(41)" + cur_Cf.Name);
            }

            //
            //
            //
            //

            string    err_SParameterValue = null;
            Exception err_Excp            = null;
            string    err_SValue          = null;
            string    err_SName_Validator = null;



            EnumValidation_Old enumResult = EnumValidation_Old.Thru;

            if (cur_Cf.Dictionary_Attribute.ContainsKey(PmNames.S_VALUE_RESULT.Name_Pm))
            {
                string sValue_Parameter;
                cur_Cf.Dictionary_Attribute.TryGetValue(PmNames.S_VALUE_RESULT, out sValue_Parameter, true, log_Reports);
                switch (sValue_Parameter)
                {
                case "OK":
                    enumResult = EnumValidation_Old.Ok;
                    break;

                case "NG":
                    enumResult = EnumValidation_Old.Ng;
                    break;

                case "THRU":
                    enumResult = EnumValidation_Old.Thru;
                    break;

                default:
                    //
                    // エラー。
                    goto gt_Error_UndefinedValidator02;
                }
            }



            string sName;
            string sName_ValidatorTrim;

            {
                PmName pmName = PmNames.S_NAME;
                if (cur_Cf.Dictionary_Attribute.ContainsKey(pmName.Name_Pm))
                {
                    cur_Cf.Dictionary_Attribute.TryGetValue(pmName, out sName, true, log_Reports);
                    sName_ValidatorTrim = sName.Trim();
                }
                else
                {
                    sName = "";
                    sName_ValidatorTrim = "";
                }
            }



            //
            // バリデーターの選択
            switch (sName_ValidatorTrim)
            {
            case NamesFnc.S_VLD_SPACES:
            {
                // SToE:
                Expressionv_SpacesTextValidator_Old nValidator = new Expressionv_SpacesTextValidator_Old(enumResult);

                ucontrol.AddValidator(
                    nValidator,
                    log_Reports
                    );
            }
            break;

            case NamesFnc.S_VLD_MATCH:
            {
                string sValue_Parameter;
                cur_Cf.Dictionary_Attribute.TryGetValue(PmNames.S_EXPECTED, out sValue_Parameter, false, log_Reports);
                err_SParameterValue = sValue_Parameter;

                // SToE:
                Expressionv_MatchTextValidator_Old ecv_Validator = new Expressionv_MatchTextValidator_Old(sValue_Parameter);

                ucontrol.AddValidator(
                    ecv_Validator,
                    log_Reports
                    );
            }
            break;

            case NamesFnc.S_VLD_INT_RANGE:
            {
                bool bSuccessful = true;
                int  nBeginValue = 0;
                if (bSuccessful)
                {
                    string sBegin;
                    cur_Cf.Dictionary_Attribute.TryGetValue(PmNames.S_BEGIN, out sBegin, false, log_Reports);

                    if (!int.TryParse(sBegin, out nBeginValue))
                    {
                        // エラー。
                        err_Excp   = null;
                        err_SValue = sBegin;
                        goto gt_Error_InvalidatedBegin02;
                    }
                }

                int nEndValue = 0;
                if (bSuccessful)
                {
                    string sEnd;
                    cur_Cf.Dictionary_Attribute.TryGetValue(PmNames.S_END, out sEnd, false, log_Reports);

                    if (!int.TryParse(sEnd, out nEndValue))
                    {
                        // エラー。
                        err_Excp   = null;
                        err_SValue = sEnd;
                        goto gt_Error_InvalidatedEnd02;
                    }
                }

                if (bSuccessful)
                {
                    // SToE:
                    Expressionv_IntRangeTextValidator_Old nValidator = new Expressionv_IntRangeTextValidator_Old(nBeginValue, nEndValue);

                    ucontrol.AddValidator(
                        nValidator,
                        log_Reports
                        );
                }
            }
            break;

            case NamesFnc.S_VLD_ALL:
            {
                // SToE:
                Expressionv_AllTextValidator_Old ecv_Validator = new Expressionv_AllTextValidator_Old(enumResult);

                ucontrol.AddValidator(
                    ecv_Validator,
                    log_Reports
                    );
            }
            break;

            default:
                //
                // エラー。
                err_SName_Validator = sName;
                goto gt_Error_UndefinedValidator03;
            }//switch

            goto gt_EndMethod;
            //
            //
            #region 異常系
            //────────────────────────────────────────
gt_Error_UndefinedValidator02:
            // TODO 未定義のバリデーターの場合。
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, PmNames.S_VALUE_RESULT.Name_Pm, log_Reports); //引数名
                tmpl.SetParameter(2, err_SParameterValue, log_Reports);            //バリデーター名

                ucontrol.ControlCommon.Owner_MemoryApplication.CreateErrorReport("Er:7012;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
gt_Error_InvalidatedBegin02:
            // 設定エラー
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, PmNames.S_BEGIN.Name_Pm, log_Reports);                          //属性名
                tmpl.SetParameter(2, err_SValue, log_Reports);                                       //属性値
                tmpl.SetParameter(3, Log_RecordReportsImpl.ToText_Exception(err_Excp), log_Reports); //例外メッセージ

                ucontrol.ControlCommon.Owner_MemoryApplication.CreateErrorReport("Er:7013;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
gt_Error_InvalidatedEnd02:
            // 設定エラー
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, PmNames.S_END.Name_Pm, log_Reports);                            //属性名
                tmpl.SetParameter(2, err_SValue, log_Reports);                                       //属性値
                tmpl.SetParameter(3, Log_RecordReportsImpl.ToText_Exception(err_Excp), log_Reports); //例外メッセージ

                ucontrol.ControlCommon.Owner_MemoryApplication.CreateErrorReport("Er:7014;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
gt_Error_UndefinedValidator03:
            // TODO 未定義のバリデーターの場合。
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, err_SName_Validator, log_Reports);//バリデーター名

                ucontrol.ControlCommon.Owner_MemoryApplication.CreateErrorReport("Er:7015;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
gt_EndMethod:
            if (Log_ReportsImpl.BDebugmode_Static)
            {
                pg_ParsingLog.Decrement(cur_Cf.Name);
            }
            log_Method.EndMethod(log_Reports);
        }
Esempio n. 15
0
        //────────────────────────────────────────

        /// <summary>
        /// 2010年11月22日追加。
        /// </summary>
        /// <returns></returns>
        public virtual Expression_Node_Function Translate(
            string sName_Action,
            Configurationtree_Node action_Conf,
            Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog,
            MemoryApplication owner_MemoryApplication,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

            log_Method.BeginMethod(Info_Functions.Name_Library, this, "Translate", log_Reports);

            if (log_Method.CanDebug(1))
            {
                pg_ParsingLog.Increment(action_Conf.Name);
            }

            //

            //
            //
            //
            // 自
            //
            //
            //
            Expression_Node_Function expr_Func;

            {
                Expression_Node_String parent_Expression_Null = null;

                expr_Func = Collection_Function.NewFunction2(
                    sName_Action,
                    parent_Expression_Null,
                    action_Conf,
                    owner_MemoryApplication,
                    log_Reports
                    );
            }

            this.Translate_Step1(
                this,
                action_Conf,
                expr_Func,
                owner_MemoryApplication,
                pg_ParsingLog,
                log_Reports
                );

            this.Translate_Step2(
                this,
                action_Conf,
                expr_Func,
                owner_MemoryApplication,
                pg_ParsingLog,
                log_Reports
                );


            //
            //
            //
            //

            if (Log_ReportsImpl.BDebugmode_Static)
            {
                pg_ParsingLog.Decrement(action_Conf.Name);
            }

            log_Method.EndMethod(log_Reports);

            return(expr_Func);
        }
Esempio n. 16
0
        //────────────────────────────────────────

        public void Translate(
            Configurationtree_Node cur_Conf,
            Expression_Node_String parent_Expr,
            MemoryApplication memoryApplication,
            Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

            log_Method.BeginMethod(Info_ConfigurationtreeToExpression.Name_Library, this, "SToE", log_Reports);

            if (log_Method.CanDebug(1))
            {
                pg_ParsingLog.Increment("(40)" + cur_Conf.Name);
            }

            //
            //
            //
            //


            //
            //
            //
            // 自
            //
            //
            //
            Expression_Node_String ec_Value = new Expression_Node_StringImpl(parent_Expr, cur_Conf);

            ec_Value.AppendTextNode(
                cur_Conf.Name,
                cur_Conf,
                log_Reports
                );


            //
            //
            //
            // 自
            //
            //
            //
            Expression_Node_StringImpl cur_Expr = new Expression_Node_StringImpl(parent_Expr, cur_Conf);


            //
            //
            //
            // 属性
            //
            //
            //
            {
                cur_Expr.SetAttribute(
                    PmNames.S_NAME.Name_Pm,
                    ec_Value,
                    log_Reports
                    );

                parent_Expr.SetAttribute(
                    NamesNode.S_RECORD_SET_LOAD_FROM,
                    ((Expression_Node_String)cur_Expr),
                    log_Reports
                    );
            }


            //
            //
            //
            // 子要素
            //
            //
            //
            {
                this.ParseChild_InConfigurationtreeToExpression(
                    cur_Conf,
                    cur_Expr,
                    memoryApplication,
                    pg_ParsingLog,
                    log_Reports
                    );
            }

            //
            //
            //
            //

            if (Log_ReportsImpl.BDebugmode_Static)
            {
                pg_ParsingLog.Decrement(cur_Conf.Name);
            }

            log_Method.EndMethod(log_Reports);
        }
Esempio n. 17
0
        //────────────────────────────────────────

        /// <summary>
        /// <arg1>
        /// </summary>
        /// <param name="oFStrNode"></param>
        /// <param name="nFAelem"></param>
        /// <param name="moOpyopyo"></param>
        /// <param name="log_Reports"></param>
        public override void Translate(
            Configurationtree_Node cur_Cf,    //「S■arg1」
            Expression_Node_String parent_Ec, //親「E■fnc」
            MemoryApplication memoryApplication,
            Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

            log_Method.BeginMethod(Info_ConfigurationtreeToExpression.Name_Library, this, "SToE", log_Reports);

            //
            // デバッグオープンの前に。
            //
            // 「S■arg1 name=”★”」属性
            //
            string sName_MyFnc;

            cur_Cf.Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sName_MyFnc, false, log_Reports);

            if (log_Method.CanDebug(1))
            {
                Dictionary <string, string> s_Dic = new Dictionary <string, string>();
                s_Dic.Add(PmNames.S_NAME.Name_Pm, sName_MyFnc);
                pg_ParsingLog.Increment("(6.arg1・3要素)" + cur_Cf.Name, s_Dic);
            }

            //
            //

            if (log_Method.CanDebug(2))
            {
                log_Method.WriteDebug_ToConsole("「S■arg1・3」要素 解析開始┌────────────────┐ 自arg1・3は、e_Parent=[" + parent_Ec.Cur_Configuration.Name + "]の”" + sName_MyFnc + "”属性になる。");
            }


            string parent_SName_Fnc;
            {
                // ヒット必須にするとエラーになる?
                parent_Ec.TrySelectAttribute(out parent_SName_Fnc, PmNames.S_NAME.Name_Pm, EnumHitcount.One_Or_Zero, log_Reports);
                if (!log_Reports.Successful)
                {
                    goto gt_EndMethod;
                }

                //if (0 < d_InMethod.NDebugLevel)
                //{
                //    if (NamesNode.S_FNC != e_Parent.Cur_Configurationtree.Name)
                //    {
                //        d_InMethod.WriteDebug_ToConsole(1, "fnc以外の親要素「E■[" + e_Parent.Cur_Configurationtree.Name + "]」");
                //    }
                //}
            }

            //
            //
            //
            // 自
            //
            //
            //
            Expression_Node_String cur_Ec = new Expression_Node_StringImpl(parent_Ec, cur_Cf);


            //
            //
            //
            // 属性
            //
            //
            //
            if (log_Reports.Successful)
            {
                // 元からあった。
                this.ParseAttr_InConfigurationtreeToExpression(
                    cur_Cf,
                    cur_Ec,
                    true, //name属性は必須。
                    true, //value属性は、子<f-str>にする。
                    log_Reports
                    );
            }


            //
            //
            //
            // 子
            //
            //
            //
            if (log_Reports.Successful)
            {
                this.ParseChild_InConfigurationtreeToExpression(
                    cur_Cf,
                    cur_Ec,
                    memoryApplication,
                    pg_ParsingLog,
                    log_Reports
                    );
            }



            //
            //
            //
            // 親へ連結 ※属性連結。
            //
            //
            //
            if (log_Reports.Successful)
            {
                parent_Ec.SetAttribute(sName_MyFnc, cur_Ec, log_Reports);
            }

            goto gt_EndMethod;
            //
            //
gt_EndMethod:
            if (Log_ReportsImpl.BDebugmode_Static)
            {
                pg_ParsingLog.Decrement(cur_Cf.Name);
            }

            if (log_Method.CanDebug(2))
            {
                log_Method.WriteDebug_ToConsole("「S■arg1・3」要素 解析終了└────────────────┘");
            }

            log_Method.EndMethod(log_Reports);
        }
Esempio n. 18
0
        //────────────────────────────────────────

        protected void Execute6_Sub(
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(1, Log_ReportsImpl.BDebugmode_Static);

            log_Method.BeginMethod(Info_Functions.Name_Library, this, "Execute6_Sub", log_Reports);

            string sName_Fnc;

            this.TrySelectAttribute(out sName_Fnc, PmNames.S_NAME.Name_Pm, EnumHitcount.One_Or_Zero, log_Reports);

            if (log_Reports.CanStopwatch)
            {
                log_Method.Log_Stopwatch.Message = "Nアクション[" + sName_Fnc + "]実行";
                log_Method.Log_Stopwatch.Begin();
            }


            //
            // 変数は、登録されている名前の変数は存在し、登録されていない名前の変数は(自動作成されたもの以外は)存在しない。
            //
            // 元となるテーブルを見ながら、変数オブジェクトの内容を調べていく。
            //
            //


            Configurationtree_Node cur_Cf = new Configurationtree_NodeImpl(log_Method.Fullname, null);


            // 変数ログを吐く。
            {
                StringBuilder sb = new StringBuilder();

                //1行目
                sb.Append(NamesFld.S_NO);             //NO
                sb.Append(",");
                sb.Append(NamesFld.S_ID);             //ID
                sb.Append(",");
                sb.Append(NamesFld.S_TREE);           //TREE
                sb.Append(",");
                sb.Append(NamesFld.S_EXPL);           //Expl
                sb.Append(",");
                sb.Append(NamesFld.S_FILE);           //FILE
                sb.Append(",");
                sb.Append(NamesFld.S_NAME);           //NAME
                sb.Append(",");
                sb.Append(NamesFld.S_TYPE);           //TYPE
                sb.Append(",");
                sb.Append(NamesFld.S_TEXT);           //TEXT
                sb.Append(",");
                sb.Append(NamesFld.S_FONT_SIZE_PT);   //FONT_SIZE_PT
                sb.Append(",");
                sb.Append(NamesFld.S_X_LT);           //X_LT
                sb.Append(",");
                sb.Append(NamesFld.S_Y_LT);           //Y_LT
                sb.Append(",");
                sb.Append(NamesFld.S_WIDTH);          //WIDTH
                sb.Append(",");
                sb.Append(NamesFld.S_HEIGHT);         //HEIGHT
                sb.Append(",");
                sb.Append(NamesFld.S_ENABLED);        //ENABLED
                sb.Append(",");
                sb.Append(NamesFld.S_VISIBLE);        //VISIBLE
                sb.Append(",");
                sb.Append(NamesFld.S_READ_ONLY);      //READ_ONLY
                sb.Append(",");
                sb.Append(NamesFld.S_WORD_WRAP);      //WORD_WRAP
                sb.Append(",");
                sb.Append(NamesFld.S_NEW_LINE);       //NEW_LINE
                sb.Append(",");
                sb.Append(NamesFld.S_SCROLL_BARS);    //SCROLL_BARS
                sb.Append(",");
                sb.Append(NamesFld.S_CHK_VALUE_TYPE); //CHK_VALUE_TYPE
                sb.Append(",");
                sb.Append(NamesFld.S_PIC_ZOOM);       //PIC_ZOOM
                sb.Append(",");
                sb.Append(NamesFld.S_TAB_INDEX);      //TAB_INDEX
                sb.Append(",");
                sb.Append(NamesFld.S_BACK_COLOR);     //BACK_COLOR
                sb.Append(",");
                //ここまで基本テーブル。
                sb.Append(NamesFld.S_ITEM_HEIGHT_PX);      //ITEM_HEIGHT_PX
                sb.Append(",");
                sb.Append(NamesFld.S_ITEM_DISPLAY_FORMAT); //ITEM_DISPLAY_FORMAT
                sb.Append(",");
                sb.Append(NamesFld.S_LIST_VALUE_FIELD);    //LIST_VALUE_FIELD
                sb.Append(",");
                sb.Append(NamesFld.S_END);
                sb.Append(Environment.NewLine);

                //2行目
                sb.Append(NamesTypedb.S_INT);    //NO
                sb.Append(",");
                sb.Append(NamesTypedb.S_INT);    //ID
                sb.Append(",");
                sb.Append(NamesTypedb.S_INT);    //TREE
                sb.Append(",");
                sb.Append(NamesTypedb.S_STRING); //Expl
                sb.Append(",");
                sb.Append(NamesTypedb.S_STRING); //FILE
                sb.Append(",");
                sb.Append(NamesTypedb.S_STRING); //NAME
                sb.Append(",");
                sb.Append(NamesTypedb.S_STRING); //TYPE
                sb.Append(",");
                sb.Append(NamesTypedb.S_STRING); //TEXT
                sb.Append(",");
                sb.Append(NamesTypedb.S_STRING); //FONT_SIZE_PT
                sb.Append(",");
                sb.Append(NamesTypedb.S_INT);    //X_LT
                sb.Append(",");
                sb.Append(NamesTypedb.S_INT);    //Y_LT
                sb.Append(",");
                sb.Append(NamesTypedb.S_INT);    //WIDTH
                sb.Append(",");
                sb.Append(NamesTypedb.S_INT);    //HEIGHT
                sb.Append(",");
                sb.Append(NamesTypedb.S_BOOL);   //ENABLED
                sb.Append(",");
                sb.Append(NamesTypedb.S_BOOL);   //VISIBLE
                sb.Append(",");
                sb.Append(NamesTypedb.S_BOOL);   //READ_ONLY
                sb.Append(",");
                sb.Append(NamesTypedb.S_BOOL);   //WORD_WRAP
                sb.Append(",");
                sb.Append(NamesTypedb.S_STRING); //NEW_LINE
                sb.Append(",");
                sb.Append(NamesTypedb.S_STRING); //SCROLL_BARS
                sb.Append(",");
                sb.Append(NamesTypedb.S_STRING); //CHK_VALUE_TYPE
                sb.Append(",");
                sb.Append(NamesTypedb.S_INT);    //PIC_ZOOM
                sb.Append(",");
                sb.Append(NamesTypedb.S_INT);    //TAB_INDEX
                sb.Append(",");
                sb.Append(NamesTypedb.S_STRING); //BACK_COLOR
                sb.Append(",");
                //ここまで基本テーブル。
                sb.Append(NamesTypedb.S_INT);    //ITEM_HEIGHT_PX
                sb.Append(",");
                sb.Append(NamesTypedb.S_STRING); //ITEM_DISPLAY_FORMAT
                sb.Append(",");
                sb.Append(NamesTypedb.S_STRING); //LIST_VALUE_FIELD
                sb.Append(",");
                sb.Append(NamesFld.S_END);
                sb.Append(Environment.NewLine);

                //3行目
                sb.Append("-1,");                                                     //NO
                sb.Append("使わない,");                                                   //ID
                sb.Append("ネスト関係,");                                                  //TREE
                sb.Append("解説,");                                                     //Expl
                sb.Append("コントロール設定ファイルパス,");                                         //FILE
                sb.Append("コントロール固有名,");                                              //NAME
                sb.Append("コントロールの型,");                                               //TYPE
                sb.Append("初期値,");                                                    //TEXT
                sb.Append("フォントサイズ(pt),");                                            //FONT_SIZE_PT
                sb.Append("左上角の座標X,");                                                //X_LT
                sb.Append("左上角の座標Y,");                                                //Y_LT
                sb.Append("横幅ピクセル,");                                                 //WIDTH
                sb.Append("縦幅ピクセル,");                                                 //HEIGHT
                sb.Append("活性化,");                                                    //ENABLED
                sb.Append("可視,");                                                     //VISIBLE
                sb.Append("テキストボックス等を読み取り専用にするなら真。,");                                //READ_ONLY
                sb.Append("テキストエリアで行を自動的に折り返すなら真。,");                                 //WORD_WRAP
                sb.Append("(テキストエリア)改行記号。,");                                         //NEW_LINE
                sb.Append("テキストエリア等で利用。None,Horizontal,Vertical,Bothの4つ。使わないなら空欄。,"); //SCROLL_BARS
                sb.Append("チェックボックスの値の型。(空欄:false,true。ZERO_ONE:0,1),");              //CHK_VALUE_TYPE
                sb.Append("(未実装)画像の倍角サイズ。2000で2倍。,");                                 //PIC_ZOOM
                sb.Append("タブ・インデックス,");                                              //TAB_INDEX
                sb.Append("背景色,");                                                    //BACK_COLOR
                //ここまで基本テーブル。
                sb.Append("リストボックスの項目の高さ(ピクセル),");                                    //ITEM_HEIGHT_PX
                sb.Append("リストボックスの各項目の表示書式,");                                       //ITEM_DISPLAY_FORMAT
                sb.Append("(開発中)リストボックスの値が入っている、レコードのフィールド名。,");                      //LIST_VALUE_FIELD
                sb.Append(NamesFld.S_END);
                sb.Append(Environment.NewLine);

                int nAuto = 0;
                this.Owner_MemoryApplication.MemoryForms.ForEach_Children(delegate(string sKey, Usercontrol uct_Child, ref bool bRemove, ref bool bBreak)
                {
                    //uct_Child.ControlCommon.Configurationtree_Control.Dictionary_Attribute.



                    sb.Append(nAuto);//NO
                    sb.Append(",");
                    //ID は使わない。
                    sb.Append(",");
                    sb.Append(NamesFld.S_TREE);                                        //TREE
                    sb.Append(",");
                    sb.Append(NamesFld.S_EXPL);                                        //Expl
                    sb.Append(",");
                    sb.Append(NamesFld.S_FILE);                                        //FILE
                    sb.Append(",");
                    sb.Append(uct_Child.ControlCommon.Configurationtree_Control.Name); //NAME
                    sb.Append(",");
                    sb.Append(NamesFld.S_TYPE);                                        //TYPE
                    sb.Append(",");
                    sb.Append(uct_Child.UsercontrolText);                              //TEXT
                    sb.Append(",");
                    sb.Append(uct_Child.UsercontrolFontsizept);                        //FONT_SIZE_PT
                    sb.Append(",");
                    sb.Append(uct_Child.UsercontrolXlt);                               //X_LT
                    sb.Append(",");
                    sb.Append(uct_Child.UsercontrolYlt);                               //Y_LT
                    sb.Append(",");
                    sb.Append(uct_Child.UsercontrolWidth);                             //WIDTH
                    sb.Append(",");
                    sb.Append(uct_Child.UsercontrolHeight);                            //HEIGHT
                    sb.Append(",");
                    if (uct_Child.UsercontrolEnabled)
                    {
                        sb.Append(uct_Child.UsercontrolEnabled);//ENABLED
                    }
                    sb.Append(",");
                    if (uct_Child.UsercontrolVisible)
                    {
                        sb.Append(uct_Child.UsercontrolVisible);//VISIBLE
                    }
                    sb.Append(",");
                    if (uct_Child.UsercontrolReadonly)
                    {
                        sb.Append(uct_Child.UsercontrolReadonly);//READ_ONLY
                    }
                    sb.Append(",");
                    if (uct_Child.UsercontrolWordwrap)
                    {
                        sb.Append(uct_Child.UsercontrolWordwrap);//WORD_WRAP
                    }
                    sb.Append(",");
                    sb.Append(uct_Child.UsercontrolNewline);//NEW_LINE
                    sb.Append(",");
                    switch (uct_Child.UsercontrolScrollbars)
                    {
                    case ScrollBars.Both:
                        sb.Append(ValuesAttr.S_BOTH);
                        break;

                    case ScrollBars.Horizontal:
                        sb.Append(ValuesAttr.S_HORIZONTAL);
                        break;

                    case ScrollBars.Vertical:
                        sb.Append(ValuesAttr.S_VERTICAL);
                        break;

                    default:
                        //TODO:「無視」と、「無し」は、分けたい。
                        //sb.Append(ValuesAttr.S_NONE);
                        break;
                    }
                    sb.Append(",");
                    sb.Append(uct_Child.UsercontrolChkvaluetype); //CHK_VALUE_TYPE
                    sb.Append(",");
                    sb.Append(uct_Child.UsercontrolPiczoom);      //PIC_ZOOM
                    sb.Append(",");
                    sb.Append(uct_Child.UsercontrolTabindex);     //TAB_INDEX
                    sb.Append(",");
                    sb.Append(uct_Child.UsercontrolBackcolor);    //BACK_COLOR
                    sb.Append(",");
                    //ここまで基本テーブル。
                    sb.Append(uct_Child.UsercontrolItemheightpx);            //ITEM_HEIGHT_PX
                    sb.Append(",");
                    sb.Append(uct_Child.UsercontrolItemdisplayformat);       //ITEM_DISPLAY_FORMAT
                    sb.Append(",");
                    sb.Append(uct_Child.UsercontrolListvaluefield /*"NO"*/); //TODO:LIST_VALUE_FIELD
                    sb.Append(",");
                    sb.Append(NamesFld.S_END);
                    sb.Append(Environment.NewLine);

                    nAuto++;
                });


                if (log_Method.CanDebug(1))
                {
                    log_Method.WriteDebug_ToConsole(sb.ToString());
                }

                //ログ出力
                {
                    Expression_Node_Filepath ec_Fpath_Logs = this.Owner_MemoryApplication.MemoryVariables.GetExpressionfilepathByVariablename(new Expression_Leaf_StringImpl(NamesVar.S_SP_LOGS, null, cur_Cf), true, log_Reports);

                    string sFpatha_LogVariables = ec_Fpath_Logs.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports) + System.IO.Path.DirectorySeparatorChar + NamesFile.S_LOG_FORM;

                    if (log_Reports.Successful)
                    {
                        CsvWriterImpl writer = new CsvWriterImpl();
                        writer.Write(
                            sb.ToString(),
                            sFpatha_LogVariables,
                            true
                            );
                    }
                }
            }



            //変数CSVを吐き出したい。(登録されている順序を保って)
            {
                // 変数ファイルの読取り
                Table_Humaninput o_Table_Variables;
                this.Owner_MemoryApplication.MemoryVariables.TryGetTable_Variables(
                    out o_Table_Variables,
                    Application.StartupPath,
                    log_Reports
                    );

                if (null != o_Table_Variables)
                {
                    StringBuilder sb = new StringBuilder();

                    //1行目
                    sb.Append(NamesFld.S_NO);   //NO
                    sb.Append(",");
                    sb.Append(NamesFld.S_ID);   //ID
                    sb.Append(",");
                    sb.Append(NamesFld.S_TREE); //TREE
                    sb.Append(",");
                    sb.Append(NamesFld.S_EXPL); //Expl
                    sb.Append(",");
                    sb.Append(NamesFld.S_NAME);
                    sb.Append(",");
                    sb.Append(NamesFld.S_FOLDER);
                    sb.Append(",");
                    sb.Append(NamesFld.S_VALUE);
                    sb.Append(",");
                    sb.Append(NamesFld.S_END);
                    sb.Append(Environment.NewLine);

                    //2行目
                    sb.Append(NamesTypedb.S_INT);    //NO
                    sb.Append(",");
                    sb.Append(NamesTypedb.S_INT);    //ID
                    sb.Append(",");
                    sb.Append(NamesTypedb.S_STRING); //Expl
                    sb.Append(",");
                    sb.Append(NamesTypedb.S_STRING); //NAME
                    sb.Append(",");
                    sb.Append(NamesTypedb.S_STRING); //FOLDER
                    sb.Append(",");
                    sb.Append(NamesTypedb.S_STRING); //VALUE
                    sb.Append(",");
                    sb.Append(NamesFld.S_END);       //END
                    sb.Append(Environment.NewLine);

                    //3行目
                    sb.Append("-1,");                      //NO
                    sb.Append("使わない,");                    //ID
                    sb.Append("解説,");                      //Expl
                    sb.Append("変数名,");                     //NAME
                    sb.Append("(ファイルパス変数のみ指定有効)フォルダーパス,"); //FOLDER
                    sb.Append("初期値,");                     //VALUE
                    sb.Append(NamesFld.S_END);             //END
                    sb.Append(Environment.NewLine);


                    int nAuto = 0;
                    foreach (DataRow row in o_Table_Variables.DataTable.Rows)
                    {
                        if (o_Table_Variables.DataTable.Columns.Contains(NamesFld.S_NO))
                        {
                            int nValue;
                            Int_HumaninputImpl.TryParse(row[NamesFld.S_NO], out nValue, EnumOperationIfErrorvalue.Spaces_To_Alt_Value, 0, log_Reports);
                            sb.Append(nValue);
                            sb.Append(",");
                        }

                        // IDは空欄が正しいが、int型なので空欄にできないので 0 を入れる。
                        if (o_Table_Variables.DataTable.Columns.Contains(NamesFld.S_ID))
                        {
                            int nValue;
                            Int_HumaninputImpl.TryParse(row[NamesFld.S_ID], out nValue, EnumOperationIfErrorvalue.Spaces_To_Alt_Value, 0, log_Reports);
                            sb.Append(nValue);
                            sb.Append(",");
                        }

                        if (o_Table_Variables.DataTable.Columns.Contains(NamesFld.S_EXPL))
                        {
                            string sValue;
                            String_HumaninputImpl.TryParse(row[NamesFld.S_EXPL], out sValue, "", "", log_Method, log_Reports);
                            sb.Append(sValue);
                            sb.Append(",");
                        }

                        string sName_Var = "";
                        if (o_Table_Variables.DataTable.Columns.Contains(NamesFld.S_NAME))
                        {
                            string sValue;
                            String_HumaninputImpl.TryParse(row[NamesFld.S_NAME], out sValue, "", "", log_Method, log_Reports);
                            sb.Append(sValue);
                            sb.Append(",");

                            sName_Var = sValue;
                        }

                        // 現在の変数の内容
                        string sValue_Var = this.Owner_MemoryApplication.MemoryVariables.GetStringByVariablename(new Expression_Leaf_StringImpl(sName_Var, null, cur_Cf), true, log_Reports);

                        //現在の変数の内容を検索
                        if (NamesVar.Test_Filepath(sName_Var))
                        {
                            Expression_Node_Filepath ec_Fpath = this.Owner_MemoryApplication.MemoryVariables.GetExpressionfilepathByVariablename(new Expression_Leaf_StringImpl(sName_Var, null, cur_Cf), true, log_Reports);
                            // 絶対パスとは限らない。フォルダーを指していることもある。
                            string sFpath = ec_Fpath.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports);

                            //フォルダー列値を取得。
                            string sNamevar_Folder_Src;
                            if (o_Table_Variables.DataTable.Columns.Contains(NamesFld.S_FOLDER))
                            {
                                String_HumaninputImpl.TryParse(row[NamesFld.S_FOLDER], out sNamevar_Folder_Src, "", "", log_Method, log_Reports);

                                //フォルダーパス
                                Expression_Node_Filepath ec_Folder = this.Owner_MemoryApplication.MemoryVariables.GetExpressionfilepathByVariablename(new Expression_Leaf_StringImpl(sNamevar_Folder_Src, null, cur_Cf), false, log_Reports);
                                if (null != ec_Folder)
                                {
                                    // FOLDER列に入力があれば。

                                    string sFpath_Folder = ec_Folder.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports);
                                    if (sValue_Var.StartsWith(sFpath_Folder))
                                    {
                                        // FOLDER列値をそのままキープ。
                                        sb.Append(sNamevar_Folder_Src);

                                        // 値のフォルダー部分を削る。
                                        sValue_Var = sValue_Var.Substring(sFpath_Folder.Length);

                                        // 先頭が ディレクトリー区切り文字なら削る。
                                        if (sValue_Var.StartsWith(System.IO.Path.DirectorySeparatorChar.ToString()))
                                        {
                                            sValue_Var = sValue_Var.Substring(System.IO.Path.DirectorySeparatorChar.ToString().Length);
                                        }
                                    }
                                    else
                                    {
                                        // FOLDER列値はそのまま使えない。
                                    }
                                }

                                sb.Append(",");
                            }

                            if (o_Table_Variables.DataTable.Columns.Contains(NamesFld.S_VALUE))
                            {
                                //string sValue;
                                //String_HumaninputImpl.TryParse(row[NamesFld.S_VALUE], out sValue, "", "", log_Method, log_Reports);
                                //sb.Append(sValue);
                                //sb.Append(",");

                                // 現在の変数の値(の削った残り)を入れる。
                                sb.Append(sValue_Var);
                                sb.Append(",");
                            }
                        }
                        else// if (NamesVar.Test_String(sName_Var))
                        {
                            // FOLDER列値は無し。
                            sb.Append(",");

                            if (o_Table_Variables.DataTable.Columns.Contains(NamesFld.S_VALUE))
                            {
                                // 現在の変数の値を入れる。
                                sb.Append(sValue_Var);
                                sb.Append(",");
                            }
                        }

                        sb.Append(NamesFld.S_END);
                        sb.Append(Environment.NewLine);

                        nAuto++;
                    }

                    //ファイル書出し
                    {
                        Expression_Node_Filepath ec_Fpath_Logs = this.Owner_MemoryApplication.MemoryVariables.GetExpressionfilepathByVariablename(new Expression_Leaf_StringImpl(NamesVar.S_SP_LOGS, null, cur_Cf), true, log_Reports);

                        string sFpatha_LogVariables = ec_Fpath_Logs.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports) + System.IO.Path.DirectorySeparatorChar + NamesFile.S_SAVE_FORM;

                        if (log_Reports.Successful)
                        {
                            CsvWriterImpl writer = new CsvWriterImpl();
                            writer.Write(
                                sb.ToString(),
                                sFpatha_LogVariables,
                                true
                                );
                        }
                    }
                }
            }



            //
            // メッセージボックスの表示。
            {
                StringBuilder sb = new StringBuilder();
                sb.Append(this.GetType().Name);
                sb.Append("#Execute6_Sub:");
                sb.Append(Environment.NewLine);
                string sArgMessage;
                this.TrySelectAttribute(out sArgMessage, Expression_Node_Function46Impl.PM_MESSAGE, EnumHitcount.One_Or_Zero, log_Reports);

                sb.Append(sArgMessage);

                MessageBox.Show(sb.ToString(), "変数をCSVファイルに書き出したい。");
            }

            log_Method.EndMethod(log_Reports);
        }
Esempio n. 19
0
        //────────────────────────────────────────

        /// <summary>
        /// 「Aa_Files.csv」を読み取る要求を作成します。
        /// 旧名:ReadIndexRequest
        /// </summary>
        /// <param name="log_Reports"></param>
        /// <returns></returns>
        private Request_ReadsTable CreateReadRequest_AaFilesCsv(Log_Reports log_Reports)
        {
            Log_Method log_Method = new Log_MethodImpl(1, Log_ReportsImpl.BDebugmode_Static);

            log_Method.BeginMethod(Info_Functions.Name_Library, this, "CreateReadRequest_AaFilesCsv", log_Reports);

            if (log_Method.CanDebug(1))
            {
                log_Method.WriteDebug_ToConsole("「ファイルズ登録ファイル」を読取る要求を作成します。");
            }

            //
            // 「インデックス_テーブル」読取引数
            Request_ReadsTable forIndexTable_Request = new Request_ReadsTableImpl();

            string sTableName = this.GetSNameTableAafilescsv();

            //
            // 付けるテーブル名。
            forIndexTable_Request.Name_PutToTable = sTableName;

            //
            // 「レイアウト・テーブル」に設定。
            {
                forIndexTable_Request.Typedata = ValuesTypeData.S_TABLES_FILE;
            }

            // Aa_Files.csvテーブルのファイルパス。
            {
                // 変数名。
                Expression_Node_Filepath ec_Fpath_Aafilescsv;
                log_Reports.Log_Callstack.Push(log_Method, "⑦");
                ec_Fpath_Aafilescsv = this.Owner_MemoryApplication.MemoryVariables.GetExpressionfilepathByVariablename(
                    new Expression_Leaf_StringImpl(NamesVar.S_SP_FILES, null, new Configurationtree_NodeImpl(log_Method.Fullname, null)),
                    true, log_Reports);
                log_Reports.Log_Callstack.Pop(log_Method, "⑦");

                forIndexTable_Request.Expression_Filepath = ec_Fpath_Aafilescsv;

                //this.TrySelectAttribute(out ec_Atom, Ec_Sf22Impl.S_PM_NAME_VAR_FILEPATH, false, EnumHitcount.Unconstraint, log_Reports);
                //if (log_Reports.Successful)
                //{
                //    // ファイルパス。
                //    log_Reports.Log_Callstack.Push(log_Method, "②");
                //    forIndexTable_Request.Expression_Node_Filepath = this.Owner_MemoryApplication.MemoryVariables.GetExpressionfilepathByVariablename(
                //        ec_Fpath_Aafilescsv,
                //        true,
                //        log_Reports
                //        );
                //    log_Reports.Log_Callstack.Pop(log_Method, "②");
                //}
            }

            //
            // 日別バックアップ。
            forIndexTable_Request.IsDatebackupActivated = false;

            goto gt_EndMethod;
            //
gt_EndMethod:
            log_Method.EndMethod(log_Reports);
            return(forIndexTable_Request);
        }
Esempio n. 20
0
        //────────────────────────────────────────

        /// <summary>
        /// <f-str>
        /// </summary>
        /// <param name="oFStrNode"></param>
        /// <param name="nFAelem"></param>
        /// <param name="moOpyopyo"></param>
        /// <param name="log_Reports"></param>
        public override void Translate(
            Configurationtree_Node cur_Cf,    //<f-str>
            Expression_Node_String parent_Ec, //親<●●>。
            MemoryApplication memoryApplication,
            Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

            log_Method.BeginMethod(Info_ConfigurationtreeToExpression.Name_Library, this, "SToE", log_Reports);

            if (log_Method.CanDebug(1))
            {
                pg_ParsingLog.Increment("(30)" + cur_Cf.Name);
            }

            //
            //
            //
            //

            if (null == parent_Ec)
            {
                goto gt_Error_NullFAelem;
            }


            //
            //
            //
            // 自
            //
            //
            //
            Expression_Node_String ec_Cur = new Expression_Node_StringImpl(parent_Ec, cur_Cf);


            //
            //
            //
            // 属性
            //
            //
            //
            if (log_Reports.Successful)
            {
                this.ParseAttr_InConfigurationtreeToExpression(
                    cur_Cf,
                    ec_Cur,
                    false, //name属性は無い。
                    true,  //value属性を、子<f-str>にする場合、真。
                    log_Reports
                    );
            }


            //
            //
            //
            // 子
            //
            //
            //
            {
                this.ParseChild_InConfigurationtreeToExpression(
                    cur_Cf,
                    ec_Cur,
                    memoryApplication,
                    pg_ParsingLog,
                    log_Reports
                    );
            }


            //
            //
            //
            // 親へ連結 ※子連結が基本
            //
            //
            //
            {
                parent_Ec.List_Expression_Child.Add(ec_Cur, log_Reports);
            }

            goto gt_EndMethod;
            //
            //
            #region 異常系
            //────────────────────────────────────────
gt_Error_NullFAelem:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, Log_RecordReportsImpl.ToText_Configuration(cur_Cf), log_Reports);//設定位置パンくずリスト

                memoryApplication.CreateErrorReport("Er:7016;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
gt_EndMethod:
            if (Log_ReportsImpl.BDebugmode_Static)
            {
                pg_ParsingLog.Decrement(cur_Cf.Name);
            }
            log_Method.EndMethod(log_Reports);
        }
Esempio n. 21
0
        //────────────────────────────────────────

        public override void Translate(
            Configurationtree_Node cur_Cf,
            Expression_Node_String parent_Ec,
            MemoryApplication memoryApplication,
            Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog,
            Log_Reports log_Reports
            )
        {
            // throw new Exception(Info_SToE.LibraryName + ":" + this.GetType().Name + "#SToE: このメソッドは廃止方針です。");

            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

            log_Method.BeginMethod(Info_ConfigurationtreeToExpression.Name_Library, this, "SToE", log_Reports);

            if (log_Method.CanDebug(1))
            {
                pg_ParsingLog.Increment("(18)" + cur_Cf.Name);
            }

            //
            //
            //
            //


            //
            //
            //
            // 自
            //
            //
            //
            Expression_Node_String ec_Value;
            {
                ec_Value = new Expression_Node_StringImpl(parent_Ec, cur_Cf);
                ec_Value.AppendTextNode(
                    cur_Cf.Name,
                    cur_Cf,
                    log_Reports
                    );
            }



            //
            //
            //
            // 自
            //
            //
            //
            Expression_Node_StringImpl ec_Ap1p = new Expression_Node_StringImpl(parent_Ec, cur_Cf);

            ec_Ap1p.SetAttribute(
                PmNames.S_NAME.Name_Pm,
                ec_Value,
                log_Reports
                );

            StringBuilder sb = new StringBuilder();

            sb.Append("p");
            sb.Append(this.NP1p);
            sb.Append("p");



            //
            //
            //
            // 属性
            //
            //
            //
            parent_Ec.SetAttribute(
                sb.ToString(),
                ((Expression_Node_String)ec_Ap1p),
                log_Reports
                );


            //
            // 子要素
            //
            this.ParseChild_InConfigurationtreeToExpression(
                cur_Cf,
                ec_Ap1p,
                memoryApplication,
                pg_ParsingLog,
                log_Reports
                );

            goto gt_EndMethod;
            //
            //
            //
            //
gt_EndMethod:
            if (Log_ReportsImpl.BDebugmode_Static)
            {
                pg_ParsingLog.Decrement(cur_Cf.Name);
            }
            log_Method.EndMethod(log_Reports);
        }
Esempio n. 22
0
        /// <summary>
        /// (8)「エディター設定ファイル」に記述されている<f-set-var>要素を、「エディター設定ファイル・モデル」に格納。Cf→M
        /// </summary>
        /// <param name="st_PrevProject_OrNull"></param>
        /// <param name="log_Reports"></param>
        private void On_P08_SpToVar_(
            out MemoryAaeditorxml_Editor out_moAaeditorxml_Editor,
            Expression_Node_Filepath ec_Fpath_AaEditorXml,
            Expression_Node_Filepath ec_Fopath_Editor,
            MemoryAatoolxml_Editor moAatoolxml_SelectedEditor,
            Log_Reports log_Reports)
        {
            Log_Method log_Method = new Log_MethodImpl(0);

            log_Method.BeginMethod(Info_Functions.Name_Library, this, "On_P08_SpToVar_", log_Reports);


            //
            //
            //
            //(13c)『Aa_Editor.xml』ロード
            //
            //
            //
            if (log_Method.CanDebug(1))
            {
                log_Method.WriteDebug_ToConsole("(13c)『Aa_Editor.xml』ロード");
            }


            MemoryAaeditorxml moAaeditorxml = new MemoryAaeditorxmlImpl(this.Owner_MemoryApplication);

            //moAaeditorxml.Clear1(log_Reports);

            if (log_Reports.Successful)
            {
                moAaeditorxml.Load_AutoSystemVariable(
                    ec_Fopath_Editor,
                    log_Reports
                    );
            }

            //
            out_moAaeditorxml_Editor = new MemoryAaeditorxml_EditorImpl(ec_Fpath_AaEditorXml.Cur_Configuration);
            if (log_Reports.Successful)
            {
                out_moAaeditorxml_Editor.LoadFile_Aaxml(
                    ec_Fpath_AaEditorXml,
                    this.Owner_MemoryApplication.MemoryVariables,
                    log_Reports
                    );
            }


            if (log_Reports.Successful)
            {
                moAaeditorxml.LoadFile(
                    ec_Fopath_Editor,
                    log_Reports
                    );
            }


            goto gt_EndMethod;
            //
            //
gt_EndMethod:
            log_Method.EndMethod(log_Reports);
        }
Esempio n. 23
0
        //────────────────────────────────────────

        protected void Execute6_Sub(
            object sender,
            Log_Reports log_Reports
            )
        {
            //
            //
            //
            //()メソッド開始
            //
            //
            //
            Log_Method log_Method = new Log_MethodImpl(1, Log_ReportsImpl.BDebugmode_Static);

            log_Method.BeginMethod(Info_Functions.Name_Library, this, "Execute6_Sub", log_Reports);

            //
            //
            //
            //
            //
            //
            //
            if (log_Method.CanDebug(1))
            {
                log_Method.WriteDebug_ToConsole("関数30「新規ウィンドウを開く」を実行します。");
            }


            string sName_Fnc;

            this.TrySelectAttribute(out sName_Fnc, PmNames.S_NAME.Name_Pm, EnumHitcount.One_Or_Zero, log_Reports);

            if (log_Reports.CanStopwatch)
            {
                log_Method.Log_Stopwatch.Message = "Nアクション[" + sName_Fnc + "]実行";
                log_Method.Log_Stopwatch.Begin();
            }


            //
            //
            //
            //()タスク・デスクリプション
            //
            //
            //
            {
                if (sender is Customcontrol)
                {
                    Customcontrol cct = (Customcontrol)sender;

                    string sName_Control;
                    if (null == cct.ControlCommon.Expression_Name_Control)
                    {
                        sName_Control = "<エラー:名無し>";
                    }
                    else
                    {
                        sName_Control = cct.ControlCommon.Expression_Name_Control.Execute4_OnExpressionString(
                            EnumHitcount.Unconstraint,
                            log_Reports
                            );
                    }

                    log_Reports.Comment_EventCreationMe = "/追記:[" + sName_Control + "]コントロールが、[" + sName_Fnc + "]アクションを実行。";
                }
                else
                {
                    log_Reports.Comment_EventCreationMe = "/追記:[" + sName_Fnc + "]アクションを実行。";
                }
            }


            // ┳━┳━┳━┳━┳━┳━┳━┳━┳━┳━┳━┳━┳━┳━┳━
            // ┻━┻━┻━┻━┻━┻━┻━┻━┻━┻━┻━┻━┻━┻━┻━
            // 開始
            // ┳━┳━┳━┳━┳━┳━┳━┳━┳━┳━┳━┳━┳━┳━┳━
            // ┻━┻━┻━┻━┻━┻━┻━┻━┻━┻━┻━┻━┻━┻━┻━

            Configurationtree_NodeImpl cf_ThisMethod = new Configurationtree_NodeImpl("!ハードコーディング_NAction30#Execute6_Sub", null);

            if (log_Reports.Successful)
            {
                // 正常時

                Expression_Node_String ec_ArgFormgroup;
                this.TrySelectAttribute(out ec_ArgFormgroup, Expression_Node_Function30Impl.PM_NAME_FORM, EnumHitcount.One_Or_Zero, log_Reports);

                if (null == ec_ArgFormgroup)
                {
                    //
                    // エラー
                    goto gt_Error_NoForm;
                }
            }



            //
            //
            //
            //(3)レイアウト_テーブル読取
            //
            //
            //
            List <Table_Humaninput> oList_Table_Form;//(フォームのセットアップに使う)

            //
            // 「フォーム名(レイアウト_ターゲット名)」を指定。
            if (log_Reports.Successful)
            {
                // 正常時

                // テーブル名から、レイアウト・ファイルパスの取得。
                Expression_Node_String ec_ArgFormgroup;
                this.TrySelectAttribute(out ec_ArgFormgroup, Expression_Node_Function30Impl.PM_NAME_FORM, EnumHitcount.One_Or_Zero, log_Reports);

                oList_Table_Form = this.Owner_MemoryApplication.MemoryTables.GetTable_HumaninputByFormgroup(ec_ArgFormgroup, true, log_Reports);
            }
            else
            {
                oList_Table_Form = new List <Table_Humaninput>();
            }


            //
            //
            //
            //(4)formsフォルダーパス取得
            //
            //
            //
            Expression_Node_Filepath ec_Fopath_Forms;

            if (log_Reports.Successful)
            {
                // 正常時

                XenonName o_Name_Variable = new XenonNameImpl(NamesVar.S_SP_FORMS, this.Cur_Configuration);

                // 変数名。
                Expression_Leaf_StringImpl ec_Atom = new Expression_Leaf_StringImpl(this, o_Name_Variable.Cur_Configuration);
                ec_Atom.SetString(o_Name_Variable.SValue, log_Reports);

                // ファイルパス。
                log_Reports.Log_Callstack.Push(log_Method, "⑤");
                ec_Fopath_Forms = this.Owner_MemoryApplication.MemoryVariables.GetExpressionfilepathByVariablename(ec_Atom, true, log_Reports);
                log_Reports.Log_Callstack.Pop(log_Method, "⑤");
            }
            else
            {
                ec_Fopath_Forms = null;
            }


            //
            //
            //
            //(5)フォームをセットアップ。
            //
            //
            //
            if (log_Reports.Successful)
            {
                // 正常時

                this.Owner_MemoryApplication.MemoryForms.SetupFormAndLoadUsercontrolconfigs(
                    oList_Table_Form,
                    ec_Fopath_Forms,
                    this.Owner_MemoryApplication.MemoryForms.Mainwnd_FormWrapping.Form,
                    log_Reports
                    );
            }


            //
            //
            //
            //(6)『トゥゲザー設定ファイル』読取。
            //
            //
            //
            if (log_Reports.Successful)
            {
                // タイプデータ値「ScriptTogethers」。
                Expression_Leaf_StringImpl ec_NameVariable = new Expression_Leaf_StringImpl(this, cf_ThisMethod);
                ec_NameVariable.SetString(ValuesTypeData.S_CODE_TOGETHERS, log_Reports);

                List <MemoryCodefileinfo> listInfo = null;
                if (log_Reports.Successful)
                {
                    listInfo = this.Owner_MemoryApplication.MemoryCodefiles.GetCodefileinfoByTypedata(ec_NameVariable, true, log_Reports);
                }

                if (log_Reports.Successful)
                {
                    foreach (MemoryCodefileinfo scriptfile in listInfo)
                    {
                        if (log_Reports.Successful)
                        {
                            this.Owner_MemoryApplication.MemoryTogethers.LoadFile(scriptfile.Expression_Filepath, log_Reports);
                        }
                        else
                        {
                            break;
                        }
                    }
                }
            }


            //
            //
            //
            //(7)「プロジェクトが選択(切替)されたとき」
            //
            //
            //
            if (null != this.In_Subroutine_Function30_2)
            {
                this.In_Subroutine_Function30_2.Perform(
                    oList_Table_Form,
                    ec_Fopath_Forms,
                    this.Cur_Configuration,
                    this.Owner_MemoryApplication.MemoryForms.Mainwnd_FormWrapping.Form,
                    sender,
                    log_Reports
                    );
            }


            //
            //
            //
            //(8)独自実装のコントロールのプロパティー編集。主に、フォームの活性化をしているだけ。
            //
            //
            //
            if (null != this.In_Subroutine_Function30_1)
            {
                this.In_Subroutine_Function30_1.Perform(this.Owner_MemoryApplication, log_Reports);
            }

            // (X5)コントロールに、妥当性判定を設定します。
            if (log_Reports.Successful)
            {
                // タイプデータ値。
                Expression_Leaf_StringImpl ec_Name_Variable = new Expression_Leaf_StringImpl(this, cf_ThisMethod);
                ec_Name_Variable.SetString(ValuesTypeData.S_CODE_VALIDATORS, log_Reports);

                List <MemoryCodefileinfo> list_Info = null;
                if (log_Reports.Successful)
                {
                    list_Info = this.Owner_MemoryApplication.MemoryCodefiles.GetCodefileinfoByTypedata(ec_Name_Variable, true, log_Reports);
                }

                if (log_Reports.Successful)
                {
                    foreach (MemoryCodefileinfo moScriptfile in list_Info)
                    {
                        if (log_Reports.Successful)
                        {
                            this.Owner_MemoryApplication.MemoryValidators.LoadFile(
                                moScriptfile.Expression_Filepath.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports),
                                log_Reports);
                        }
                        else
                        {
                            break;
                        }
                    }
                }
            }


            //
            //
            //
            //(9)「レイアウトテーブル」に書かれているコントロール名だけの一覧を作成。
            //
            //
            //
            List <string> sList_Name_Control = new List <string>();

            foreach (Table_Humaninput tableH_Form in oList_Table_Form)
            {
                if (tableH_Form.DataTable.Columns.Contains(NamesFld.S_NAME))
                {
                    // 「NAME」フィールドのあるテーブルが本表。無いのは参照表。

                    foreach (DataRow row in tableH_Form.DataTable.Rows)
                    {
                        string name_Control = ((Value_Humaninput)row[NamesFld.S_NAME]).Text;
                        sList_Name_Control.Add(name_Control.Trim());
                    }
                }
            }


            //
            //
            //
            //(10)指定レイアウト内の全てのコントロールの、"Se:読取時;" イベントを実行します。
            //
            //
            //
            if (log_Reports.Successful)
            {
                Executer1_UsercontrolAndEvent exe1 = new Executer1_UsercontrolAndEventImpl();
                exe1.Execute1_AllUsercontrols(
                    sList_Name_Control,
                    sender,
                    new XenonNameImpl(NamesSe.S_LOAD, cf_ThisMethod),
                    this.Owner_MemoryApplication,
                    log_Reports
                    );
            }

            //
            //
            //
            // ロード完了
            //
            //
            //

            goto gt_EndMethod;
            //
            //
            #region 異常系
            //────────────────────────────────────────
gt_Error_NoForm:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, Log_RecordReportsImpl.ToText_Configuration(cf_ThisMethod), log_Reports);//設定位置パンくずリスト

                this.Owner_MemoryApplication.CreateErrorReport("Er:110015;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
gt_EndMethod:
            log_Method.EndMethod(log_Reports);
        }
Esempio n. 24
0
        //────────────────────────────────────────

        public override void Translate(
            Configurationtree_Node cur_Cf,    //<lookup-id>
            Expression_Node_String parent_Ec, //< Sf:text-template;>
            MemoryApplication memoryApplication,
            Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

            log_Method.BeginMethod(Info_ConfigurationtreeToExpression.Name_Library, this, "SToE", log_Reports);

            if (log_Method.CanDebug(1))
            {
                pg_ParsingLog.Increment("(9)" + cur_Cf.Name);
            }

            //
            //

            //
            //
            //
            // 自
            //
            //
            //
            Expression_Node_String cur_Ec = new Expression_Node_StringImpl(parent_Ec, cur_Cf);


            //
            //
            //
            // 親へ連結 (value属性)
            //
            //
            //
            {
                //
                // 自要素の value="" 属性を、親へ連結
                //
                PmName pmName = PmNames.S_VALUE;

                string sValue;
                bool   bHit = cur_Cf.Dictionary_Attribute.TryGetValue(pmName, out sValue, false, log_Reports);
                if (bHit)
                {
                    cur_Ec.AppendTextNode(
                        sValue,
                        cur_Cf,
                        log_Reports
                        );

                    //
                    //
                    //
                    // 子
                    //
                    //
                    //
                    this.ParseChild_InConfigurationtreeToExpression(
                        cur_Cf,
                        cur_Ec,//自
                        memoryApplication,
                        pg_ParsingLog,
                        log_Reports
                        );

                    //
                    //
                    //
                    // 親へ連結 ※属性連結
                    //
                    //
                    //
                    parent_Ec.SetAttribute(PmNames.S_LOOKUP_ID.Name_Pm, cur_Ec, log_Reports);

                    goto gt_EndMethod;
                }
                else
                {
                }
            }


            //
            //
            //
            // 子
            //
            //
            //
            {
                //<a-default>の子要素を確認し、親<f-switch>のdefault属性に追加します。

                this.ParseChild_InConfigurationtreeToExpression(
                    cur_Cf,
                    cur_Ec,
                    memoryApplication,
                    pg_ParsingLog,
                    log_Reports
                    );
            }


            //
            //
            //
            // 親へ連結
            //
            //
            //
            parent_Ec.SetAttribute(PmNames.S_LOOKUP_ID.Name_Pm, cur_Ec, log_Reports);


            //
            //
            //
            // 親へ連結 debug
            //
            //
            //
            if (log_Method.CanDebug(1))
            {
                string parent_SName_Fnc;
                parent_Ec.TrySelectAttribute(out parent_SName_Fnc, PmNames.S_NAME.Name_Pm, EnumHitcount.One_Or_Zero, log_Reports);
                log_Method.WriteDebug_ToConsole(" ☆☆☆☆☆☆☆☆ 親<[" + parent_Ec.Cur_Configuration.Name + "] name=”[" + parent_SName_Fnc + "]” >");

                string sName_MyFnc;
                cur_Ec.TrySelectAttribute(out sName_MyFnc, PmNames.S_NAME.Name_Pm, EnumHitcount.One_Or_Zero, log_Reports);
                log_Method.WriteDebug_ToConsole(" ☆☆☆☆☆☆☆☆ 自<[" + cur_Ec.Cur_Configuration.Name + "] name=”[" + sName_MyFnc + "]” >");
            }


            goto gt_EndMethod;
            //
            //
gt_EndMethod:
            if (Log_ReportsImpl.BDebugmode_Static)
            {
                pg_ParsingLog.Decrement(cur_Cf.Name);
            }
            log_Method.EndMethod(log_Reports);
        }
Esempio n. 25
0
        //────────────────────────────────────────

        public void ParseChild_InConfigurationtreeToExpression(
            Configurationtree_Node cur_Conf,    //S_NodeList s_curNodeList,
            Expression_Node_String parent_Expr, //nAcase,nFelemの両方の場合がある。
            MemoryApplication memoryApplication,
            Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

            log_Method.BeginMethod(Info_ConfigurationtreeToExpression.Name_Library, this, "ParseChild_InSToE", log_Reports);
            //
            //

            if (null == parent_Expr)
            {
                goto gt_Error_NullNFAelem;
            }


            //
            // 親ノード名、親ファンク名
            //
            string parent_SName_Node = parent_Expr.Cur_Configuration.Name;
            string parent_SName_Fnc  = "";

            {
                EnumHitcount enumHitcount;
                if (NamesNode.S_FNC == parent_SName_Node)
                {
                    //todo: enumHitcount = EnumHitcount.One;
                    enumHitcount = EnumHitcount.One_Or_Zero;
                }
                else
                {
                    enumHitcount = EnumHitcount.One_Or_Zero;
                }



                log_Reports.Log_Callstack.Push(log_Method, "①");
                bool bHit = parent_Expr.TrySelectAttribute(out parent_SName_Fnc, PmNames.S_NAME.Name_Pm, enumHitcount, log_Reports);
                log_Reports.Log_Callstack.Pop(log_Method, "①");
            }

            if (log_Method.CanDebug(1))
            {
                log_Method.WriteDebug_ToConsole("開始┌──┐ s_Curノード名=[" + cur_Conf.Name + "] 子要素数=[" + cur_Conf.List_Child.Count + "]");
            }



            //
            //
            //
            // 子
            //
            //
            //
            Configurationtree_Node err_Configurationtree_Node2 = null;

            cur_Conf.List_Child.ForEach(delegate(Configurationtree_Node s_Child, ref bool bBreak)
            {
                if (!log_Reports.Successful)
                {
                    // 強制終了。
                    bBreak = true;
                    return;
                }


                string sName_MyNode = s_Child.Name;
                string sName_MyFnc  = "";
                {
                    bool bRequired;

                    if (NamesNode.S_ARG == sName_MyNode)
                    {
                        bRequired = true;
                    }
                    else
                    {
                        bRequired = false;
                    }

                    log_Reports.Log_Callstack.Push(log_Method, "②");
                    s_Child.Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sName_MyFnc, bRequired, log_Reports);
                    log_Reports.Log_Callstack.Pop(log_Method, "②");
                }



                if (this.Dictionary_ConfigurationtreeToExpression.ContainsKey(sName_MyNode))
                {
                    if (log_Method.CanDebug(1))
                    {
                        log_Method.WriteDebug_ToConsole("親「S■[" + parent_SName_Fnc + "] name=”[" + parent_SName_Fnc + "]”」 自「S■[" + sName_MyNode + "] name=”[" + sName_MyFnc + "]”」");
                    }


                    this.Dictionary_ConfigurationtreeToExpression[sName_MyNode].Translate(
                        s_Child,
                        parent_Expr,
                        memoryApplication,
                        pg_ParsingLog,
                        log_Reports
                        );
                }
                else
                {
                    //
                    // それ以外、エラー。
                    //
                    err_Configurationtree_Node2 = s_Child;
                    bBreak = true;
                }
            });
            //
            if (null != err_Configurationtree_Node2)
            {
                goto gt_Error_UndefinedElement;
            }

            goto gt_EndMethod;
            //
            //
            #region 異常系
            //────────────────────────────────────────
gt_Error_NullNFAelem:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, Log_RecordReportsImpl.ToText_Configuration(parent_Expr.Cur_Configuration), log_Reports);//設定位置パンくずリスト

                memoryApplication.CreateErrorReport("Er:7010;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
gt_Error_UndefinedElement:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, err_Configurationtree_Node2.Name, log_Reports);                               //設定ノード名
                tmpl.SetParameter(2, err_Configurationtree_Node2.GetType().Name, log_Reports);                     //設定ノードのクラス名
                tmpl.SetParameter(3, this.Dictionary_ConfigurationtreeToExpression.Count.ToString(), log_Reports); //キーの個数

                StringBuilder s1 = new StringBuilder();
                foreach (string sKey in this.Dictionary_ConfigurationtreeToExpression.Keys)
                {
                    s1.Append(sKey);
                    s1.Append(System.Environment.NewLine);
                }
                tmpl.SetParameter(4, s1.ToString(), log_Reports);//キーのリスト

                //設定親ノード名
                if (null != parent_Expr)
                {
                    tmpl.SetParameter(5, parent_Expr.Cur_Configuration.Name, log_Reports);
                }
                else
                {
                    tmpl.SetParameter(5, "ヌル", log_Reports);
                }

                tmpl.SetParameter(6, Log_RecordReportsImpl.ToText_Configuration(err_Configurationtree_Node2), log_Reports);//設定位置パンくずリスト

                memoryApplication.CreateErrorReport("Er:7011;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
gt_EndMethod:
            if (Log_ReportsImpl.BDebugmode_Static)
            {
                //d_ParsingLog.Decrement(s_Cur.Name_Node);
            }
            log_Method.EndMethod(log_Reports);

            if (log_Method.CanDebug(1))
            {
                log_Method.WriteDebug_ToConsole("終了└──┘");
            }
        }
Esempio n. 26
0
        //────────────────────────────────────────
        #endregion



        #region アクション
        //────────────────────────────────────────

        protected override void Parse_SAttribute(
            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_SAttr", log_Reports);
            //
            //



            //
            // name属性は必須。
            //
            string sName_Fnc = cur_X.GetAttribute(PmNames.S_NAME.Name_Attribute);

            if ("" == sName_Fnc)
            {
                goto gt_Error_UndefinedFncNameAttr;
            }


            XmlAttribute err_XAttr = null;

            if (NamesFnc.S_CELL == sName_Fnc)
            {
                foreach (XmlAttribute xAttr in cur_X.Attributes)
                {
                    // ②
                    // name,description
                    PmName pmName = PmNames.FromSAttribute(xAttr.Name);
                    if (null != pmName)
                    {
                        cur_Cf.Dictionary_Attribute.Add(pmName.Name_Pm, xAttr.Value, cur_Cf, true, log_Reports);
                    }
                    else
                    {
                        err_XAttr = xAttr;
                        goto gt_Error_UndefinedAttr;
                    }
                }
            }
            else if (NamesFnc.S_SWITCH == sName_Fnc)
            {
                foreach (XmlAttribute xAttr in cur_X.Attributes)
                {
                    // ③
                    // name,description
                    PmName pmName = PmNames.FromSAttribute(xAttr.Name);
                    if (null != pmName)
                    {
                        cur_Cf.Dictionary_Attribute.Add(pmName.Name_Pm, xAttr.Value, cur_Cf, true, log_Reports);
                    }
                    else
                    {
                        err_XAttr = xAttr;
                        goto gt_Error_UndefinedAttr;
                    }
                }
            }
            else if (NamesFnc.S_CASE == sName_Fnc)
            {
                foreach (XmlAttribute xAttr in cur_X.Attributes)
                {
                    // ④
                    // name,description
                    PmName pmName = PmNames.FromSAttribute(xAttr.Name);
                    if (null != pmName)
                    {
                        cur_Cf.Dictionary_Attribute.Add(pmName.Name_Pm, xAttr.Value, cur_Cf, true, log_Reports);
                    }
                    else
                    {
                        err_XAttr = xAttr;
                        goto gt_Error_UndefinedAttr;
                    }
                }
            }
            else if (NamesFnc.S_VALUE_CONTROL == sName_Fnc)
            {
                foreach (XmlAttribute xAttr in cur_X.Attributes)
                {
                    // ⑤
                    // name,description
                    PmName pmName = PmNames.FromSAttribute(xAttr.Name);
                    if (null != pmName)
                    {
                        cur_Cf.Dictionary_Attribute.Add(pmName.Name_Pm, xAttr.Value, cur_Cf, true, log_Reports);
                    }
                    else
                    {
                        err_XAttr = xAttr;
                        goto gt_Error_UndefinedAttr;
                    }
                }

                // value属性の指定がなければ、このコントロールの名前を入れておく。
                if (!cur_Cf.Dictionary_Attribute.ContainsKey(PmNames.S_VALUE.Name_Pm))
                {
                    Configurationtree_Node owner_Configurationtree_Control;
                    if (!(cur_Cf.Parent is Configurationtree_Node))
                    {
                        //todo:エラーか?
                        owner_Configurationtree_Control = null;
                        goto gt_Error_UndefinedClass;
                    }
                    else
                    {
                        Configurationtree_Node parent_Cf = (Configurationtree_Node)cur_Cf.Parent;

                        if (NamesNode.S_CONTROL1 == parent_Cf.Name)
                        {
                            owner_Configurationtree_Control = parent_Cf;
                        }
                        else
                        {
                            Configuration_Node parent2 = parent_Cf.GetParentByNodename(
                                NamesNode.S_CONTROL1, EnumConfiguration.Tree, true, log_Reports);
                            if (log_Reports.Successful)
                            {
                                owner_Configurationtree_Control = (Configurationtree_Node)parent2;
                            }
                            else
                            {
                                owner_Configurationtree_Control = null;
                            }
                        }
                    }

                    if (null != owner_Configurationtree_Control)
                    {
                        if (owner_Configurationtree_Control.Dictionary_Attribute.ContainsKey(PmNames.S_NAME.Name_Pm))
                        {
                            string sFcName;
                            owner_Configurationtree_Control.Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sFcName, true, log_Reports);
                            cur_Cf.Dictionary_Attribute.Add(PmNames.S_VALUE.Name_Pm, sFcName, cur_Cf, true, log_Reports);
                        }
                    }
                }
            }
            else if (NamesFnc.S_RECORD_SET_SAVE_TO2 == sName_Fnc)
            {
                foreach (XmlAttribute xAttr in cur_X.Attributes)
                {
                    string xName_AttrTrim = xAttr.Name.Trim();

                    if (
                        PmNames.S_REQUIRED.Name_Attribute == xAttr.Name || // 特にS→Eにパースは無い
                        PmNames.S_FROM.Name_Attribute == xAttr.Name || // Xn_L07_SToE:SToE_F_5FElem/Xn_L07_SToE:SToE_F_A6FromImpl
                        PmNames.S_STORAGE.Name_Attribute == xAttr.Name || // 特にS→Eにパースは無い
                        PmNames.S_FIELD.Name_Attribute == xAttr.Name    // 特にS→Eにパースは無い
                        )
                    {
                        //
                        // 属性=””
                        cur_Cf.Dictionary_Attribute.Add(xAttr.Name, xAttr.Value, cur_Cf, true, log_Reports);
                    }
                    else
                    {
                        //
                        // エラー。
                        err_XAttr = xAttr;
                        goto gt_Error_UndefinedAttr;
                    }
                }//foreach
            }
            else
            {
                foreach (XmlNode xAttr in cur_X.Attributes)
                {
                    // とりあえず、どんな属性名でも受け入れる。

                    if (log_Method.CanDebug(1))
                    {
                        log_Method.WriteDebug_ToConsole("<fnc name=”[" + sName_Fnc + "]”>の属性 " + xAttr.Name + "=”" + xAttr.Value + "”");
                    }

                    //
                    // value=""
                    //

                    // ⑥
                    PmName pmName = PmNames.FromSAttribute(xAttr.Name);
                    if (null != pmName)
                    {
                        cur_Cf.Dictionary_Attribute.Add(pmName.Name_Pm, xAttr.Value, cur_Cf, true, log_Reports);
                    }
                    else
                    {
                        cur_Cf.Dictionary_Attribute.Add(xAttr.Name, xAttr.Value, cur_Cf, true, log_Reports);
                    }

                    //
                    // 子<arg1>は、ここでは処理しない。
                    //
                }
            }

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

                Log_TextIndented s = new Log_TextIndentedImpl();

                s.Append("[");
                s.Append(cur_X.Name);
                s.Append("]要素を探索中に、未対応の属性が記述されていました。");
                s.Newline();

                s.Append("xAttr.Name=[");
                s.Append(err_XAttr.Name);
                s.Append("]");
                s.Newline();
                s.Newline();

                // ヒント
                s.Append(r.Message_Configuration(cur_Cf));

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

                Log_TextIndented s = new Log_TextIndentedImpl();

                s.Append("<fnc>要素に、name属性が指定されていませんでした。");
                s.Newline();
                s.Newline();

                // ヒント
                s.Append(r.Message_Configuration(cur_Cf));

                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("▲エラー341!", log_Method);

                Log_TextIndented s = new Log_TextIndentedImpl();

                s.Append("何らかのエラー。");
                s.Newline();

                // ヒント
                s.Append(r.Message_Configuration(cur_Cf));

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

        public override void Translate(
            Configurationtree_Node cur_Cf,      //「S■fnc name=”Sf:f-list-box-labels;”」
            Expression_Node_String parent_Expr, //「E■view」
            MemoryApplication memoryApplication,
            Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0);

            log_Method.BeginMethod(Info_ConfigurationtreeToExpression.Name_Library, this, "SToE", log_Reports);

            if (log_Method.CanDebug(1))
            {
            }

            //
            //
            //
            // 自
            //
            //
            //
            Expression_Node_String cur_Expr = new Expression_Node_StringImpl(parent_Expr, cur_Cf);


            //
            //
            //
            // 属性
            //
            //
            //
            this.ParseAttr_InConfigurationtreeToExpression(
                cur_Cf,
                cur_Expr,
                true,
                true,
                log_Reports
                );


            //
            //
            //
            // 子
            //
            //
            //
            cur_Cf.List_Child.ForEach(delegate(Configurationtree_Node child_Cf, ref bool bBreak2)
            {
                string sName_Fnc;
                child_Cf.Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sName_Fnc, false, log_Reports);

                if (log_Method.CanDebug(1))
                {
                    log_Method.WriteDebug_ToConsole(" 子解析。 <~ name=”[" + sName_Fnc + "]”>");
                }



                // todo: Sf:item-value;
                if (NamesFnc.S_ITEM_VALUE == sName_Fnc)
                {
                    //
                    // 自
                    //
                    Expression_Node_String child_Expr = new Expression_Node_StringImpl(cur_Expr, child_Cf);

                    //
                    // 属性
                    //
                    this.ParseAttr_InConfigurationtreeToExpression(
                        child_Cf,
                        child_Expr,
                        true,
                        true,
                        log_Reports
                        );

                    //
                    // 子
                    //
                    this.ParseChild_InConfigurationtreeToExpression(
                        child_Cf,
                        child_Expr,
                        memoryApplication,
                        pg_ParsingLog,
                        log_Reports
                        );

                    //
                    // 親
                    //
                    cur_Expr.List_Expression_Child.Add(child_Expr, log_Reports);
                }
                else if (NamesFnc.S_ITEM_LABEL2 == sName_Fnc)
                {
                    //
                    // 自
                    //
                    Expression_Node_String child_Expr = new Expression_Node_StringImpl(cur_Expr, child_Cf);

                    //
                    // 属性
                    //
                    this.ParseAttr_InConfigurationtreeToExpression(
                        child_Cf,
                        child_Expr,
                        true,
                        true,
                        log_Reports
                        );

                    //
                    // 子
                    //
                    this.ParseChild_InConfigurationtreeToExpression(
                        child_Cf,
                        child_Expr,
                        memoryApplication,
                        pg_ParsingLog,
                        log_Reports
                        );

                    //
                    // 親
                    //
                    cur_Expr.List_Expression_Child.Add(child_Expr, log_Reports);
                }
                else if (NamesFnc.S_ITEM_GRAY_OUT == sName_Fnc)
                {
                    //
                    // 自
                    //
                    Expression_Node_String child_Expr = new Expression_Node_StringImpl(cur_Expr, child_Cf);

                    //
                    // 属性
                    //
                    this.ParseAttr_InConfigurationtreeToExpression(
                        child_Cf,
                        child_Expr,
                        true,
                        true,
                        log_Reports
                        );

                    //
                    // 子
                    //
                    this.ParseChild_InConfigurationtreeToExpression(
                        child_Cf,
                        child_Expr,
                        memoryApplication,
                        pg_ParsingLog,
                        log_Reports
                        );

                    //
                    // 親
                    //
                    cur_Expr.List_Expression_Child.Add(child_Expr, log_Reports);
                }
                else
                {
                    {
                        Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                        tmpl.SetParameter(1, child_Cf.Name, log_Reports);//子設定ノード名

                        memoryApplication.CreateErrorReport("Er:7019;", tmpl, log_Reports);
                    }

                    bBreak2 = true;
                    goto gt_gt_EndMethod2;
                }
                goto gt_gt_EndMethod2;

                //
                //
                //
                //
                gt_gt_EndMethod2:
                ;
            });


            //
            //
            //
            // 親へ連結
            //
            //
            //
            parent_Expr.List_Expression_Child.Add(cur_Expr, log_Reports);
            //
            log_Method.EndMethod(log_Reports);
        }
Esempio n. 28
0
        //────────────────────────────────────────
        #endregion



        #region アクション
        //────────────────────────────────────────

        /// <summary>
        /// プロジェクト読取り時の定形アクション実行。
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="st_PrevProjectElm_OrNull"></param>
        /// <param name="bProjectValid"></param>
        /// <param name="log_Reports"></param>
        public override string Execute5_Main(Log_Reports log_Reports)
        {
            //()メソッド開始
            Log_Method log_Method = new Log_MethodImpl(1);

            log_Method.BeginMethod(Info_Functions.Name_Library, this, "Execute5_Main", log_Reports);


            //
            if (log_Method.CanDebug(1))
            {
                log_Method.WriteDebug_ToConsole("「プロジェクト選択時」用のイベントハンドラーを実行します。");
            }


            //()タスク_デスクリプション
            {
                string sFncName0;
                this.TrySelectAttribute(out sFncName0, PmNames.S_NAME.Name_Pm, EnumHitcount.One_Or_Zero, log_Reports);
                if (this.Functionparameterset.Sender is Customcontrol)
                {
                    Customcontrol ccFc = (Customcontrol)this.Functionparameterset.Sender;
                    string        sName_Usercontrol = ccFc.ControlCommon.Expression_Name_Control.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports);
                    log_Reports.Comment_EventCreationMe += "/追加:[" + sName_Usercontrol + "]コントロールが、[" + sFncName0 + "]アクションを実行。";
                }
                else
                {
                    log_Reports.Comment_EventCreationMe += "/追加:[" + sFncName0 + "]アクションを実行。";
                }
            }



            Configurationtree_Node conf_ThisMethod = new Configurationtree_NodeImpl(log_Method.Fullname, null);


            if (this.EnumEventhandler == EnumEventhandler.Editor_B_Lr)
            {
                //(4)独自モデルの取得
                if (log_Method.CanDebug(1))
                {
                    log_Method.WriteDebug_ToConsole("(4)独自モデルの取得");
                }
                //
                this.On_P04_ReadNewModel(log_Reports);


                //(5)エディター名。ツール設定ファイルに記載されている方。
                if (log_Method.CanDebug(1))
                {
                    log_Method.WriteDebug_ToConsole("(5)エディター名。ツール設定ファイルに記載されている方。");
                }

                // 表示用の名称。
                string sName_SelectingEditor;
                if (this.Functionparameterset.SelectedProjectElement_Configurationtree == null)
                {
                    //
                    // 切り替えるプロジェクトが判明していない場合は、空文字列。
                    //
                    sName_SelectingEditor = "";
                }
                else
                {
                    //
                    // todo: エディター設定ファイルの方のエディター名を入れても意味ないのでは?
                    //
                    sName_SelectingEditor = ((MemoryAatoolxml_Editor)this.Functionparameterset.SelectedProjectElement_Configurationtree).Name;
                }



                //(6)まず、きれいさっぱり プロジェクトをクリアーします。(切替用)
                if (log_Method.CanDebug(1))
                {
                    log_Method.WriteDebug_ToConsole("(6)まず、きれいさっぱり プロジェクトをクリアーします。(切替用)");
                }
                // todo:イベントハンドラーを外してから、フォームを外すこと。リストボックスが誤挙動を起こしている。
                this.On_P06_ClearProject(this.Functionparameterset.Sender, log_Reports);



                //(7)「Aa_Editor.xml」読取。
                if (log_Method.CanDebug(1))
                {
                    log_Method.WriteDebug_ToConsole("(7)「Aa_Editor.xml」読取。");
                }
                //
                if (!this.Functionparameterset.IsProjectValid || this.Functionparameterset.SelectedProjectElement_Configurationtree == null)
                {
                    MemoryAatoolxml_Editor moAatoolxml_PrevEditorElm_OrNull = null;


                    //
                    //
                    //
                    // デフォルト・プロジェクト名が指定されていない場合、
                    // ツール設定ファイルの最初に記述されているプロジェクトを選択します。
                    //
                    //
                    //
                    if (log_Reports.Successful)
                    {
                        if ("" == sName_SelectingEditor)
                        {
                            //
                            // デフォルト・エディター名が未指定の場合。
                            //
                            MemoryAatoolxml_Editor moAatoolxml_DefaultEditor = this.Owner_MemoryApplication.MemoryAatoolxml.GetDefaultEditor(true, log_Reports);
                            if (!log_Reports.Successful)
                            {
                                // 既エラー。
                                goto gt_EndMethod;
                            }

                            // ↓これ要る?
                            sName_SelectingEditor = moAatoolxml_DefaultEditor.Name;
                        }
                    }


                    this.On_P07_SelectDefaultProject(ref sName_SelectingEditor, ref moAatoolxml_PrevEditorElm_OrNull, this.Functionparameterset.IsProjectValid, log_Reports);


                    this.Functionparameterset.SelectedProjectElement_Configurationtree = moAatoolxml_PrevEditorElm_OrNull;

                    //
                    //
                    //
                    //「プロジェクトを開いた時の初期化」イベントハンドラーで使うために、ここで設定します。
                    //
                    //
                    //
                    this.Functionparameterset.SelectedProjectElement_Configurationtree = this.Owner_MemoryApplication.MemoryAatoolxml.GetEditorByName(sName_SelectingEditor, true, log_Reports);
                    if (!log_Reports.Successful)
                    {
                        // 既エラー。
                        goto gt_EndMethod;
                    }
                }


                // ↓追加
                if (null == this.Functionparameterset.SelectedProjectElement_Configurationtree)
                {
                    {
                        Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                        tmpl.SetParameter(1, sName_SelectingEditor, log_Reports);//エディター名

                        this.Owner_MemoryApplication.CreateErrorReport("Er:110003;", tmpl, log_Reports);
                    }
                }
                // ↑追加



                //(13a)エディター・フォルダー。
                if (log_Method.CanDebug(1))
                {
                    log_Method.WriteDebug_ToConsole("(13a)エディター・フォルダーパス類推。");
                }
                //
                //
                //
                Expression_Node_Filepath ec_Fopath_Editor;
                if (log_Reports.Successful)
                {
                    MemoryAatoolxml_Editor moAatoolxml_SelectedEditor = (MemoryAatoolxml_Editor)this.Functionparameterset.SelectedProjectElement_Configurationtree;
                    ec_Fopath_Editor = moAatoolxml_SelectedEditor.GetFilepathByFsetvarname(
                        NamesVar.S_SP_EDITOR,
                        this.Owner_MemoryApplication.MemoryVariables,
                        true,
                        log_Reports
                        );
                }
                else
                {
                    ec_Fopath_Editor = null;
                }


                //(13b)「Aa_Editor.xml」読取。
                if (log_Method.CanDebug(1))
                {
                    log_Method.WriteDebug_ToConsole("(13b)「Aa_Editor.xml」ファイルパス類推。");
                }
                //
                Expression_Node_Filepath ec_Fpath_AaEditorXml;
                if (log_Reports.Successful)
                {
                    //
                    // ツール設定ファイルで指定された値から、自動類推で設定されているはず。
                    //
                    Configurationtree_NodeFilepath cf_Fpath_EditorXml = new Configurationtree_NodeFilepathImpl(
                        "ツール設定ファイル[" + Application.StartupPath + System.IO.Path.DirectorySeparatorChar + ValuesAttr.S_FPATHR_AATOOLXML + "]の中の[" + sName_SelectingEditor + "]エディターへの指定から自動類推",
                        null);

                    // フォルダーパス + \Aa_Editor.xml
                    string sFpatha_Aaeditorxml = ec_Fopath_Editor.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports) + System.IO.Path.DirectorySeparatorChar + NamesFile.S_AA_EDITOR_XML;

                    // プロジェクト起動時に。
                    cf_Fpath_EditorXml.InitPath(
                        sFpatha_Aaeditorxml,
                        log_Reports
                        );
                    ec_Fpath_AaEditorXml = new Expression_Node_FilepathImpl(cf_Fpath_EditorXml);
                }
                else
                {
                    ec_Fpath_AaEditorXml = null;
                }


                //(8)「エディター設定ファイル」に記述されている<f-set-var>要素を、「エディター設定ファイル・モデル」に格納。Cf→M
                if (log_Method.CanDebug(1))
                {
                    log_Method.WriteDebug_ToConsole("(8)「エディター設定ファイル」に記述されている<f-set-var>要素を、「エディター設定ファイル・モデル」に格納。Cf→M。この時点で「Sp:Engine;」といったシステム変数は自動類推が終わっている必要があります。");
                }
                //
                MemoryAaeditorxml_Editor moAaeditorxml_Editor = null;
                if (log_Reports.Successful)
                {
                    this.On_P08_SpToVar_(
                        out moAaeditorxml_Editor,
                        ec_Fpath_AaEditorXml,
                        ec_Fopath_Editor,
                        (MemoryAatoolxml_Editor)this.Functionparameterset.SelectedProjectElement_Configurationtree,
                        log_Reports
                        );
                }



                //
                //
                //
                // ここで「Aa_Files.csv」を読み込みたい。
                //
                //
                //



                if (log_Reports.Successful)
                {
                    //(9)変数ファイル読取
                    if (log_Method.CanDebug(1))
                    {
                        log_Method.WriteDebug_ToConsole("(9)変数ファイル読取");
                    }
                    //
                    this.Owner_MemoryApplication.MemoryVariables.LoadVariables(
                        Application.StartupPath,
                        log_Reports
                        );
                }



                if (log_Reports.Successful)
                {
                    //(10)プログラマー用・デバッグモードのON/OFF。
                    if (log_Method.CanDebug(1))
                    {
                        log_Method.WriteDebug_ToConsole("(10)プログラマー用・デバッグモードのON/OFF。");
                    }
                    //
                    //mainWndの作成より先に設定する必要がある。ステータスバーを出す、出さないについて。
                    {
                        Expression_Leaf_StringImpl ec_Varname = new Expression_Leaf_StringImpl(this, this.Cur_Configuration.Parent);
                        ec_Varname.SetString(NamesVar.S_SS_DEBUGMODE_PROGRAMMER, log_Reports);
                        string sValue = this.Owner_MemoryApplication.MemoryVariables.GetStringByVariablename(ec_Varname, false, log_Reports);
                        if (ValuesAttr.S_ON == sValue)
                        {
                            Log_ReportsImpl.BDebugmode_Static = true;
                        }
                        else if (ValuesAttr.S_OFF == sValue)
                        {
                            Log_ReportsImpl.BDebugmode_Static = false;
                        }
                        else if (ValuesAttr.S_EMPTY == sValue)
                        {
                            // 無視
                        }
                        else
                        {
                            // TODO:エラー
                        }
                    }
                }



                if (log_Reports.Successful)
                {
                    //(11)画面レイアウト・デバッグモードのON/OFF。
                    if (log_Method.CanDebug(1))
                    {
                        log_Method.WriteDebug_ToConsole("(11)フォーム・デバッグモードのON/OFF。");
                    }
                    //
                    Expression_Leaf_StringImpl ec_Varname = new Expression_Leaf_StringImpl(this, this.Cur_Configuration.Parent);
                    ec_Varname.SetString(NamesVar.S_SS_DEBUGMODE_FORM, log_Reports);
                    string sValue = this.Owner_MemoryApplication.MemoryVariables.GetStringByVariablename(ec_Varname, false, log_Reports);
                    if (ValuesAttr.S_ON == sValue)
                    {
                        Log_ReportsImpl.BDebugmode_Form = true;
                    }
                    else if (ValuesAttr.S_OFF == sValue)
                    {
                        Log_ReportsImpl.BDebugmode_Form = false;
                    }
                    else if (ValuesAttr.S_EMPTY == sValue)
                    {
                        // 無視
                    }
                    else
                    {
                        // TODO:エラー
                    }
                }



                //(14)「Aa_Files.csv」読取。
                if (log_Method.CanDebug(1))
                {
                    log_Method.WriteDebug_ToConsole("(14)「Aa_Files.csv」読取。");
                }
                //
                List <Expression_Node_Filepath> ecList_Fpath_BackupRequest;
                {
                    if (log_Reports.Successful)
                    {
                        // 正常時

                        Expression_Node_Function function_Expr = Collection_Function.NewFunction2(
                            Expression_Node_Function22Impl.NAME_FUNCTION, this, this.Cur_Configuration,
                            this.Owner_MemoryApplication, log_Reports);

                        // 実行
                        function_Expr.Execute4_OnLr(this.Functionparameterset.Sender, log_Reports);

                        // 実行後
                        ecList_Fpath_BackupRequest = ((Expression_Node_Function22Impl)function_Expr).List_Expression_Filepath_BackupRequest_Out;
                    }
                    else
                    {
                        //
                        // エラー
                        //

                        ecList_Fpath_BackupRequest = null;
                    }
                }



                //(14b)ユーザー定義関数設定ファイル読取【2012-03-30追加】
                if (log_Method.CanDebug(1))
                {
                    log_Method.WriteDebug_ToConsole("(14b)ユーザー定義関数設定ファイル読取【2012-03-30追加】");
                }
                //
                if (log_Reports.Successful)
                {
                    // タイプデータ値。
                    Expression_Leaf_StringImpl ec_NameVariable = new Expression_Leaf_StringImpl(this, new Configurationtree_NodeImpl("!ハードコーディング", null));
                    ec_NameVariable.SetString(ValuesTypeData.S_CODE_FUNCTIONS, log_Reports);

                    List <MemoryCodefileinfo> listInfo = null;
                    if (log_Reports.Successful)
                    {
                        listInfo = this.Owner_MemoryApplication.MemoryCodefiles.GetCodefileinfoByTypedata(ec_NameVariable, true, log_Reports);
                    }

                    if (log_Reports.Successful)
                    {
                        foreach (MemoryCodefileinfo scriptfile in listInfo)
                        {
                            if (log_Reports.Successful)
                            {
                                this.Owner_MemoryApplication.MemoryFunctions.LoadFile(
                                    scriptfile.Expression_Filepath,
                                    log_Reports);
                            }
                            else
                            {
                                break;
                            }
                        }
                    }
                }



                //(16)『スタイルシート設定ファイル』読取
                if (log_Method.CanDebug(1))
                {
                    log_Method.WriteDebug_ToConsole("(16)『スタイルシート設定ファイル』読取");
                }
                //
                if (log_Reports.Successful)
                {
                    Expression_Node_Function expr_Func = Collection_Function.NewFunction2(
                        Expression_Node_Function19Impl.NAME_FUNCTION, this, this.Cur_Configuration,
                        this.Owner_MemoryApplication, log_Reports);

                    Expression_Node_StringImpl ec_Str = new Expression_Node_StringImpl(this, conf_ThisMethod);
                    ec_Str.AppendTextNode(NamesVar.S_ST_STYLESHEET, this.Cur_Configuration, log_Reports);

                    expr_Func.SetAttribute(Expression_Node_Function19Impl.PM_NAME_TABLE_STYLESHEET, ec_Str, log_Reports);


                    expr_Func.Execute4_OnLr(
                        this.Functionparameterset.Sender,
                        log_Reports
                        );
                }



                //(17a)「バックアップを取る」前にしておく独自実装をするタイミング。
                if (log_Method.CanDebug(1))
                {
                    log_Method.WriteDebug_ToConsole("(17a)「バックアップを取る」前にしておく独自実装をするタイミング。");
                }
                //
                this.On_P17a_PreviousBackup(
                    this.Functionparameterset.Sender,
                    moAaeditorxml_Editor,
                    ec_Fpath_AaEditorXml,
                    ec_Fopath_Editor,
                    (MemoryAatoolxml_Editor)this.Functionparameterset.SelectedProjectElement_Configurationtree,
                    log_Reports);

                //(17b)今日の分のバックアップを取ります。
                if (log_Method.CanDebug(1))
                {
                    log_Method.WriteDebug_ToConsole("(17b)今日の分のバックアップを取ります。");
                }
                //
                this.On_P17b_DateBackup(ecList_Fpath_BackupRequest, this.Functionparameterset.Sender, log_Reports);


                //(17c)「新規ウィンドウを開く」前にしておく独自実装をするタイミング。
                if (log_Method.CanDebug(1))
                {
                    log_Method.WriteDebug_ToConsole("(17c)「新規ウィンドウを開く」前にしておく独自実装をするタイミング。");
                }
                //
                this.On_P17c_PreviousOpenWindow(
                    this.Functionparameterset.Sender,
                    moAaeditorxml_Editor,
                    ec_Fpath_AaEditorXml,
                    ec_Fopath_Editor,
                    (MemoryAatoolxml_Editor)this.Functionparameterset.SelectedProjectElement_Configurationtree,
                    log_Reports);


                //(18)関数30「新規ウィンドウを開く」実行。引数には関数を2つ指定できる。
                if (log_Method.CanDebug(1))
                {
                    log_Method.WriteDebug_ToConsole("(18)関数30「新規ウィンドウを開く」実行。引数には関数を2つ指定できる。");
                }
                //
                {
                    Expression_Node_Function expr_Func = Collection_Function.NewFunction2(
                        Expression_Node_Function30Impl.NAME_FUNCTION, this, this.Cur_Configuration,
                        this.Owner_MemoryApplication, log_Reports);

                    {
                        //Expression_Node_Function30Impl f1 =

                        {
                            Expression_Node_StringImpl ec_FormStart;
                            {
                                Expression_FvarImpl ec_Fvar = new Expression_FvarImpl(this, this.Cur_Configuration, this.Owner_MemoryApplication);
                                ec_Fvar.AppendTextNode(NamesVar.S_SS_FORM_START, this.Cur_Configuration, log_Reports);

                                ec_FormStart = new Expression_Node_StringImpl(this, this.Cur_Configuration);
                                ec_FormStart.List_Expression_Child.Add(ec_Fvar, log_Reports);
                            }
                            ((Expression_Node_Function30Impl)expr_Func).SetAttribute(Expression_Node_Function30Impl.PM_NAME_FORM, ec_FormStart, log_Reports);
                        }

                        ((Expression_Node_Function30Impl)expr_Func).In_Subroutine_Function30_1 = this.In_Subroutine_Function30_1_OrNull;
                        ((Expression_Node_Function30Impl)expr_Func).In_Subroutine_Function30_2 = this.In_Subroutine_Function30_2_OrNull;
                        ((Expression_Node_Function30Impl)expr_Func).SetAttribute(
                            Expression_Node_Function30Impl.PM_NAME_TOGETHER,
                            new Expression_Leaf_StringImpl(NamesStg.S_STG_BEGIN_APPLICATION, null, conf_ThisMethod), log_Reports);
                    }


                    expr_Func.Execute4_OnLr(
                        this.Functionparameterset.Sender,
                        log_Reports
                        );
                }


                //(19)最後に
                if (log_Method.CanDebug(1))
                {
                    log_Method.WriteDebug_ToConsole("(19)最後に");
                }
                //
                this.On_P19_AtLast(
                    this.Functionparameterset.Sender,
                    (MemoryAatoolxml_Editor)this.Functionparameterset.SelectedProjectElement_Configurationtree,
                    this.Functionparameterset.IsProjectValid,
                    log_Reports);



                //
                // 「S」と「E」を出力したい。
                if (false)
                {
                    // 「S」全てのコントロールと、ユーザー定義関数について。

                    log_Method.WriteInfo_ToConsole("┌──────────┐「S」全てのコントロールについて。");
                    this.Owner_MemoryApplication.MemoryForms.ForEach_Children(delegate(string sKey, Usercontrol fcUc, ref bool bRemove, ref bool bBreak)
                    {
                        Log_TextIndented s = new Log_TextIndentedImpl();
                        s.Append("[" + sKey + "]");
                        s.Newline();
                        fcUc.ControlCommon.Expression_Control.Cur_Configuration.ToText_Content(s);
                        log_Method.WriteInfo_ToConsole(s.ToString());
                    });
                    log_Method.WriteInfo_ToConsole("└──────────┘");

                    log_Method.WriteInfo_ToConsole("┌──────────┐「S」全てのユーザー定義関数について。");
                    this.Owner_MemoryApplication.MemoryFunctions.ForEach_Children(delegate(string sKey, Expression_Node_Function ec_CommonFunction, ref bool bRemove, ref bool bBreak)
                    {
                        Log_TextIndented s = new Log_TextIndentedImpl();
                        s.Append("[" + sKey + "]");
                        s.Newline();
                        ec_CommonFunction.Cur_Configuration.ToText_Content(s);
                        log_Method.WriteInfo_ToConsole(s.ToString());
                    });
                    log_Method.WriteInfo_ToConsole("└──────────┘");



                    // 「E」全てのコントロールと、ユーザー定義関数について。

                    log_Method.WriteInfo_ToConsole("┌──────────┐「E」全てのコントロールについて。");
                    this.Owner_MemoryApplication.MemoryForms.ForEach_Children(delegate(string sKey, Usercontrol fcUc, ref bool bRemove, ref bool bBreak)
                    {
                        Log_TextIndented s = new Log_TextIndentedImpl();
                        s.Append("[" + sKey + "]");
                        s.Newline();
                        fcUc.ControlCommon.Expression_Control.ToText_Snapshot(s);
                        log_Method.WriteInfo_ToConsole(s.ToString());
                    });
                    log_Method.WriteInfo_ToConsole("└──────────┘");

                    log_Method.WriteInfo_ToConsole("┌──────────┐「E」全てのユーザー定義関数について。");
                    this.Owner_MemoryApplication.MemoryFunctions.ForEach_Children(delegate(string sKey, Expression_Node_Function ec_CommonFunction, ref bool bRemove, ref bool bBreak)
                    {
                        Log_TextIndented s = new Log_TextIndentedImpl();
                        s.Append("[" + sKey + "]");
                        s.Newline();
                        ec_CommonFunction.ToText_Snapshot(s);
                        log_Method.WriteInfo_ToConsole(s.ToString());
                    });
                    log_Method.WriteInfo_ToConsole("└──────────┘");
                }
                log_Method.WriteInfo_ToConsole("◆起動終了");



                goto gt_EndMethod;
                //
gt_EndMethod:
                log_Method.EndMethod(log_Reports);
            }

            return("");
        }
Esempio n. 29
0
        //────────────────────────────────────────

        /// <summary>
        /// <data>要素の読取。
        /// </summary>
        /// <param select="xDataSource"></param>
        /// <param select="fcUc"></param>
        public void Translate(
            Configurationtree_Node cur_Cf,    //<data>要素
            Expression_Node_String parent_Ec, //「S■form-component」
            MemoryApplication memoryApplication,
            Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

            log_Method.BeginMethod(Info_ConfigurationtreeToExpression.Name_Library, this, "CfToEc", log_Reports);

            if (log_Method.CanDebug(1))
            {
                pg_ParsingLog.Increment("(2)" + cur_Cf.Name);
            }

            //
            //
            //
            //


            //
            //
            //
            // 自
            //
            //
            //
            Expression_NodeImpl cur_Ec = new Expression_NodeImpl(parent_Ec, cur_Cf, memoryApplication);


            //
            //
            //
            // 属性
            //
            //
            //
            string err_SAttrName;

            cur_Cf.Dictionary_Attribute.ForEach(delegate(string sPmName, string sValue, ref bool bBreak)
            {
                if (
                    PmNames.S_MEMORY.Name_Pm == sPmName ||
                    PmNames.S_ACCESS.Name_Pm == sPmName ||
                    PmNames.S_NAME_TABLE.Name_Pm == sPmName ||
                    PmNames.S_NAME_VAR.Name_Pm == sPmName || //.Z_ITEM_VALUE_TO_VARIABLE
                    PmNames.S_DESCRIPTION.Name_Pm == sPmName
                    )
                {
                    //ystem.Console.WriteLine(Info_SToE.LibraryName + ":" + this.GetType().Name + "#SToE: <データT >に属性追加 [" + sKey + "]←[" + sValue + "]");

                    // なんでも属性として追加。
                    Expression_Node_String ec_Value = new Expression_Leaf_StringImpl(sValue, cur_Ec, cur_Cf);
                    cur_Ec.SetAttribute(sPmName, ec_Value, log_Reports);
                }
                else
                {
                    err_SAttrName = sPmName;
                    bBreak        = true;
                    goto gt_Error_UndefinedAttr;
                }

                goto gt_gt_EndMethod2;
                //
                //
                //
                //
                gt_Error_UndefinedAttr:
                {
                    Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                    tmpl.SetParameter(1, cur_Cf.Name, log_Reports);                                        //設定ノード名
                    tmpl.SetParameter(2, err_SAttrName, log_Reports);                                      //属性名
                    tmpl.SetParameter(3, Log_RecordReportsImpl.ToText_Configuration(cur_Cf), log_Reports); //設定位置パンくずリスト

                    memoryApplication.CreateErrorReport("Er:7002;", tmpl, log_Reports);
                }
                goto gt_gt_EndMethod2;

                gt_gt_EndMethod2:
                ;
            });


            //
            //
            //
            // 子
            //
            //
            //
            {
                this.ParseChild_InConfigurationtreeToExpression(
                    cur_Cf,
                    cur_Ec,
                    memoryApplication,
                    pg_ParsingLog,
                    log_Reports
                    );
            }


            //
            //
            //
            // 親へ連結
            //
            //
            //
            parent_Ec.List_Expression_Child.Add(cur_Ec, log_Reports);



            goto gt_EndMethod;
            //
            //
gt_EndMethod:
            if (Log_ReportsImpl.BDebugmode_Static)
            {
                pg_ParsingLog.Decrement(cur_Cf.Name);
            }

            log_Method.EndMethod(log_Reports);
        }
Esempio n. 30
0
        //────────────────────────────────────────

        protected void Execute6_Sub(
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(1, Log_ReportsImpl.BDebugmode_Static);

            log_Method.BeginMethod(Info_Functions.Name_Library, this, "Execute6_Sub", log_Reports);

            string sName_Fnc;

            this.TrySelectAttribute(out sName_Fnc, PmNames.S_NAME.Name_Pm, EnumHitcount.One_Or_Zero, log_Reports);

            if (log_Reports.CanStopwatch)
            {
                log_Method.Log_Stopwatch.Message = "Nアクション[" + sName_Fnc + "]実行";
                log_Method.Log_Stopwatch.Begin();
            }


            //
            // 変数は、登録されている名前の変数は存在し、登録されていない名前の変数は(自動作成されたもの以外は)存在しない。
            //
            // 元となるテーブルを見ながら、変数オブジェクトの内容を調べていく。
            //
            //


            Configurationtree_Node cur_Cf = new Configurationtree_NodeImpl(log_Method.Fullname, null);


            // 変数ログを吐く。
            {
                StringBuilder sb = new StringBuilder();

                //1行目
                sb.Append(NamesFld.S_NO);
                sb.Append(",");
                sb.Append(NamesFld.S_ID);
                sb.Append(",");
                sb.Append(NamesFld.S_EXPL);
                sb.Append(",");
                sb.Append(NamesFld.S_NAME);
                sb.Append(",");
                sb.Append(NamesFld.S_FOLDER);
                sb.Append(",");
                sb.Append(NamesFld.S_VALUE);
                sb.Append(",");
                sb.Append(NamesFld.S_END);
                sb.Append(Environment.NewLine);

                //2行目
                sb.Append(NamesTypedb.S_INT);    //NO
                sb.Append(",");
                sb.Append(NamesTypedb.S_INT);    //ID
                sb.Append(",");
                sb.Append(NamesTypedb.S_STRING); //Expl
                sb.Append(",");
                sb.Append(NamesTypedb.S_STRING); //NAME
                sb.Append(",");
                sb.Append(NamesTypedb.S_STRING); //FOLDER
                sb.Append(",");
                sb.Append(NamesTypedb.S_STRING); //VALUE
                sb.Append(",");
                sb.Append(NamesFld.S_END);       //END
                sb.Append(Environment.NewLine);

                //3行目
                sb.Append("-1,");                      //NO
                sb.Append("使わない,");                    //ID
                sb.Append("解説,");                      //Expl
                sb.Append("変数名,");                     //NAME
                sb.Append("(ファイルパス変数のみ指定有効)フォルダーパス,"); //FOLDER
                sb.Append("初期値,");                     //VALUE
                sb.Append(NamesFld.S_END);             //END
                sb.Append(Environment.NewLine);

                int nAuto = 0;
                this.Owner_MemoryApplication.MemoryVariables.EachVariable(delegate(string sKey, Expression_Node_String ec_String, ref bool bBreak)
                {
                    if (log_Method.CanDebug(1))
                    {
                        log_Method.WriteDebug_ToConsole("[" + sKey + "]=[" + ec_String.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports) + "]");
                    }

                    sb.Append(nAuto);//NO
                    sb.Append(",");
                    //ID 使わない
                    sb.Append(",");
                    //Expl 消えてしまう
                    sb.Append(",");
                    sb.Append(sKey);//NAME
                    sb.Append(",");
                    //FOLDER TODO:逆算が必要
                    sb.Append(",");
                    sb.Append(ec_String.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports)); //VALUE
                    sb.Append(",");
                    sb.Append(NamesFld.S_END);                                                                //END
                    sb.Append(Environment.NewLine);

                    nAuto++;
                });


                if (log_Method.CanDebug(1))
                {
                    log_Method.WriteDebug_ToConsole(sb.ToString());
                }

                //ログ出力
                {
                    Expression_Node_Filepath ec_Fpath_Logs = this.Owner_MemoryApplication.MemoryVariables.GetExpressionfilepathByVariablename(new Expression_Leaf_StringImpl(NamesVar.S_SP_LOGS, null, cur_Cf), true, log_Reports);

                    string sFpatha_LogVariables = ec_Fpath_Logs.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports) + System.IO.Path.DirectorySeparatorChar + NamesFile.S_LOG_VARIABLES;

                    if (log_Reports.Successful)
                    {
                        CsvWriterImpl writer = new CsvWriterImpl();
                        writer.Write(
                            sb.ToString(),
                            sFpatha_LogVariables,
                            true
                            );
                    }
                }
            }



            //変数CSVを吐き出したい。(登録されている順序を保って)
            {
                // 変数ファイルの読取り
                Table_Humaninput o_Table_Variables;
                this.Owner_MemoryApplication.MemoryVariables.TryGetTable_Variables(
                    out o_Table_Variables,
                    Application.StartupPath,
                    log_Reports
                    );

                if (null != o_Table_Variables)
                {
                    StringBuilder sb = new StringBuilder();

                    //1行目
                    sb.Append(NamesFld.S_NO);
                    sb.Append(",");
                    sb.Append(NamesFld.S_ID);
                    sb.Append(",");
                    sb.Append(NamesFld.S_EXPL);
                    sb.Append(",");
                    sb.Append(NamesFld.S_NAME);
                    sb.Append(",");
                    sb.Append(NamesFld.S_FOLDER);
                    sb.Append(",");
                    sb.Append(NamesFld.S_VALUE);
                    sb.Append(",");
                    sb.Append(NamesFld.S_END);
                    sb.Append(Environment.NewLine);

                    //2行目
                    sb.Append(NamesTypedb.S_INT);    //NO
                    sb.Append(",");
                    sb.Append(NamesTypedb.S_INT);    //ID
                    sb.Append(",");
                    sb.Append(NamesTypedb.S_STRING); //Expl
                    sb.Append(",");
                    sb.Append(NamesTypedb.S_STRING); //NAME
                    sb.Append(",");
                    sb.Append(NamesTypedb.S_STRING); //FOLDER
                    sb.Append(",");
                    sb.Append(NamesTypedb.S_STRING); //VALUE
                    sb.Append(",");
                    sb.Append(NamesFld.S_END);       //END
                    sb.Append(Environment.NewLine);

                    //3行目
                    sb.Append("-1,");                      //NO
                    sb.Append("使わない,");                    //ID
                    sb.Append("解説,");                      //Expl
                    sb.Append("変数名,");                     //NAME
                    sb.Append("(ファイルパス変数のみ指定有効)フォルダーパス,"); //FOLDER
                    sb.Append("初期値,");                     //VALUE
                    sb.Append(NamesFld.S_END);             //END
                    sb.Append(Environment.NewLine);


                    int nAuto = 0;
                    foreach (DataRow row in o_Table_Variables.DataTable.Rows)
                    {
                        if (o_Table_Variables.DataTable.Columns.Contains(NamesFld.S_NO))
                        {
                            int nValue;
                            Int_HumaninputImpl.TryParse(row[NamesFld.S_NO], out nValue, EnumOperationIfErrorvalue.Spaces_To_Alt_Value, 0, log_Reports);
                            sb.Append(nValue);
                            sb.Append(",");
                        }

                        // IDは空欄が正しいが、int型なので空欄にできないので 0 を入れる。
                        if (o_Table_Variables.DataTable.Columns.Contains(NamesFld.S_ID))
                        {
                            int nValue;
                            Int_HumaninputImpl.TryParse(row[NamesFld.S_ID], out nValue, EnumOperationIfErrorvalue.Spaces_To_Alt_Value, 0, log_Reports);
                            sb.Append(nValue);
                            sb.Append(",");
                        }

                        if (o_Table_Variables.DataTable.Columns.Contains(NamesFld.S_EXPL))
                        {
                            string sValue;
                            String_HumaninputImpl.TryParse(row[NamesFld.S_EXPL], out sValue, "", "", log_Method, log_Reports);
                            sb.Append(sValue);
                            sb.Append(",");
                        }

                        string sName_Var = "";
                        if (o_Table_Variables.DataTable.Columns.Contains(NamesFld.S_NAME))
                        {
                            string sValue;
                            String_HumaninputImpl.TryParse(row[NamesFld.S_NAME], out sValue, "", "", log_Method, log_Reports);
                            sb.Append(sValue);
                            sb.Append(",");

                            sName_Var = sValue;
                        }

                        // 現在の変数の内容
                        string sValue_Var = this.Owner_MemoryApplication.MemoryVariables.GetStringByVariablename(new Expression_Leaf_StringImpl(sName_Var, null, cur_Cf), true, log_Reports);

                        //現在の変数の内容を検索
                        if (NamesVar.Test_Filepath(sName_Var))
                        {
                            Expression_Node_Filepath ec_Fpath = this.Owner_MemoryApplication.MemoryVariables.GetExpressionfilepathByVariablename(new Expression_Leaf_StringImpl(sName_Var, null, cur_Cf), true, log_Reports);
                            // 絶対パスとは限らない。フォルダーを指していることもある。
                            string sFpath = ec_Fpath.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports);

                            //フォルダー列値を取得。
                            string sNamevar_Folder_Src;
                            if (o_Table_Variables.DataTable.Columns.Contains(NamesFld.S_FOLDER))
                            {
                                String_HumaninputImpl.TryParse(row[NamesFld.S_FOLDER], out sNamevar_Folder_Src, "", "", log_Method, log_Reports);

                                //フォルダーパス
                                Expression_Node_Filepath ec_Folder = this.Owner_MemoryApplication.MemoryVariables.GetExpressionfilepathByVariablename(new Expression_Leaf_StringImpl(sNamevar_Folder_Src, null, cur_Cf), false, log_Reports);
                                if (null != ec_Folder)
                                {
                                    // FOLDER列に入力があれば。

                                    string sFpath_Folder = ec_Folder.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports);
                                    if (sValue_Var.StartsWith(sFpath_Folder))
                                    {
                                        // FOLDER列値をそのままキープ。
                                        sb.Append(sNamevar_Folder_Src);

                                        // 値のフォルダー部分を削る。
                                        sValue_Var = sValue_Var.Substring(sFpath_Folder.Length);

                                        // 先頭が ディレクトリー区切り文字なら削る。
                                        if (sValue_Var.StartsWith(System.IO.Path.DirectorySeparatorChar.ToString()))
                                        {
                                            sValue_Var = sValue_Var.Substring(System.IO.Path.DirectorySeparatorChar.ToString().Length);
                                        }
                                    }
                                    else
                                    {
                                        // FOLDER列値はそのまま使えない。
                                    }
                                }

                                sb.Append(",");
                            }

                            if (o_Table_Variables.DataTable.Columns.Contains(NamesFld.S_VALUE))
                            {
                                //string sValue;
                                //String_HumaninputImpl.TryParse(row[NamesFld.S_VALUE], out sValue, "", "", log_Method, log_Reports);
                                //sb.Append(sValue);
                                //sb.Append(",");

                                // 現在の変数の値(の削った残り)を入れる。
                                sb.Append(sValue_Var);
                                sb.Append(",");
                            }
                        }
                        else// if (NamesVar.Test_String(sName_Var))
                        {
                            // FOLDER列値は無し。
                            sb.Append(",");

                            if (o_Table_Variables.DataTable.Columns.Contains(NamesFld.S_VALUE))
                            {
                                // 現在の変数の値を入れる。
                                sb.Append(sValue_Var);
                                sb.Append(",");
                            }
                        }

                        sb.Append(NamesFld.S_END);
                        sb.Append(Environment.NewLine);

                        nAuto++;
                    }

                    //ファイル書出し
                    {
                        Expression_Node_Filepath ec_Fpath_Logs = this.Owner_MemoryApplication.MemoryVariables.GetExpressionfilepathByVariablename(new Expression_Leaf_StringImpl(NamesVar.S_SP_LOGS, null, cur_Cf), true, log_Reports);

                        string sFpatha_LogVariables = ec_Fpath_Logs.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports) + System.IO.Path.DirectorySeparatorChar + NamesFile.S_SAVE_VARIABLES;

                        if (log_Reports.Successful)
                        {
                            CsvWriterImpl writer = new CsvWriterImpl();
                            writer.Write(
                                sb.ToString(),
                                sFpatha_LogVariables,
                                true
                                );
                        }
                    }
                }
            }



            //
            // メッセージボックスの表示。
            {
                StringBuilder sb = new StringBuilder();
                sb.Append(this.GetType().Name);
                sb.Append("#Execute6_Sub:");
                sb.Append(Environment.NewLine);
                string sArgMessage;
                this.TrySelectAttribute(out sArgMessage, Expression_Node_Function45Impl.PM_MESSAGE, EnumHitcount.One_Or_Zero, log_Reports);

                sb.Append(sArgMessage);

                MessageBox.Show(sb.ToString(), "変数をCSVファイルに書き出したい。");
            }

            log_Method.EndMethod(log_Reports);
        }