//────────────────────────────────────────
        protected void Execute6_Sub(
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);
            log_Method.BeginMethod(Info_Functions.Name_Library, this, "Execute6_Sub", log_Reports);

            if (log_Reports.CanStopwatch)
            {
                string sFncName0;
                this.TrySelectAttribute(out sFncName0, PmNames.S_NAME.Name_Pm, EnumHitcount.One_Or_Zero, log_Reports);
                log_Method.Log_Stopwatch.Message = "Nアクション[" + sFncName0 + "]実行";
                log_Method.Log_Stopwatch.Begin();
            }
            //
            //

            //
            // 変数名
            Expression_Node_String ec_ArgTo;
            this.TrySelectAttribute(out ec_ArgTo, Expression_Node_Function37Impl.PM_TO, EnumHitcount.One, log_Reports);

            XenonNameImpl o_Name_Var = new XenonNameImpl(
                ec_ArgTo.Execute4_OnExpressionString(EnumHitcount.Unconstraint,log_Reports),
                ec_ArgTo.Cur_Configuration
                );

            if (log_Reports.Successful)
            {
                string sArgFrom;
                this.TrySelectAttribute(out sArgFrom, Expression_Node_Function37Impl.PM_FROM, EnumHitcount.One, log_Reports);

                //
                // 変数 (暫定、文字列型と決め打ち)
                this.Owner_MemoryApplication.MemoryVariables.SetStringValue(
                    o_Name_Var,
                    sArgFrom,
                    true,
                    log_Reports
                    );
            }

            //
            //
            log_Method.EndMethod(log_Reports);
        }
Example #2
0
        //────────────────────────────────────────
        public void TryGetTable_Variables(
            out Table_Humaninput out_xenonTable_Variables,
            String filepath_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, "TryGetTable_Variables",log_Reports);

            out_xenonTable_Variables = null;

            //『Sp:Variables;』で指定されているテーブル
            XenonName xenonName_Variable = new XenonNameImpl(NamesVar.S_SP_VARIABLES, new Configurationtree_NodeImpl("!ハードコーディング_MoNorenImpl#LoadVariables", null));

            //
            // 「変数設定ファイル」のファイルパス。
            //
            log_Reports.Log_Callstack.Push(log_Method, "①");
            Expression_Node_Filepath ec_Fpath_Variables = this.Owner_MemoryApplication.MemoryVariables.GetExpressionfilepathByVariablename(
                new Expression_Leaf_StringImpl(xenonName_Variable.SValue, null, xenonName_Variable.Cur_Configuration),
                false,//必須ではありません。未該当であればヌルを返します。
                log_Reports
                );
            log_Reports.Log_Callstack.Pop(log_Method, "①");

            if (log_Reports.Successful)
            {
                if (null == ec_Fpath_Variables)
                {
                    //
                    // "Sp:Variables;" が未指定の場合、何もしません。
                    //
                    goto gt_EndMethod;
                }
            }

            //指定されていた場合。
            if (log_Reports.Successful)
            {
                //
                // CSVソースファイル読取
                //
                CsvTo_Table_HumaninputImpl reader = new CsvTo_Table_HumaninputImpl();

                Request_ReadsTable request_tblReads = new Request_ReadsTableImpl();
                Format_Table_Humaninput tblFormat_puts = new Format_Table_HumaninputImpl();
                request_tblReads.Name_PutToTable = NamesVar.S_ST_VARIABLES2;
                request_tblReads.Expression_Filepath = ec_Fpath_Variables;

                out_xenonTable_Variables = reader.Read(
                    request_tblReads,
                    tblFormat_puts,
                    true,
                    log_Reports
                    );
            }

            goto gt_EndMethod;
            //
            gt_EndMethod:
            log_Method.EndMethod(log_Reports);
        }
        //────────────────────────────────────────
        /// <summary>
        /// 今日の分のバックアップを取ります。
        /// </summary>
        public override string Execute5_Main(Log_Reports log_Reports)
        {
            //
            //
            //
            //()メソッド開始
            //
            //
            //
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);
            log_Method.BeginMethod(Info_Functions.Name_Library, this, "Execute5_Main",log_Reports);

            if (this.EnumEventhandler == EnumEventhandler.O_Lr)
            {
                // 日付毎のバックアップ(バックアップ対象ファイルを、設定ファイルから読取り後)
                if (log_Reports.Successful)
                {
                    // 正常時

                    // 1日につき1回まで、バックアップを取ります。
                    DatebackupImpl dateBackup = new DatebackupImpl();

                    dateBackup.Keptbackups = this.Owner_MemoryApplication.MemoryBackup.BackupKeptbackups;

                    // アプリケーション個別に付ける「フォルダ・サブ名」
                    dateBackup.Name_Sub = this.Owner_MemoryApplication.MemoryBackup.Name_SubFolder;

                    //
                    // バックアップ・フォルダー
                    //
                    Expression_Node_Filepath ec_Fopath_BackupBase;
                    {
                        XenonNameImpl o_Name_Variable = new XenonNameImpl(
                            NamesVar.S_SP_BACKUP_FOLDER,
                            new Configurationtree_NodeImpl("!ハードコーディング_ExAction00031#", null)
                            );

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

                        // フォルダーパス。
                        log_Reports.Log_Callstack.Push(log_Method, "⑥");
                        ec_Fopath_BackupBase = this.Owner_MemoryApplication.MemoryVariables.GetExpressionfilepathByVariablename(
                            ec_Atom,
                            true,
                            log_Reports
                            );
                        log_Reports.Log_Callstack.Pop(log_Method, "⑥");
                    }

                    dateBackup.List_Expression_Filepath_Request = this.Expression_FilepathList_Backup;// バックアップ対象のファイルのパス一覧。
                    dateBackup.Expression_Filepath_Backuphome = ec_Fopath_BackupBase;
                    dateBackup.Name_Sub = this.Owner_MemoryApplication.MemoryBackup.Name_SubFolder;
                    dateBackup.Perform(log_Reports);
                }
            }

            goto gt_EndMethod;
            //
            //
            gt_EndMethod:
            log_Method.EndMethod(log_Reports);
            return "";
        }
        /// <summary>
        /// (17)「新規ウィンドウを開く」前にしておく独自実装をするタイミング。
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="eventMonitor_Dammy"></param>
        /// <param name="log_Reports"></param>
        protected virtual void On_P17a_PreviousBackup(
            object sender,
            MemoryAaeditorxml_Editor 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(1, Log_ReportsImpl.BDebugmode_Static);
            log_Method.BeginMethod(Info_Functions.Name_Library, this, "On_P17a_PreviousOpenWindow_Backup",log_Reports);

            //
            //
            //
            //(6)バックアップ・フォルダーのオーナー名。例えば aaa なら、2009年12月3日のフォルダー名は 20091203_aaa になります。
            //
            //
            //
            if (log_Reports.Successful)
            {
                this.Owner_MemoryApplication.MemoryBackup.Configurationtree_Name_SubFolder = moAaeditorxml_Editor.Dictionary_Fsetvar_Configurationtree.GetFsetvar(
                    NamesVar.S_SS_BACKUP_NAME_MY_FOLDER, false, log_Reports);
                if (!log_Reports.Successful)
                {
                    // 既エラー。
                    goto gt_EndMethod;
                }
            }

            //
            //
            //
            //(7)取り置きするバックアップ・フォルダーの数。1日1回バックアップを取っているのなら、10 に設定すれば、10日分のバックアップが取り置きされることになります。
            //
            //
            //
            if (log_Reports.Successful)
            {
                this.Owner_MemoryApplication.MemoryBackup.Configurationtree_BackupKeptbackups = moAaeditorxml_Editor.Dictionary_Fsetvar_Configurationtree.GetFsetvar(
                    NamesVar.S_SI_BACKUP_KEPT_BACKUPS, false, log_Reports);
                if (!log_Reports.Successful)
                {
                    // 既エラー。
                    goto gt_EndMethod;
                }
            }
            //
            //
            //
            // バックアップ・フォルダー ファイルパス有無チェック。
            //
            //
            //
            if (log_Reports.Successful)
            {
                XenonNameImpl o_Name_Variable = new XenonNameImpl(NamesVar.S_SP_BACKUP_FOLDER, new Configurationtree_NodeImpl("!ハードコーディング_ExAction00022#", null));

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

                // ファイルパス。
                log_Reports.Log_Callstack.Push(log_Method, "①");
                Expression_Node_Filepath ec_Fpath_Exports = this.Owner_MemoryApplication.MemoryVariables.GetExpressionfilepathByVariablename(
                    ec_Atom,
                    true,
                    log_Reports
                    );
                log_Reports.Log_Callstack.Pop(log_Method, "①");

                this.TestExists_EmptyFilePath(
                    "BackupBaseDirectory",
                    ec_Fpath_Exports,
                    ec_Fpath_AaEditorXml.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports),
                    log_Reports
                );
            }

            //
            //
            //
            // バックアップ数 文字列有無チェック。
            //
            //
            //
            if (log_Reports.Successful)
            {
                Configurationtree_Node cf_Fsetvar = this.Owner_MemoryApplication.MemoryBackup.Configurationtree_BackupKeptbackups;

                string sValue;
                cf_Fsetvar.Dictionary_Attribute.TryGetValue(PmNames.S_VALUE, out sValue, true, log_Reports);

                this.TestExists_String(
                    "DateBackupKeptbackups",
                    sValue,
                    ec_Fpath_AaEditorXml.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports),
                    log_Reports
                );
            }

            //
            //
            //
            // バックアップ・フォルダー名 文字列有無チェック。
            //
            //
            //
            if (log_Reports.Successful)
            {
                Configurationtree_Node cf_Fsetvar = this.Owner_MemoryApplication.MemoryBackup.Configurationtree_Name_SubFolder;

                string sValue;
                cf_Fsetvar.Dictionary_Attribute.TryGetValue(PmNames.S_VALUE, out sValue, true, log_Reports);

                this.TestExists_String(
                    "DateBackupFolderOwnerName",
                    sValue,
                    ec_Fpath_AaEditorXml.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports),
                    log_Reports
                );
            }

            // 保管するバックアップ数(日毎)
            if (log_Reports.Successful)
            {
                int nBackups;
                {
                    Configurationtree_Node cf_Fsetvar = this.Owner_MemoryApplication.MemoryBackup.Configurationtree_BackupKeptbackups;

                    string sValue;
                    cf_Fsetvar.Dictionary_Attribute.TryGetValue(PmNames.S_VALUE, out sValue, true, log_Reports);

                    if (!int.TryParse(sValue, out nBackups))
                    {
                        // エラー。
                        this.Owner_MemoryApplication.MemoryBackup.BackupKeptbackups = 0;
                    }
                    else
                    {
                        this.Owner_MemoryApplication.MemoryBackup.BackupKeptbackups = nBackups;
                    }
                }

                // バックアップ・フォルダーのサブ名。例えば aaa なら、2009年12月3日のフォルダー名は 20091203_aaa になります。
                {
                    Configurationtree_Node cf_Fsetvar = this.Owner_MemoryApplication.MemoryBackup.Configurationtree_Name_SubFolder;

                    string sValue;
                    cf_Fsetvar.Dictionary_Attribute.TryGetValue(PmNames.S_VALUE, out sValue, true, log_Reports);

                    this.Owner_MemoryApplication.MemoryBackup.Name_SubFolder = sValue;
                }
            }

            goto gt_EndMethod;
            //
            //
            gt_EndMethod:
            log_Method.EndMethod(log_Reports);
        }
        //────────────────────────────────────────
        protected void Execute6_Sub(
            object sender,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0);
            log_Method.BeginMethod(Info_Functions.Name_Library, this, "Execute6_Sub", log_Reports);

            if (log_Reports.CanStopwatch)
            {
                string sFncName;
                this.TrySelectAttribute(out sFncName, PmNames.S_NAME.Name_Pm, EnumHitcount.One_Or_Zero, log_Reports);
                log_Method.Log_Stopwatch.Message = "Nアクション[" + sFncName + "]実行";
                log_Method.Log_Stopwatch.Begin();
            }

            string err_SFcName;
            string err_SFcTypeName;
            if (log_Reports.Successful)
            {
                // 変数名が入っているはず。
                Expression_Node_String ec_ArgNameVariable;
                this.TrySelectAttribute(out ec_ArgNameVariable, Expression_Node_Function43Impl.PM_NAME_VAR, EnumHitcount.One_Or_Zero, log_Reports);
                string sVariableName = ec_ArgNameVariable.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports);

                Expression_Node_String ec_ArgFcName;
                this.TrySelectAttribute(out ec_ArgFcName, Expression_Node_Function43Impl.PM_NAME_CONTROL, EnumHitcount.One_Or_Zero, log_Reports);
                List<Usercontrol> list_UcFc = this.Owner_MemoryApplication.MemoryForms.GetUsercontrolsByName(ec_ArgFcName, true, log_Reports);
                foreach (Usercontrol uct in list_UcFc)
                {
                    if (uct is UsercontrolCheckbox)
                    {
                        // チェックボックスの場合。
                        CustomcontrolCheckbox ccChk = ((UsercontrolCheckbox)uct).CustomcontrolCheckbox1;
                        string sBool = ccChk.Checked.ToString();//TRUE or FALSE

                        XenonName o_VariableName = new XenonNameImpl(sVariableName, this.Cur_Configuration);

                        // 変数を上書き。
                        this.Owner_MemoryApplication.MemoryVariables.SetStringValue(
                            o_VariableName,
                            sBool,
                            true,
                            log_Reports
                            );
                    }
                    else
                    {
                        // エラー
                        err_SFcName = uct.ControlCommon.Expression_Name_Control.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports);
                        err_SFcTypeName = uct.GetType().Name;
                        goto gt_Error_UndefinedUc;
                    }

                }
            }

            goto gt_EndMethod;
            //
            //
            #region 異常系
            //────────────────────────────────────────
            gt_Error_UndefinedUc:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, err_SFcName, log_Reports);//コントロール名
                tmpl.SetParameter(2, err_SFcTypeName, log_Reports);//コントロールの型名

                this.Owner_MemoryApplication.CreateErrorReport("Er:110026;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
            gt_EndMethod:
            log_Method.EndMethod(log_Reports);
        }
        //────────────────────────────────────────
        /// <summary>
        /// 項目の文字列。
        /// </summary>
        /// <param name="e"></param>
        /// <param name="cctLst"></param>
        /// <param name="log_Reports"></param>
        /// <returns></returns>
        public override string P1_GetItemString(
            int nCurIx,//DrawItemEventArgs e,//e.Index
            CustomcontrolListbox cctLst,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);
            log_Method.BeginMethod(Info_MiddleImpl.Name_Library, this, "P1_GetItemLabel",log_Reports);
            //
            //

            string sDisplayText;

            // ↓2012-01-20 追加
            if (nCurIx < cctLst.List_SText_Display.Count)
            {
                sDisplayText = cctLst.List_SText_Display[nCurIx];
                if (null != sDisplayText)
                {
                    goto gt_EndMethod;
                }
            }

            //
            // 項目の数だけ呼び出される。
            // 処理はできるだけ軽く。

            if (null == this.Expression_ItemLabel)
            {
                sDisplayText = "(" + Info_MiddleImpl.Name_Library + "#P1_GetItemString:リストボックスに<a-item-label>が指定されていません)";
                goto gt_EndMethod;
            }

            //
            // dataRowViewが入っている。
            DataRowView dataRowView = (DataRowView)cctLst.Items[nCurIx];
            //
            //
            // ID値を取得し、キー値とする。
            int nKey;
            Int_HumaninputImpl.TryParse(// ※仮。
                dataRowView.Row["ID"],
                out nKey,
                EnumOperationIfErrorvalue.Error,
                -1,
                log_Reports
                );
            if (!log_Reports.Successful)
            {
                // エラー
                sDisplayText = "(エラー発生中)";
                goto gt_EndMethod;
            }

            if (log_Reports.Successful)
            {
                string sKey = nKey.ToString(); // ※仮。

                //
                // value-variable-name="" 属性
                if (null == this.Expression_ValueVariableName)
                {
                    //
                    // エラー。
                    sDisplayText = "(変数名取得失敗)";
                    goto gt_Error_NullValueVariableName;
                }
                else
                {
                    //
                    // 変数名取得。

                    StringBuilder sbHint = new StringBuilder();
                    sbHint.Append(Info_MiddleImpl.Name_Library);
                    sbHint.Append(":");
                    sbHint.Append(this.GetType().Name);
                    Configurationtree_Node parent_Configurationtree_Node = new Configurationtree_NodeImpl(sbHint.ToString(), null);

                    string sVariableName = this.Expression_ValueVariableName.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports);
                    XenonNameImpl o_Name_Variable = new XenonNameImpl(sVariableName, parent_Configurationtree_Node);

                    //ystem.Console.WriteLine(this.GetType().Name + "#P1_GetItemLabel: sVariableName=[" + sVariableName + "] sValue=[" + sValue + "]");

                    //
                    // ループカウンター変数に、キー値を上書き。
                    this.Owner_MemoryApplication.MemoryVariables.SetStringValue(
                        o_Name_Variable,
                        sKey,
                        true,
                        log_Reports
                        );
                }

                //
                // 表示文字列。
                sDisplayText = this.Expression_ItemLabel.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports);
            }
            else
            {
                sDisplayText = "(エラー発生中)";
                goto gt_EndMethod;
            }

            if (!log_Reports.Successful)
            {
                sDisplayText = "(エラー発生中)";
                goto gt_EndMethod;
            }

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

                StringBuilder t = new StringBuilder();
                t.Append("<view>の<f-listbox-for-items>に、");
                t.Append(Environment.NewLine);
                t.Append("value-variable-name=””属性がありませんでした。");

                t.Append(Environment.NewLine);
                t.Append("コントロール名=[");
                t.Append(cctLst.ControlCommon.Expression_Name_Control.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports));
                t.Append("]");

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

            // ↓2012-01-20 追加
            while (cctLst.List_SText_Display.Count <= nCurIx)
            {
                cctLst.List_SText_Display.Add(null);
            }
            cctLst.List_SText_Display[nCurIx] = sDisplayText;

            log_Method.EndMethod(log_Reports);
            return sDisplayText;
        }
Example #7
0
        //────────────────────────────────────────
        /// <summary>
        /// エラーログを出力します。(エラーが発生したときに呼び出してください)
        /// </summary>
        /// <param oVariableName="output_d_Logging"></param>
        /// <param name="runningHintName">このメソッドが呼び出された場所が分かるようなヒント。</param>
        public void WriteErrorLog(
            MemoryApplication moApplication,
            Log_Reports log_ReportsBuffer_Output,
            string sRunningHintName
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0);
            // メタ。
            Log_Reports log_Reports_Meta = new Log_ReportsImpl(log_Method);
            log_Method.BeginMethod(Info_MiddleImpl.Name_Library, this, "WriteErrorLog",log_Reports_Meta);

            //

            //
            // 書き出すテキスト
            //
            string sOutput;
            {
                sOutput = log_ReportsBuffer_Output.ToText();
            }

            //
            // 書き出し先ファイルへのパス
            //
            Expression_Node_Filepath ec_Fpath;
            if (log_Reports_Meta.Successful)
            {
                XenonName o_Name_Variable = new XenonNameImpl(NamesVar.S_SP_LOGS, new Configurationtree_NodeImpl("!ハードコーディング_MoOpyopyoImpl#WriteLog", null));

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

                // ファイルパス。
                log_Reports_Meta.Log_Callstack.Push(log_Method, "③");
                ec_Fpath = moApplication.MemoryVariables.GetExpressionfilepathByVariablename(
                    ec_Atom,
                    true,
                    log_Reports_Meta
                    );
                log_Reports_Meta.Log_Callstack.Pop(log_Method, "③");
            }
            else
            {
                ec_Fpath = null;
            }

            //
            // ファイルの書き出し
            //
            string err_SFpatha;
            {
                string sFpatha;

                if (log_Reports_Meta.Successful)
                {
                    // フォルダーへの絶対パス
                    string sFopatha_Logs = ec_Fpath.Execute4_OnExpressionString(
                        EnumHitcount.Unconstraint, log_Reports_Meta);
                    if (!log_Reports_Meta.Successful)
                    {
                        // 既エラー。
                        goto gt_EndMethod;
                    }

                    Expression_Node_Filepath ec_Fpath2;
                    {
                        Configurationtree_Node parent_Cf = new Configurationtree_NodeImpl("!ハードコーディング_MoOpyopyoImpl#WriteLog", null);

                        Configurationtree_NodeFilepath cf_Fpath = new Configurationtree_NodeFilepathImpl("ファイルパス出典未指定L09Mid_6", parent_Cf);
                        cf_Fpath.InitPath(
                            sFopatha_Logs,
                            "error-log.txt",
                            log_Reports_Meta
                            );
                        if (!log_Reports_Meta.Successful)
                        {
                            // 既エラー。
                            goto gt_EndMethod;
                        }

                        ec_Fpath2 = new Expression_Node_FilepathImpl(cf_Fpath);
                    }

                    sFpatha = ec_Fpath2.Execute4_OnExpressionString(
                        EnumHitcount.Unconstraint, log_Reports_Meta);
                }
                else
                {
                    sFpatha = "<エラー>";
                }

                if (log_Reports_Meta.Successful)
                {

                    try
                    {
                        System.IO.File.WriteAllText(sFpatha, sOutput, Global.ENCODING_LOG);

                        //#正常な、エラー出力
                        StringBuilder s0 = new StringBuilder();
                        s0.Append("エラーが発生しました!");
                        s0.Append(Environment.NewLine);
                        s0.Append(Environment.NewLine);
                        s0.Append("アプリケーションは正常に動作していない可能性があります。");
                        s0.Append(Environment.NewLine);
                        s0.Append(Environment.NewLine);
                        s0.Append("エラーログを書き出しました。");
                        s0.Append(Environment.NewLine);
                        s0.Append("[");
                        s0.Append(sFpatha);
                        s0.Append("]");
                        s0.Append(Environment.NewLine);
                        s0.Append(Environment.NewLine);
                        s0.Append("このアプリケーションの開発者にエラーログをお知らせください。");

                        MessageBox.Show(
                            s0.ToString(),
                            "▲エラーが発生しました! " + Info_MiddleImpl.Name_Library + ":" + this.GetType().Name + "#WriteErrorLog");
                    }
                    catch (Exception)
                    {
                        err_SFpatha = sFpatha;
                        goto gt_Error_CanNotWriteErrorLog;
                    }
                }
                else
                {
                    // メタのロガーが、エラーを検知。
                    goto gt_Error_MetaNotSuccessful;
                }
            }

            goto gt_EndMethod;
            //
            //
            #region 異常系
            //────────────────────────────────────────
            gt_Error_CanNotWriteErrorLog:
            {
                StringBuilder s0 = new StringBuilder();

                s0.Append("▲312!エラーが発生しましたが、エラーログを出力できませんでした。(");
                s0.Append(Info_MiddleImpl.Name_Library);
                s0.Append(") ファイルパス=[");
                s0.Append(err_SFpatha);
                s0.Append("]");

                MessageBox.Show(sOutput, s0.ToString());
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            gt_Error_MetaNotSuccessful:
            {
                Log_TextIndented s0 = new Log_TextIndentedImpl();
                s0.Append("エラーが発生しましたが、エラーログを出力できませんでした。");
                s0.Newline();
                s0.Newline();

                s0.Append("もしかして?");
                s0.Newline();

                s0.Append(" ・設定ファイルの「エラーログの書出し先」を読み込む前に、エラーが出てしまった?");
                s0.Newline();
                s0.Append(" ・「ログファイル書き出し先」は指定されていますか?");
                s0.Newline();
                s0.Newline();

                s0.Append("実行箇所ヒント:");
                s0.Newline();
                s0.Append(" ・");
                s0.Append(sRunningHintName);
                s0.Newline();
                s0.Newline();

                MessageBox.Show(
                    s0.ToString(), //sOutput,
                    "▲エラー!【Er:101;】(" + log_Method.Fullname + ")");
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
            gt_EndMethod:
            log_Method.EndMethod(log_Reports_Meta);
            return;
        }
        //────────────────────────────────────────
        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);
        }