コード例 #1
0
        //────────────────────────────────────────

        /// <summary>
        /// 内容を文字列型で返します。
        /// </summary>
        /// <param name="log_Reports"></param>
        /// <returns></returns>
        public virtual string Execute4_OnExpressionString(
            EnumHitcount request,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl();

            log_Method.BeginMethod(Info_Syntax.Name_Library, this, "Execute4_OnExpressionString①", log_Reports);
            //
            //

            string sResult;

            sResult = this.Execute5_Main(log_Reports);

            //
            //
            //
            //

            // もとに戻す
            this.enumHitcount = EnumHitcount.Unconstraint;

            goto gt_EndMethod;
            //
            //
gt_EndMethod:
            log_Method.EndMethod(log_Reports);
            return(sResult);
        }
コード例 #2
0
        //────────────────────────────────────────
        /// <summary>
        /// 「ツール設定ウィンドウ」を開きます。
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="eventMonitor"></param>
        /// <param name="log_Reports"></param>
        public override string Execute5_Main(Log_Reports log_Reports)
        {
            Log_Method log_Method = new Log_MethodImpl(0);
            log_Method.BeginMethod(Info_Functions.Name_Library, this, "Execute5_Main",log_Reports);

            if (this.EnumEventhandler == EnumEventhandler.O_Lr)
            {
                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();
                }

                //
                //
                //
                //

                // ツール設定モデルを共有します。
                this.Owner_MemoryApplication.MemoryForms.MemoryAatoolxmlDialog.MemoryAatoolxml = this.Owner_MemoryApplication.MemoryAatoolxml;

                // 「SelectedIndexイベント」を必ず動かすために、リストボックスを空にします。
                this.Owner_MemoryApplication.MemoryForms.Form_Toolwindow.Clear();

                // ダイアログボックスを出します。
                ((Form)this.Owner_MemoryApplication.MemoryForms.Form_Toolwindow).ShowDialog(this.Owner_MemoryApplication.MemoryForms.Mainwnd_FormWrapping.Form);
            }

            log_Method.EndMethod(log_Reports);
            return "";
        }
コード例 #3
0
        //────────────────────────────────────────

        /// <summary>
        /// 絶対パスが、ファイルシステムで使えるファイルパスの文字列の長さの制限を越えていれば真。
        /// </summary>
        /// <param name="newDirectoryPath">指定するものがない場合は、System.Windows.Forms.StartupPath を入れてください。</param>
        /// <param name="newHumanInputFilePath"></param>
        /// <param name="cElm"></param>
        public static bool IsTooLong(
            string folderRel_New,
            string fileRel_Humaninput_New,
            Log_Reports log_Reports,
            Conf_String cElm
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0);

            log_Method.BeginMethod(Info_Syntax.Name_Library, "Util_Filepath", "IsTooLong", log_Reports);

            // フラグ。
            bool bFlagCheckPathTooLong = false;

            if (log_Reports.Successful)
            {
                // チェック。絶対パスにすることができればOK。
                Util_Filepath.ToAbsolute(
                    folderRel_New,
                    fileRel_Humaninput_New,
                    ref bFlagCheckPathTooLong,
                    true,        //ファイル名の長さが上限超過でも、正常処理扱いとします。
                    log_Reports, // out sErrorMsg,
                    cElm
                    );
            }

            goto gt_EndMethod;
            //
            //
gt_EndMethod:
            log_Method.EndMethod(log_Reports);
            return(bFlagCheckPathTooLong);
        }
コード例 #4
0
        //────────────────────────────────────────

        /// <summary>
        /// 内容を文字列型で返します。
        /// </summary>
        /// <param name="log_Reports"></param>
        /// <returns></returns>
        public virtual string Lv4Execute_OnImplement(
            EnumHitcount request,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl();

            log_Method.BeginMethod(Info_Syntax.Name_Library, this, "Lv4Execute_OnImplement①", log_Reports);
            //
            //

            string result = this.Lv5_Implement(log_Reports);

            //
            //
            //
            //

            // もとに戻す
            this.enumHitcount = EnumHitcount.Unconstraint;

            goto gt_EndMethod;
            //
            //
gt_EndMethod:
            log_Method.EndMethod(log_Reports);
            return(result);
        }
コード例 #5
0
        //────────────────────────────────────────

        /// <summary>
        /// 子要素を追加します。
        /// </summary>
        /// <param name="sName"></param>
        /// <param name="nItem"></param>
        /// <param name="request"></param>
        /// <param name="log_Reports"></param>
        public void Set(
            string sName,
            Expression_Node_String ec_Item,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0);

            log_Method.BeginMethod(Info_Syntax.Name_Library, this, "Set", log_Reports);


            if (!this.dicExpression_Item.ContainsKey(sName))
            {
                // 新規項目なら

                // そのまま追加。
                this.dicExpression_Item.Add(sName, ec_Item);
            }
            else
            {
                // 既存項目なら

                // 上書きします。
                this.dicExpression_Item.Remove(sName);
                this.dicExpression_Item.Add(sName, ec_Item);


                if (log_Method.CanDebug(1))
                {
                    log_Method.WriteDebug_ToConsole(" 既に追加されていた項目を削除して、上書きしました。[" + sName + "]");
                }
            }

            log_Method.EndMethod(log_Reports);
        }
コード例 #6
0
        //────────────────────────────────────────
        /// <summary>
        /// 例えば ("access",”from”)と指定すれば、
        /// 指定リストの要素の中で <~ access=”from,to”> といった属性を持つものはヒットする。
        /// 
        /// 選択アイテムをリストから除外するなら bRemove=true にします。
        /// </summary>
        /// <param name="sName"></param>
        /// <param name="sExpectedValue"></param>
        /// <param name="request_Items"></param>
        /// <param name="log_Reports"></param>
        /// <returns></returns>
        public static List<Expression_Node_String> SelectItemsByPmAsCsv(
            List<Expression_Node_String> ecList_Item, string sPmName, string sExpectedValue,
            bool bRemove, EnumHitcount hits, Log_Reports log_Reports)
        {
            Log_Method pg_Method = new Log_MethodImpl(0);
            pg_Method.BeginMethod(Info_Controls.Name_Library, "Util_E_NodeImpl", "SelectItemsByAttrAsCsv",log_Reports);
            //
            //
            //Util_E_NodeImpl dammy_This = new Util_E_NodeImpl();

            List<Expression_Node_String> ecList_Result;
            ecList_Result =  Utility_Expression_NodeImpl.SelectItemsByPmAsCsv_Full_(
                ecList_Item,
                sPmName,
                false,
                sExpectedValue,
                bRemove,
                hits,
                log_Reports
                );

            goto gt_EndMethod;
            //
            //
            gt_EndMethod:
            pg_Method.EndMethod(log_Reports);

            // 正常終了
            return ecList_Result;
        }
コード例 #7
0
        //────────────────────────────────────────
        public static void ParseChild_InAnotherLibrary(
            Configurationtree_Node cur_Cf,
            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, "SToE_AbstractImpl", "ParseChild_InAnotherLibrary",log_Reports);

            ConfigurationtreeToExpression_F14n16 dammy = new ConfigurationtreeToExpression_F14_FncImpl_();//メソッドが使いたいだけなので、何でもいい。
            dammy.ParseChild_InConfigurationtreeToExpression(
                cur_Cf,
                parent_Expr,
                memoryApplication,
                pg_ParsingLog,
                log_Reports
                );

            goto gt_EndMethod;
            //
            //
            gt_EndMethod:

            if (Log_ReportsImpl.BDebugmode_Static)
            {
                //d_ParsingLog.Decrement(s_Cur.Name_Node);
            }
            log_Method.EndMethod(log_Reports);
        }
コード例 #8
0
        //────────────────────────────────────────
        /// <summary>
        /// アクション実行。
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        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)
            {
                this.Execute6_Sub(
                    log_Reports
                    );
            }
            else if (this.EnumEventhandler == EnumEventhandler.O_Ea)
            {
                this.Execute6_Sub(
                    log_Reports
                    );

            }

            //
            //
            log_Method.EndMethod(log_Reports);
            return "";
        }
コード例 #9
0
        //────────────────────────────────────────

        /// <summary>
        /// 新しいインスタンスを作ります。
        /// </summary>
        /// <param name="log_Reports"></param>
        /// <returns></returns>
        public Expression_Leaf_String NewInstance(
            Configuration_Node parent_Expression,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl();

            log_Method.BeginMethod(Info_Syntax.Name_Library, this, "NewInstance", log_Reports);

            //
            //
            //
            //

            Expression_Leaf_StringImpl result = new Expression_Leaf_StringImpl(null, parent_Expression);

            result.SetString(
                this.sHumanInput,
                log_Reports
                );

            //
            //
            log_Method.EndMethod(log_Reports);
            return(result);
        }
コード例 #10
0
ファイル: MemoryGridsImpl.cs プロジェクト: muzudho/CSVExE
        //────────────────────────────────────────
        /// <summary>
        /// グリッド領域を追加します。(エラー対応処理付き)
        /// </summary>
        /// <param name="gridAreaName"></param>
        /// <param name="gridArea"></param>
        /// <param name="log_Reports"></param>
        public void Add(
            string sName_Gridarea,
            Grid gridArea,
            Log_Reports log_Reports,
            string sLogStack
            )
        {
            Log_Method pg_Method = new Log_MethodImpl(0);
            pg_Method.BeginMethod(Info_GridPanel.Name_Library, this, "Add",log_Reports);

            Exception err_Excp;
            try
            {
                this.Dictionary_Item.Add(sName_Gridarea, gridArea);
            }
            catch (Exception e)
            {
                // エラー
                err_Excp = e;
                goto gt_Error_Exception;
            }

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

                StringBuilder t = new StringBuilder();
                t.Append("グリッドパネルの利用");
                t.Append(Environment.NewLine);
                t.Append(Environment.NewLine);
                t.Append("[");
                t.Append(sName_Gridarea);
                t.Append("]要素の追加時に失敗しました。");
                t.Append(Environment.NewLine);
                t.Append(Environment.NewLine);
                t.Append("エラー:");
                t.Append(err_Excp.Message);
                t.Append(Environment.NewLine);
                t.Append(Environment.NewLine);
                t.Append("実行経路ヒント:");
                t.Append(sLogStack);

                r.Message = t.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
            gt_EndMethod:
            pg_Method.EndMethod(log_Reports);
        }
コード例 #11
0
        //────────────────────────────────────────
        /// <summary>
        /// イベントハンドラーの作成。
        /// </summary>
        /// <param name="s_Action"></param>
        /// <param name="log_Reports"></param>
        /// <returns></returns>
        public Expression_Node_Function ConfigurationtreeToFunction(
            Configurationtree_Node action_Conf,
            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, "ConfigurationtreeToFunction",log_Reports);

            if (log_Reports.CanStopwatch)
            {
                log_Method.Log_Stopwatch.Begin();
            }
            //

            Expression_Node_Function expr_Func;
            if (log_Reports.Successful)
            {
                expr_Func = owner_MemoryApplication.MemoryForms.ConfigurationtreeToFunction.Translate(
                    action_Conf,
                    true,
                    log_Reports
                    );
            }
            else
            {
                expr_Func = null;
            }

            goto gt_EndMethod;
            //
            gt_EndMethod:
            log_Method.EndMethod(log_Reports);
            return expr_Func;
        }
コード例 #12
0
        //────────────────────────────────────────
        /// <summary>
        /// 追加。
        /// </summary>
        /// <param name="nItems"></param>
        /// <param name="request"></param>
        /// <param name="log_Reports"></param>
        public void Add(
            Expression_Node_String ec_Child,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0);
            log_Method.BeginMethod(Info_Syntax.Name_Library, this, "Add",log_Reports);

            if (ec_Child is Expression_Node_StringImpl)
            {
                ((Expression_Node_StringImpl)ec_Child).Parent_Expression = this.owner_Expression;
            }
            else if (ec_Child is Expression_Leaf_StringImpl)
            {
                ((Expression_Leaf_StringImpl)ec_Child).Parent_Expression = this.owner_Expression;
            }
            else if (ec_Child is Expression_TexttemplateP1pImpl)
            {
                ((Expression_TexttemplateP1pImpl)ec_Child).Parent_Expression = this.owner_Expression;
            }
            else
            {
                log_Method.WriteWarning_ToConsole(" 想定外のクラス=[" + ec_Child.GetType().Name + "]");
            }
            this.listExpression_Item.Add(ec_Child);

            log_Method.EndMethod(log_Reports);
        }
コード例 #13
0
        //────────────────────────────────────────
        #endregion



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

        /// <summary>
        ///
        /// </summary>
        public void ToText_Snapshot(Log_TextIndented s)
        {
            Log_Method  log_Method = new Log_MethodImpl(0);
            Log_Reports log_Reports_ForSnapshot = new Log_ReportsImpl(log_Method);

            log_Method.BeginMethod(Info_Syntax.Name_Library, this, "ToText_Snapshot", log_Reports_ForSnapshot);

            log_Reports_ForSnapshot.BeginCreateReport(EnumReport.Dammy);
            s.Increment();

            s.Append("「E■[");
            s.Append(this.Cur_Configuration.Name);
            s.Append("] ");
            s.Append(this.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports_ForSnapshot));
            s.Append("」");
            s.Newline();

            goto gt_EndMethod;
            //
            //
gt_EndMethod:
            s.Decrement();
            log_Reports_ForSnapshot.EndCreateReport();
            log_Method.EndMethod(log_Reports_ForSnapshot);
        }
コード例 #14
0
        //────────────────────────────────────────

        /// <summary>
        /// 追加。
        /// </summary>
        /// <param name="nItems"></param>
        /// <param name="request"></param>
        /// <param name="log_Reports"></param>
        public void Add(
            Expression_Node_String ec_Child,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0);

            log_Method.BeginMethod(Info_Syntax.Name_Library, this, "Add", log_Reports);


            if (ec_Child is Expression_Node_StringImpl)
            {
                ((Expression_Node_StringImpl)ec_Child).Parent_Expression = this.owner_Expression;
            }
            else if (ec_Child is Expression_Leaf_StringImpl)
            {
                ((Expression_Leaf_StringImpl)ec_Child).Parent_Expression = this.owner_Expression;
            }
            else if (ec_Child is Expression_TexttemplateP1pImpl)
            {
                ((Expression_TexttemplateP1pImpl)ec_Child).Parent_Expression = this.owner_Expression;
            }
            else
            {
                log_Method.WriteWarning_ToConsole(" 想定外のクラス=[" + ec_Child.GetType().Name + "]");
            }
            this.listExpression_Item.Add(ec_Child);

            log_Method.EndMethod(log_Reports);
        }
コード例 #15
0
        //────────────────────────────────────────
        /// <summary>
        /// アクション実行。
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public override string Execute5_Main(Log_Reports log_Reports)
        {
            Log_Method log_Method = new Log_MethodImpl(0);
            log_Method.BeginMethod(Info_Functions.Name_Library, this, "Execute5_Main",log_Reports);

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

            if (this.EnumEventhandler == EnumEventhandler.O_Ea)
            {
                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 + "]アクションを実行。";
                }

                ListBox pcLst = (ListBox)this.Functionparameterset.Sender;

                this.Execute6_Sub(pcLst, log_Reports);
            }

            log_Method.EndMethod(log_Reports);
            return "";
        }
コード例 #16
0
        //────────────────────────────────────────
        /// <summary>
        /// アクション実行。
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        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);

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

            if (log_Reports.CanStopwatch)
            {
                log_Method.Log_Stopwatch.Message = "「E■[" + sFncName0 + "]アクション」実行(A)";
                log_Method.Log_Stopwatch.Begin();
            }
            //
            //

            if (this.EnumEventhandler == EnumEventhandler.O_Lr)
            {
                this.Execute6_Sub(log_Reports);
            }
            else if (this.EnumEventhandler == EnumEventhandler.O_Ea)
            {
                this.Execute6_Sub(log_Reports);
            }

            goto gt_EndMethod;
            //
            //
            gt_EndMethod:
            log_Method.EndMethod(log_Reports);
            return "";
        }
コード例 #17
0
        //────────────────────────────────────────

        /// <summary>
        /// 設定ファイルに記述されているままのファイル・パス表記。
        ///
        /// 相対パス、絶対パスのどちらでも構わない。
        ///
        /// 例:"Data\\Monster.csv"
        /// </summary>
        /// <param name="newHumanInputFilePath"></param>
        public void SetHumaninput(
            string filepath_Humaninput_New,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0);

            log_Method.BeginMethod(Info_Syntax.Name_Library, this, "SetHumaninput", log_Reports);

            if (this.Cur_Configuration is Configurationtree_NodeFilepath)
            {
                ((Configurationtree_NodeFilepath)this.Cur_Configuration).SetHumaninput(
                    filepath_Humaninput_New,
                    log_Reports
                    );
            }
            else
            {
                // エラー。
                if (log_Reports.CanCreateReport)
                {
                    Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                    r.SetTitle("▲エラー902!", log_Method);

                    Log_TextIndented s = new Log_TextIndentedImpl();
                    s.Append(Environment.NewLine);
                    s.Append("#SetSHumanInput:型が違います。[" + this.Cur_Configuration.GetType().Name + "]");

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

            log_Method.EndMethod(log_Reports);
        }
コード例 #18
0
        //────────────────────────────────────────
        /// <summary>
        /// 内容をデバッグ出力します。
        /// </summary>
        public void CreateMessage_Debug(Log_Reports log_Reports)
        {
            Log_Method log_Method = new Log_MethodImpl(0);
            Log_Reports d_Logging_Dammy = new Log_ReportsImpl(log_Method);
            log_Method.BeginMethod(Info_MiddleImpl.Name_Library, this, "CreateMessage_Debug",d_Logging_Dammy);
            //
            //

            //ystem.Console.WriteLine(this.GetType().Name + "#DebugWrite: 【デバッグ出力】 project要素の個数=[" + this.Items.Count + "]");

            foreach (MemoryAatoolxml_Editor aatool_Editor in this.Dictionary_Item.Values)
            {
                //ystem.Console.WriteLine(this.GetType().Name + "#DebugWrite: 【デバッグ出力】 project名=[" + st_Project.Name + "]");

                aatool_Editor.WriteDebug_ToConsole(aatool_Editor.Dictionary_Fsetvar_Configurationtree, log_Reports);
            }

            //
            //
            d_Logging_Dammy.EndCreateReport();
            log_Method.EndMethod(d_Logging_Dammy);
            if (!d_Logging_Dammy.Successful)
            {
                log_Method.WriteDebug_ToConsole(d_Logging_Dammy.ToText());
            }
        }
コード例 #19
0
        public override Expression_Node_Function NewInstance(
            Expression_Node_String parent_Expression, Configuration_Node cur_Conf,
            object owner_MemoryApplication, Log_Reports pg_Logging)
        {
            Log_Method pg_Method = new Log_MethodImpl(0);
            pg_Method.BeginMethod(Info_CSVEditorImpl.Name_Library, this, "NewInstance",pg_Logging);
            //

            Expression_Node_Function f0 = new Expression_Node_Function_BootCsvEditorExImpl(this.EnumEventhandler,this.List_NameArgumentInitializer,this.Functiontranslatoritem);
            f0.Parent_Expression = parent_Expression;
            f0.Cur_Configuration = cur_Conf;
            ((Expression_Node_FunctionAbstract)f0).Owner_MemoryApplication = (MemoryApplication)owner_MemoryApplication;
            //関数名初期化
            f0.Dictionary_Expression_Attribute.Set(PmNames.S_NAME.Name_Pm, new Expression_Leaf_StringImpl(NAME_FUNCTION, null, cur_Conf), pg_Logging);

            //「プロジェクト選択時」のイベントハンドラーを上書き要求。
            {
                Expression_Node_Function expr_Func2 = Collection_Function.NewFunction2(
                        Expression_Node_Function_OnEditorSelected_Impl.NAME_FUNCTION,
                        f0,
                        cur_Conf,
                        //EnumEventhandler.Tp_B_Wr_Rhn,
                        owner_MemoryApplication,
                        pg_Logging);

                ((Expression_Node_Function_BootCsvEditorExImpl)f0).Functionitem_OnProjectSelected = expr_Func2;
            }

            //
            pg_Method.EndMethod(pg_Logging);
            return f0;
        }
コード例 #20
0
ファイル: SelectPerformerImpl.cs プロジェクト: muzudho/XtA
        //────────────────────────────────────────
        /// <summary>
        /// 無条件で、全てのレコードを返す。
        /// </summary>
        /// <param name="dst_Row"></param>
        /// <param name="isRequired_ExpectedValue"></param>
        /// <param name="dataTable"></param>
        /// <param name="s_ParentNode_query"></param>
        /// <param name="log_Reports"></param>
        public void Select(
            out List<DataRow> out_List_DstRow,
            bool isRequired_ExpectedValue,
            DataTable dataTable,
            Configuration_Node parent_Conf,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl();
            log_Method.BeginMethod(Info_Table.Name_Library, this, "Select",log_Reports);

            //
            //
            //
            //

            out_List_DstRow = new List<DataRow>();

            foreach (DataRow row in dataTable.Rows)
            {
                out_List_DstRow.Add(row);
            }

            goto gt_EndMethod;

            //
            //
            //
            //

            gt_EndMethod:
            log_Method.EndMethod(log_Reports);
        }
コード例 #21
0
        //────────────────────────────────────────
        #endregion



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

        /// <summary>
        ///
        /// </summary>
        public void ToText_Snapshot(Log_TextIndented s)
        {
            Log_Method  log_Method = new Log_MethodImpl(0);
            Log_Reports log_Reports_ForSnapshot = new Log_ReportsImpl(log_Method);

            log_Method.BeginMethod(Info_Syntax.Name_Library, this, "ToText_Snapshot", log_Reports_ForSnapshot);

            log_Reports_ForSnapshot.BeginCreateReport(EnumReport.Dammy);
            s.Increment();


            // ノード名
            s.AppendI(0, "「E■[");
            s.Append(this.Cur_Configuration.Name);
            s.Append("] ");

            // クラス名
            s.Append("[");
            s.Append(this.GetType().Name);
            s.Append("]クラス ");

            s.Append("子値=[");
            s.Append(this.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports_ForSnapshot));
            s.Append("]");

            s.Append("」");
            s.Newline();

            // 属性リスト
            this.Dictionary_Expression_Attribute.ToText_Snapshot(s);

            // 子リスト
            if (this.List_Expression_Child.Count < 1)
            {
                s.AppendI(0, "子無し");
                s.Newline();
            }
            else
            {
                s.AppendI(0, "┌────────┐子数=[");
                s.Append(this.List_Expression_Child.Count);
                s.Append("]");
                s.Newline();
                this.List_Expression_Child.ForEach(delegate(Expression_Node_String e_Child, ref bool bRemove, ref bool bBreak)
                {
                    e_Child.ToText_Snapshot(s);
                });
                s.AppendI(0, "└────────┘");
                s.Newline();
            }

            goto gt_EndMethod;
            //
            //
gt_EndMethod:
            s.Decrement();
            log_Reports_ForSnapshot.EndCreateReport();
            log_Method.EndMethod(log_Reports_ForSnapshot);
        }
コード例 #22
0
ファイル: FinderLuaImpl.cs プロジェクト: muzudho/XtA
        //────────────────────────────────────────
        /// <summary>
        /// 再帰関数です。
        /// </summary>
        /// <param name="result">.luaファイルのパスが追加されます。</param>
        /// <param name="folderpath"></param>
        public void SearchLua(List<string> result, string folderpath, Log_Reports log_Reports)
        {
            Log_Method log_Method = new Log_MethodImpl();
            log_Method.BeginMethod(Info_Actorslist.Name_Library, this, "SearchLua", log_Reports);

            if (log_Reports.Successful)
            {
                if (!Directory.Exists(folderpath))
                {
                    System.Console.WriteLine("SearchLua エラー");
                    goto gt_Error_Folder;
                }

                string[] filepaths = Directory.GetFileSystemEntries(folderpath);
                foreach (string filepath in filepaths)
                {
                    if (Directory.Exists(filepath))
                    {
                        //System.Console.WriteLine("dir=[" + filepath + "]");
                        this.SearchLua(result, filepath, log_Reports);
                    }
                    else
                    {
                        Match m1 = this.Regex.Match(filepath);
                        if (m1.Success)
                        {
                            result.Add(filepath);
                            //System.Console.WriteLine("file=[" + filepath + "]");
                        }

                    }
                }
            }

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

                Log_TextIndented s = new Log_TextIndentedImpl();
                s.Append("存在するフォルダーを指定してください。");
                s.Append(Environment.NewLine);
                s.Append("  folderpath=[");
                s.Append(folderpath);
                s.Append("]");

                r.Message = s.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            gt_EndMethod:
            log_Method.EndMethod(log_Reports);
        }
コード例 #23
0
ファイル: XToMemory_Style.cs プロジェクト: muzudho/CSVExE
        //────────────────────────────────────────
        public XenonStyle Parse(string sText, Log_Reports log_Reports)
        {
            Log_Method pg_Method = new Log_MethodImpl(0);
            pg_Method.BeginMethod(Info_Operating.Name_Library, this, "Parse",log_Reports);

            XenonStyle o_Style = new XenonStyleImpl();

            string[] properties = sText.Split(';');

            foreach (string sProperty in properties)
            {
                string[] keyValue = sProperty.Split(':');

                if (2 <= keyValue.Length)
                {
                    if ("color" == keyValue[0].Trim().ToLower())
                    {
                        string sValue = keyValue[1].Trim().ToLower();

                        ColorResult colorResult = BuilderColor.Parse(keyValue[1].Trim().ToLower(), Color.Black, true);
                        if (colorResult.BNotFound)
                        {
                            // 該当がなければ

                            // #連続エラー処理
                            if (log_Reports.CanCreateReport)
                            {
                                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                                r.SetTitle("▲エラー4301!", pg_Method);
                                r.Message = "color属性に["+sValue+"]が指定されましたが、対応していない値です。";
                                log_Reports.EndCreateReport();
                            }
                        }
                        else
                        {
                            o_Style.ForeXenonColor = new XenonColorImpl();
                            o_Style.ForeXenonColor.Color = colorResult.Color;
                            o_Style.ForeXenonColor.Name_Color = sValue;
                        }
                    }
                    else
                    {
                        // 無視
                    }
                }
                else
                {
                    // エラー処理
                }
            }

            goto gt_EndMethod;
            //
            //
            gt_EndMethod:
            pg_Method.EndMethod(log_Reports);
            return o_Style;
        }
コード例 #24
0
        //────────────────────────────────────────

        /// <summary>
        /// 相対パスが設定されていた場合、その相対元となるディレクトリーへのパスです。
        /// そうでない場合は、System.Windows.Forms.StartupPath を入れてください。
        /// </summary>
        /// <param name="newDirectoryPath"></param>
        public void SetDirectory_Base(
            string sFolderpath_New,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0);

            log_Method.BeginMethod(Info_Syntax.Name_Library, this, "SetSDirectory_Base", log_Reports);

            // ダミー・フラグ。使いません。
            bool bDammyFlagCheckPathTooLong = false;

            if (this.Conf is Conf_Filepath)
            {
                Conf_Filepath cf_Fpath = ((Conf_Filepath)this.Conf);

                // チェック。絶対パスにすることができればOK。
                Util_Filepath.ToAbsolute(
                    sFolderpath_New,
                    cf_Fpath.GetHumaninput(),
                    ref bDammyFlagCheckPathTooLong,
                    false,       //ファイル名の長さが上限超過ならエラー
                    log_Reports, //out sErrorMsg,
                    this.Conf
                    );
                if (!log_Reports.Successful)
                {
                    // 既エラー。
                    goto gt_EndMethod;
                }

                cf_Fpath.SetDirectory_Base(sFolderpath_New);
            }
            else
            {
                // エラー
                if (log_Reports.CanCreateReport)
                {
                    Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                    r.SetTitle("▲エラー903!", log_Method);

                    Log_TextIndented s = new Log_TextIndentedImpl();
                    s.Append(Environment.NewLine);
                    s.Append("#GetSAbsoluteFilePath:型が違います。[" + this.Conf.GetType().Name + "]");

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

            //
            //
            //
            //
gt_EndMethod:
            log_Method.EndMethod(log_Reports);
            return;
        }
コード例 #25
0
        //────────────────────────────────────────

        /// <summary>
        /// new された直後の内容に戻します。
        /// </summary>
        public void Clear(string name, Conf_String cParent_OrNull, Log_Reports log_Reports)
        {
            Log_Method log_Method = new Log_MethodImpl(0);

            log_Method.BeginMethod(Info_Syntax.Name_Library, this, "Clear", log_Reports);

            //
            //
            //
            // 親
            //
            //
            //
            this.Parent = cParent_OrNull;


            //
            //
            //
            // 自
            //
            //
            //
            this.Name = name;


            //
            //
            //
            // 属性
            //
            //
            //
            this.Attributes.Clear(this, log_Reports);


            //
            //
            //
            // 子
            //
            //
            //
            this.childNodes.Clear(log_Reports);


            //
            //
            //
            // 親への連結は維持。
            //
            //
            //

            //
            //
            log_Method.EndMethod(log_Reports);
        }
コード例 #26
0
        //────────────────────────────────────────

        /// <summary>
        /// new された直後の内容に戻します。
        /// </summary>
        public void Clear(string sName, Configurationtree_Node parent_Conf_OrNull, Log_Reports log_Reports)
        {
            Log_Method log_Method = new Log_MethodImpl(0);

            log_Method.BeginMethod(Info_Syntax.Name_Library, this, "Clear", log_Reports);

            //
            //
            //
            // 親
            //
            //
            //
            this.Parent = parent_Conf_OrNull;


            //
            //
            //
            // 自
            //
            //
            //
            this.Name = sName;


            //
            //
            //
            // 属性
            //
            //
            //
            this.Dictionary_Attribute.Clear(this, log_Reports);


            //
            //
            //
            // 子
            //
            //
            //
            this.list_Child.Clear(log_Reports);


            //
            //
            //
            // 親への連結は維持。
            //
            //
            //

            //
            //
            log_Method.EndMethod(log_Reports);
        }
コード例 #27
0
        //────────────────────────────────────────
        public override string P2b_GetStyleName(
            int nCurIx, CustomcontrolListbox cctLst, Log_Reports pg_Logging
            )
        {
            Log_Method pg_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);
            pg_Method.BeginMethod(Info_LayoutImpl.Name_Library, this, "P2_GetStyleAttrNames",pg_Logging);
            //
            //

            string sResult;

            // 行をセットしたので、取り出されるのも行です。
            // DataRowをセットしましたが、取り出されるのは DataRowViewになるようです。
            DataRowView row = (DataRowView)cctLst.Items[nCurIx];

            // スタイルのNAME値が入っている。
            Value_Humaninput valueH = Utility_Row.GetFieldvalue(
                NamesFld.S_EXPL_SS,
                row.Row,
                false,//該当なしも可
                pg_Logging,
                Info_LayoutImpl.Name_Library+":"+this.GetType().Name+"#P2_:リストボックスのEXPL-SS"
                );
            if (!pg_Logging.Successful)
            {
                // 既エラー。
                sResult = "";
                goto gt_EndMethod;
            }

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

                if (null == valueH)
                {
                    sResult = "";
                }
                else
                {
                    sResult = ((Value_Humaninput)valueH).Text;
                }
            }
            else
            {
                sResult = "";
            }

            goto gt_EndMethod;

            //
            //
            //
            //
            gt_EndMethod:
            pg_Method.EndMethod(pg_Logging);
            return sResult;
        }
コード例 #28
0
ファイル: UsercontrolWindow.cs プロジェクト: muzudho/CSVExE
        //────────────────────────────────────────

        /// <summary>
        /// イベント アクション リストを作成します。
        /// </summary>
        /// <param nFcName="eventName"></param>
        /// <param nFcName="nActionSuper"></param>
        /// <param nFcName="log_Reports"></param>
        public Functionlist CreateFunctionlist(
            ConfigurationtreeToExpression_Event sToE_Event,
            MemoryApplication owner_MemoryApplication,
            Log_Reports log_Reports
            )
        {
            Log_Method pg_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);
            pg_Method.BeginMethod(Info_Controls.Name_Library, this, "CreateFunctionlist",log_Reports);
            //
            //
            Functionlist fw_Result = null;

            //.WriteLine(this.GetType().Name + "#CreateEventActionList: <構築>【開始】 イベントに対応ついたアクションリストを追加します。 (ウィンドウ)");

            switch (sToE_Event.Name)
            {
                case NamesSe.S_LOAD:
                    {
                        //
                        // このコントロールの「アプリケーション起動時」。
                        //
                        //  (NActionPerformEnum.O_EA)
                        //

                        //
                        // 無視します。
                        //
                    }
                    break;

                default:
                    goto gt_Error_NotSupportedEvent;
            }

            goto gt_EndMethod;
        //
        //
            #region 異常系
        //────────────────────────────────────────
        gt_Error_NotSupportedEvent:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, this.GetType().Name, log_Reports);//クラス名
                tmpl.SetParameter(2, sToE_Event.Name, log_Reports);//イベント名
                tmpl.SetParameter(3, Log_RecordReportsImpl.ToText_Configuration(sToE_Event.Configurationtree_Event), log_Reports);//設定位置パンくずリスト

                this.ControlCommon.Owner_MemoryApplication.CreateErrorReport("Er:515;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
        //────────────────────────────────────────
            #endregion
        //
        //
        gt_EndMethod:
            pg_Method.EndMethod(log_Reports);
            return fw_Result;
        }
コード例 #29
0
        //────────────────────────────────────────
        /// <summary>
        /// ユーザー定義プログラムの実行。
        /// </summary>
        /// <param name="hits"></param>
        /// <param name="log_Reports"></param>
        /// <returns></returns>
        public override string Execute4_OnExpressionString(
            EnumHitcount hits,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);
            log_Method.BeginMethod(Info_Expr.Name_Library, this, "Execute4_OnExpressionString",log_Reports);
            //
            //

            //
            // 子<a-●●>要素の実行。

            //
            // 全部真なら真、1つでも偽なら偽。
            bool bResult = true;
            {
                List<Expression_Node_String> ecList_Child = this.List_Expression_Child.SelectList(//Nv_Elem
                    EnumHitcount.Unconstraint,
                    log_Reports
                    );

                // ★★★★★★★★★ここが遅い? 42項目あると、42個全部調べることになります。
                //ystem.Console.WriteLine(this.GetType().Name + "#GetString: 全部真か? childNList.Count=[" + childNList.Count + "]");

                foreach (Expression_Node_String ec_11 in ecList_Child)
                {
                    Expressionv_Elem99 ecv_Elem = (Expressionv_Elem99)ec_11;
                    ecv_Elem.SetDataRow(this.DataRow);
                    string str = ecv_Elem.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports);

                    // ★★★★★★★★★ここが遅い? 42項目あると、42個全部調べることになります。
                    //ystem.Console.WriteLine(this.GetType().Name + "#GetString: str=[" + str + "]");

                    bool bChild;
                    if (Boolean.TryParse(str, out bChild))
                    {
                        if (!bChild)
                        {
                            bResult = false;
                            goto loop_end;
                        }

                    }
                }
            loop_end:
                ;//空文
            }

            //
            //
            //
            //
            log_Method.EndMethod(log_Reports);
            return bResult.ToString();
        }
コード例 #30
0
        //────────────────────────────────────────

        public virtual string Lv5_Implement(
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0);

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

            string    result;
            Exception err_Excp;

            try
            {
                result = this.dictionary_P1p[this.numberP1p];
            }
            catch (KeyNotFoundException e)
            {
                // エラー
                err_Excp = e;
                goto gt_Error_KeyNotFound;
            }

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

                    Log_TextIndented t = new Log_TextIndentedImpl();
                    t.Append("テキスト_テンプレートの引数 p");
                    t.Append(this.numberP1p);
                    t.Append("p の取得に失敗しました。");
                    t.Newline();

                    // ヒント
                    t.Append(r.Message_SException(err_Excp));

                    r.Message = t.ToString();
                    log_Reports.EndCreateReport();
                }
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
gt_EndMethod:
            log_Method.EndMethod(log_Reports);
            return(result);
        }
コード例 #31
0
        //────────────────────────────────────────
        #endregion



        #region 判定
        //────────────────────────────────────────

        /// <summary>
        /// パスはルートかどうか。
        /// </summary>
        /// <param name="filePath"></param>
        /// <returns></returns>
        public static bool IsRooted_Path(
            string filepath,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0);

            log_Method.BeginMethod(Info_Syntax.Name_Library, "Utility_Configurationtree_Filepath", "IsRooted_Path", log_Reports);
            //
            //
            bool bPathRooted;

            Exception err_Excp;

            try
            {
                // 「絶対パス」か、「相対パス」かを判断します。
                bPathRooted = System.IO.Path.IsPathRooted(filepath);
            }
            catch (ArgumentException e)
            {
                // エラー
                err_Excp = e;
                goto gt_Error_MissInput;
            }

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

                StringBuilder sb = new StringBuilder();
                sb.Append("エラー 入力パス=[" + filepath + "]:(" + err_Excp.GetType().Name + ") ");
                sb.Append(err_Excp.Message);

                r.Message = sb.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
gt_EndMethod:
            log_Method.EndMethod(log_Reports);
            return(bPathRooted);
        }
コード例 #32
0
        //────────────────────────────────────────

        /// <summary>
        /// ファイル名の頭と末尾に文字列を付けることができます。
        /// </summary>
        /// <param name="prefix">ファイル名の頭に付ける文字列。</param>
        /// <param name="suffix">ファイル名の末尾に付ける文字列。</param>
        public Expr_Filepath Rename_Append(string prefix, string suffix, Log_Reports log_Reports)
        {
            Log_Method log_Method = new Log_MethodImpl(0);

            log_Method.BeginMethod(Info_Syntax.Name_Library, this, "Rename_Append", log_Reports);

            Expr_Filepath result;

            string absolute = this.Lv4Execute_OnImplement(Syntax.EnumHitcount.Unconstraint, log_Reports);

            if ("" == absolute)
            {
                result = null;
                goto gt_Error_Empty;
            }

            string directory = Path.GetDirectoryName(absolute);
            string filename  = Path.GetFileNameWithoutExtension(absolute);
            string extension = Path.GetExtension(absolute);//拡張子の「.」を含む。

            absolute = Path.Combine(directory, prefix + filename + suffix + extension);

            result = Expr_FilepathImpl.Init2(
                "",
                absolute,
                "<rename>",
                null,
                log_Reports
                );

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

                Log_TextIndented s = new Log_TextIndentedImpl();
                s.Append("ファイルパスが空文字列でした。");

                r.Message = s.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
gt_EndMethod:
            log_Method.EndMethod(log_Reports);
            return(result);
        }
コード例 #33
0
ファイル: Flow0010.cs プロジェクト: muzudho/CSVExE
        //────────────────────────────────────────
        /// <summary>
        /// tool-saveファイルへの絶対パスを取得します。
        /// 取得できなかった場合、空文字列を返します。
        /// </summary>
        /// <returns></returns>
        public string GetFilepathabsolute(
            string sFpath,
            bool bRequired,
            Log_Reports pg_Logging
            )
        {
            Log_Method pg_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);
            pg_Method.BeginMethod(Info_Toolwindow.Name_Library, this, "GetFilepathabsolute", pg_Logging);

            string sFpatha_xml;

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

                // ツールの設定のファイルパス
                Configurationtree_Node parent_Cf = new Configurationtree_NodeImpl("!ハードコーディング_Flow0010#GetFileAbsPath", null);

                Configurationtree_NodeFilepath cf_Fpath = new Configurationtree_NodeFilepathImpl("ファイルパス出典未指定L09TcDlg_1", parent_Cf);
                cf_Fpath.InitPath(
                    sFpath,
                    pg_Logging
                    );
                if (!pg_Logging.Successful)
                {
                    // 既エラー。
                    sFpatha_xml = "";
                    goto gt_EndMethod;
                }

                Expression_Node_Filepath ec_Fpath = new Expression_Node_FilepathImpl(cf_Fpath);
                sFpatha_xml = ec_Fpath.Execute4_OnExpressionString(
                    EnumHitcount.Unconstraint, pg_Logging);
                if (!pg_Logging.Successful)
                {
                    // 既エラー。
                    sFpatha_xml = "";
                    goto gt_EndMethod;
                }
            }
            else
            {
                // 既エラー。
                sFpatha_xml = "";
                goto gt_EndMethod;
            }

            goto gt_EndMethod;
            //
            //
            gt_EndMethod:
            pg_Method.EndMethod(pg_Logging);
            return sFpatha_xml;
        }
コード例 #34
0
        //────────────────────────────────────────
        /// <summary>
        /// アクション実行。
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        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 (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 + "]コントロールが、NAction27を実行。";
                }
                else
                {
                    log_Reports.Comment_EventCreationMe = "NAction27を実行。";
                }

                this.Execute6_Sub(log_Reports);
            }
            else if (this.EnumEventhandler == EnumEventhandler.O_Ea)
            {
                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 + "]コントロールが、NAction27を実行。";
                }
                else
                {
                    log_Reports.Comment_EventCreationMe = "NAction27を実行。";
                }

                if (log_Reports.Successful)
                {
                    this.Execute6_Sub(
                        log_Reports
                        );
                }
            }

            //
            //
            log_Method.EndMethod(log_Reports);
            return "";
        }
コード例 #35
0
        //────────────────────────────────────────
        /// <summary>
        /// new された直後の内容に戻します。
        /// </summary>
        public void Clear( string sName, Configurationtree_Node parent_Conf_OrNull, Log_Reports log_Reports)
        {
            Log_Method log_Method = new Log_MethodImpl(0);
            log_Method.BeginMethod(Info_Syntax.Name_Library, this, "Clear", log_Reports);

            //
            //
            //
            // 親
            //
            //
            //
            this.Parent = parent_Conf_OrNull;

            //
            //
            //
            // 自
            //
            //
            //
            this.Name = sName;

            //
            //
            //
            // 属性
            //
            //
            //
            this.Dictionary_Attribute.Clear( this, log_Reports);

            //
            //
            //
            // 子
            //
            //
            //
            this.list_Child.Clear(log_Reports);

            //
            //
            //
            // 親への連結は維持。
            //
            //
            //

            //
            //
            log_Method.EndMethod(log_Reports);
        }
コード例 #36
0
        //────────────────────────────────────────
        /// <summary>
        /// 実行。
        /// 
        /// 全てのコントロールの、指定のイベントを実行します。
        /// 
        /// アプリケーション起動時に、"OnLoad"を全て実行するなど。
        /// 
        /// 別の関数から呼び出されます。
        /// </summary>
        /// <param name="oEventName"></param>
        /// <param name="oEventName"></param>
        /// <param name="log_Reports"></param>
        public void Execute1_AllUsercontrols(
            List<string> sFcNameList,
            object sender,
            XenonName o_Name_Event,
            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, "Execute1_AllUsercontrols", log_Reports);
            //
            //
            Configurationtree_Node cf_ThisMethod = new Configurationtree_NodeImpl(log_Method.Fullname, null);

            foreach (string sName_Usercontrol in sFcNameList)
            {
                if ("" == sName_Usercontrol)
                {
                    // 空行。飛ばす。
                    goto end_row;
                }

                Expression_Leaf_StringImpl ec_FcName = new Expression_Leaf_StringImpl(null, cf_ThisMethod);
                ec_FcName.SetString( sName_Usercontrol, log_Reports);

                List<Usercontrol> list_UcFc = owner_MemoryApplication.MemoryForms.GetUsercontrolsByName(ec_FcName, true, log_Reports);
                if (list_UcFc.Count < 1)
                {
                    // 正常。
                    // 特に設定をすることのないコントロールは、XMLファイルが用意されていない。
                    // 無視する。
                }
                else
                {
                    Usercontrol ucFc = list_UcFc[0];

                    this.Execute1_UsercontrolImpl(
                        sender,
                        ucFc,
                        o_Name_Event,
                        owner_MemoryApplication,
                        log_Reports
                        );
                }

            end_row:
                ;
            }

            //
            //
            log_Method.EndMethod(log_Reports);
        }
コード例 #37
0
        //────────────────────────────────────────
        /// <summary>
        /// パスはルートかどうか。
        /// </summary>
        /// <param name="filePath"></param>
        /// <returns></returns>
        public static bool IsRooted_Path(
            string filepath,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0);
            log_Method.BeginMethod(Info_Syntax.Name_Library, "Utility_Configurationtree_Filepath", "IsRooted_Path", log_Reports);
            //
            //
            bool bPathRooted;

            Exception err_Excp;
            try
            {
                // 「絶対パス」か、「相対パス」かを判断します。
                bPathRooted = System.IO.Path.IsPathRooted(filepath);
            }
            catch (ArgumentException e)
            {
                // エラー
                err_Excp = e;
                goto gt_Error_MissInput;
            }

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

                StringBuilder sb = new StringBuilder();
                sb.Append("エラー 入力パス=[" + filepath + "]:(" + err_Excp.GetType().Name + ") ");
                sb.Append(err_Excp.Message);

                r.Message = sb.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
            gt_EndMethod:
            log_Method.EndMethod(log_Reports);
            return bPathRooted;
        }
コード例 #38
0
        //────────────────────────────────────────
        /// <summary>
        /// アクション実行。
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public override string Execute5_Main(Log_Reports log_Reports)
        {
            Log_Method log_Method = new Log_MethodImpl(0);
            log_Method.BeginMethod(Info_Functions.Name_Library, this, "Execute5_Main", log_Reports);

            if (log_Method.CanWarning())
            {
                log_Method.WriteWarning_ToConsole(" ▲▲▲▲▲オーバーライド実装してください。");
            }

            log_Method.EndMethod(log_Reports);
            return "";
        }
コード例 #39
0
        //────────────────────────────────────────
        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_Expr.Name_Library, this, "Execute5_Main", log_Reports);
            //
            //
            string sResult;

            //
            List<Usercontrol> ucList_Fc = this.Owner_MemoryApplication.MemoryForms.GetUsercontrolsByName(this.Expression_UsercontrolName, true, log_Reports);
            if (log_Reports.Successful)
            {
                if (1 != ucList_Fc.Count)
                {
                    // TODO:エラー
                    sResult = "";
                    goto gt_Error_No1Hit;
                }

                Usercontrol ucFc = ucList_Fc[0];
                sResult = ucFc.UsercontrolText;
            }
            else
            {
                // エラー
                sResult = "";
            }

            goto gt_EndMethod;
            //
            //
            #region 異常系
            //────────────────────────────────────────
            gt_Error_No1Hit:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, this.Expression_UsercontrolName.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports), log_Reports);//コントロールの値

                this.Owner_MemoryApplication.CreateErrorReport("Er:6041;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
            gt_EndMethod:
            log_Method.EndMethod(log_Reports);
            return sResult;
        }
コード例 #40
0
        //────────────────────────────────────────
        /// <summary>
        /// 実行。
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="eventMonitor"></param>
        /// <param name="log_Reports"></param>
        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);

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

            if (log_Reports.CanStopwatch)
            {
                log_Method.Log_Stopwatch.Message = "「E■[" + sFncName0 + "]アクション」実行(A)";
                log_Method.Log_Stopwatch.Begin();
            }

            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 + "]アクションを実行。";
            }

            //
            //
            //
            //

            if (this.EnumEventhandler == EnumEventhandler.O_Lr)
            {
                this.Execute6_Sub(log_Reports);
            }
            else if (this.EnumEventhandler == EnumEventhandler.O_Ea)
            {
                this.Execute6_Sub(log_Reports);
            }
            else
            {
            }

            //
            // デバッグ
            //

            log_Method.EndMethod(log_Reports);
            return "";
        }
コード例 #41
0
        //────────────────────────────────────────
        /// <summary>
        /// レコードセットの追加。
        /// </summary>
        /// <param name="eName"></param>
        /// <param name="recordSet"></param>
        /// <param name="log_Reports"></param>
        public void Add(
            Expression_Node_String ec_Name, RecordSet recordSet,
            MemoryApplication memoryApplication,
            Log_Reports log_Reports)
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);
            log_Method.BeginMethod(Info_Expr.Name_Library, this, "Add",log_Reports);
            //
            //

            string sName = ec_Name.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports).Trim();

            try
            {
                this.dictionary_Recordset.Add(sName, recordSet);

                //// debug: 追加したレコードセットの内容。
                //{
                //    ystem.Console.WriteLine(Info_N.LibraryName + ":" + this.GetType().Name + "#Add: 追加したレコードセットの内容"+
                //        " fld=["+oRecordSet.NField.E_Execute(EnumHitcount.Unconstraint, log_Reports)+"]" +
                //        " lookup-value=["+oRecordSet.NLookupValue.E_Execute(EnumHitcount.Unconstraint, log_Reports)+"]" +
                //        " required=[" + oRecordSet.NRequired.E_Execute(EnumHitcount.Unconstraint, log_Reports) + "]" +
                //        " from=[" + oRecordSet.NFrom.E_Execute(EnumHitcount.Unconstraint, log_Reports) + "]" +
                //        " description=[" + oRecordSet.NDescription.E_Execute(EnumHitcount.Unconstraint, log_Reports) + "]" +
                //        " Storage=[" + oRecordSet.NStorage.E_Execute(EnumHitcount.Unconstraint, log_Reports) + "]"
                //        );

                //}
            }
            catch (ArgumentException ex)
            {
                //return;

                {
                    Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                    tmpl.SetParameter(1, sName, log_Reports);//名前
                    tmpl.SetParameter(2, Log_RecordReportsImpl.ToText_Configuration(ec_Name.Cur_Configuration), log_Reports);//設定位置パンくずリスト
                    tmpl.SetParameter(3, Log_RecordReportsImpl.ToText_Exception(ex), log_Reports);//例外メッセージ

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

            //
            //
            //
            //

            log_Method.EndMethod(log_Reports);
        }
コード例 #42
0
        //────────────────────────────────────────
        /// <summary>
        /// Exe_2ActionImpl#SToFc で使用。
        /// </summary>
        /// <param name="s_Action"></param>
        /// <param name="bRequired"></param>
        /// <param name="log_Reports"></param>
        /// <returns></returns>
        public Expression_Node_Function Translate(
            Configurationtree_Node action_Conf,
            bool bRequired,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0);
            log_Method.BeginMethod(Info_Functions.Name_Library, this, "Translate",log_Reports);
            //
            //

            string sName_Fnc;
            if (action_Conf.Dictionary_Attribute.ContainsKey(PmNames.S_NAME.Name_Pm))
            {
                action_Conf.Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sName_Fnc, true, log_Reports);
            }
            else
            {
                sName_Fnc = "<エラー:" + log_Method.Fullname + ">";
            }

            Expression_Node_Function expr_Func = Collection_Function.NewFunction2( sName_Fnc,
                null, action_Conf, this.Owner_MemoryApplication, log_Reports);

            if (log_Reports.Successful)
            {
                if (null != expr_Func)
                {
                    Log_TextIndented_ConfigurationtreeToExpressionImpl pg_ParsingLog = new Log_TextIndented_ConfigurationtreeToExpressionImpl();
                    pg_ParsingLog.BEnabled = false;
                    expr_Func = ((Expression_Node_FunctionAbstract)expr_Func).Functiontranslatoritem.Translate(
                        sName_Fnc,
                        action_Conf,//これは生成時に指定できない?
                        pg_ParsingLog,
                        this.Owner_MemoryApplication,
                        log_Reports
                        );
                    if (Log_ReportsImpl.BDebugmode_Static && pg_ParsingLog.BEnabled)
                    {
                        log_Method.WriteInfo_ToConsole(" pg_ParsingLog=" + Environment.NewLine + pg_ParsingLog.ToString());
                    }
                }
            }

            goto gt_EndMethod;
            //
            gt_EndMethod:
            log_Method.EndMethod(log_Reports);
            return expr_Func;
        }
コード例 #43
0
ファイル: P1_RecordSetLoader.cs プロジェクト: muzudho/CSVExE
        //────────────────────────────────────────
        /// <summary>
        /// 一時記憶から、レコードセット取得。
        /// </summary>
        /// <param name="RecordSetLoadFrom"></param>
        /// <param name="s_ParentNode"></param>
        /// <param name="log_Reports"></param>
        /// <returns>該当がなければヌル。</returns>
        public RecordSet P1_Load(
            Expression_Node_String ec_RecordSetLoadFrom,//Where
            Configuration_Node parent_Conf,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);
            log_Method.BeginMethod(Info_Expr.Name_Library, this, "P1_Load",log_Reports);
            //
            //

            //
            // レコードセットを求めます。
            RecordSet recordSet;

            if (null != ec_RecordSetLoadFrom)
            {
                string sRecordSetLoadFrom = ec_RecordSetLoadFrom.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports).Trim();

                if ("" != sRecordSetLoadFrom)
                {
                    //
                    // レコードセットを取得。
                    recordSet = this.Owner_MemoryApplication.MemoryRecordset.RecordsetStorage.Get(
                        ec_RecordSetLoadFrom,
                        this.Owner_MemoryApplication,
                        log_Reports);
                }
                else
                {
                    recordSet = null;
                }

            }
            else
            {
                recordSet = null;
            }

            goto gt_EndMethod;

            //
            //
            //
            //
            gt_EndMethod:
            log_Method.EndMethod(log_Reports);
            return recordSet;
        }
コード例 #44
0
        //────────────────────────────────────────

        /// <summary>
        /// new された直後の内容に戻します。
        /// </summary>
        public void Clear(Configurationtree_Node owner_Conf, Log_Reports log_Reports)
        {
            Log_Method log_Method = new Log_MethodImpl(0);

            log_Method.BeginMethod(Info_Syntax.Name_Library, this, "Clear", log_Reports);

            //
            //

            this.owner = null;
            this.dictionary_Attribute.Clear();

            //
            //
            log_Method.EndMethod(log_Reports);
        }
コード例 #45
0
ファイル: ControlCommonImpl.cs プロジェクト: muzudho/CSVExE
        //────────────────────────────────────────
        /// <summary>
        /// コンストラクター。
        /// </summary>
        public ControlCommonImpl()
        {
            Log_Method log_Method = new Log_MethodImpl();
            Log_Reports log_Reports_ThisMethod = new Log_ReportsImpl(log_Method);
            log_Method.BeginMethod(Info_Controls.Name_Library, this, "ControlCommonImpl", log_Reports_ThisMethod);

            // コントロールを作った時に、必ずnameプロパティを設定してください。
            // ただし、直接 Visual Studio のビジュアルエディターで配置した場合は設定できません。
            Configurationtree_Node cur_Cf = new Configurationtree_NodeImpl(log_Method.Fullname+"<init>", null);

            this.configurationtree_Control = new Configurationtree_NodeImpl(NamesNode.S_CONTROL1, cur_Cf);//ダミーのデフォルト・オブジェクト?
            this.expression_Name_Control = new Expression_Node_StringImpl(null, cur_Cf);

            log_Method.EndMethod(log_Reports_ThisMethod);
            log_Reports_ThisMethod.EndLogging(log_Method);
        }
コード例 #46
0
        //────────────────────────────────────────

        /// <summary>
        /// new された直後の内容に戻します。
        /// </summary>
        public void Clear(Conf_String cOwner, Log_Reports log_Reports)
        {
            Log_Method log_Method = new Log_MethodImpl(0);

            log_Method.BeginMethod(Info_Syntax.Name_Library, this, "Clear", log_Reports);

            //
            //

            this.owner = null;
            this.map.Clear();

            //
            //
            log_Method.EndMethod(log_Reports);
        }
        //────────────────────────────────────────
        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_ReportsImpl.BDebugmode_Static);
            log_Method.BeginMethod(Info_XmlToConf.Name_Library, this, "LinkToParent", log_Reports);

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

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

            uct.ControlCommon.Configurationtree_Control.List_Child.Add(cur_Cf, log_Reports);
            goto gt_EndMethod;
            //
            #region 異常系
            //────────────────────────────────────────
            gt_Error_UndefinedClass:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー386!", log_Method);

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

                // ヒント

                r.Message = s.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            gt_EndMethod:
            log_Method.EndMethod(log_Reports);
        }
コード例 #48
0
        //────────────────────────────────────────

        /// <summary>
        /// このデータは、ファイルパス型だ、と想定して、ファイルパスを取得します。
        /// </summary>
        /// <returns></returns>
        public static Expr_Filepath Execute4_OnExpressionString_AsFilepath_Impl(
            Expr_String eCaller,
            EnumHitcount request,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl();

            log_Method.BeginMethod(Info_Syntax.Name_Library, eCaller, "Execute4_OnExpressionString_AsFilepath_Impl", log_Reports);
            //
            //
            //
            //

            Expr_Filepath reulst_eRel;

            //
            // ファイルパス。
            string sFpath = eCaller.Lv5_Implement(log_Reports);

            {
                reulst_eRel = Expr_FilepathImpl.Init2(
                    "",
                    sFpath,
                    "ファイルパス出典未指定L01_1",
                    eCaller.Conf,
                    log_Reports
                    );

                if (!log_Reports.Successful)
                {
                    // 既エラー。
                    reulst_eRel = null;
                    goto gt_EndMethod;
                }
            }

            goto gt_EndMethod;
            //
            //
gt_EndMethod:
            log_Method.EndMethod(log_Reports);
            return(reulst_eRel);
        }
コード例 #49
0
        //────────────────────────────────────────

        /// <summary>
        /// 未実装の場合。
        /// </summary>
        /// <param name="parent_Conf"></param>
        /// <param name="log_Reports"></param>
        /// <returns></returns>
        public static List <Expr_String> NoImpl_Expression_GetChildList(
            Conf_String parent_Conf,
            Log_Reports log_Reports
            )
        {
            //
            // エラー。

            Log_Method log_Method = new Log_MethodImpl();

            log_Method.BeginMethod(Info_Syntax.Name_Library, "Util_Expression_Node_String", "NoImpl_Expression_GetChildList", log_Reports);
            //
            //
            //
            //

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

                StringBuilder sb = new StringBuilder();

                sb.Append("Expression_GetChildList メソッドは、未実装です。");
                sb.Append(Environment.NewLine);
                sb.Append(Environment.NewLine);

                // ヒント
                sb.Append(r.Message_Conf(parent_Conf));

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

            //
            //
            //
            //
            log_Method.EndMethod(log_Reports);
            return(null);
        }
コード例 #50
0
        //────────────────────────────────────────

        /// <summary>
        /// 未実装の場合。
        /// </summary>
        /// <param name="parent_Conf"></param>
        /// <param name="log_Reports"></param>
        static public void NoImpl_Expression_AddChild(
            Configurationtree_Node parent_Conf,
            Log_Reports log_Reports
            )
        {
            //
            // エラー。

            Log_Method log_Method = new Log_MethodImpl();

            log_Method.BeginMethod(Info_Syntax.Name_Library, "Util_Expression_Node_String", "NoImpl_Expression_AddChild", log_Reports);

            //
            //
            //
            //

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

                StringBuilder sb = new StringBuilder();

                sb.Append("Expression_AddChild メソッドは、未実装です。");
                sb.Append(Environment.NewLine);
                sb.Append(Environment.NewLine);

                // ヒント
                sb.Append(r.Message_Configuration(parent_Conf));

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

            //
            //
            //
            //
            log_Method.EndMethod(log_Reports);
        }
コード例 #51
0
        //────────────────────────────────────────

        /// <summary>
        /// 内容を文字列型で返します。
        /// </summary>
        /// <param name="log_Reports"></param>
        /// <returns></returns>
        public virtual string Lv4Execute_OnImplement(
            EnumHitcount req_Items,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl();

            log_Method.BeginMethod(Info_Syntax.Name_Library, this, "Execute4_OnExpressionString", log_Reports);
            //
            //

            // もとに戻す
            this.enumHitcount = EnumHitcount.Unconstraint;

            string sResult = this.Lv5_Implement(log_Reports);

            //
            //
            log_Method.EndMethod(log_Reports);
            return(sResult);
        }
コード例 #52
0
        //────────────────────────────────────────

        /// <summary>
        /// このデータは、ファイルパス型だ、と想定して、ファイルパスを取得します。
        /// </summary>
        /// <returns></returns>
        public static Expression_Node_Filepath Execute4_OnExpressionString_AsFilepath_Impl(
            Expression_Node_String ec_Caller,
            EnumHitcount request,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl();

            log_Method.BeginMethod(Info_Syntax.Name_Library, ec_Caller, "Execute4_OnExpressionString_AsFilepath_Impl", log_Reports);
            //
            //
            //
            //

            Expression_Node_Filepath ec_Fpath_result;

            //
            // ファイルパス。
            string sFpath = ec_Caller.Execute5_Main(log_Reports);

            {
                Configurationtree_NodeFilepath cf_Fpath = new Configurationtree_NodeFilepathImpl("ファイルパス出典未指定L01_1", ec_Caller.Cur_Configuration);
                cf_Fpath.InitPath(sFpath, log_Reports);
                if (!log_Reports.Successful)
                {
                    // 既エラー。
                    ec_Fpath_result = null;
                    goto gt_EndMethod;
                }

                ec_Fpath_result = new Expression_Node_FilepathImpl(cf_Fpath);
            }

            goto gt_EndMethod;
            //
            //
gt_EndMethod:
            log_Method.EndMethod(log_Reports);
            return(ec_Fpath_result);
        }
コード例 #53
0
        //────────────────────────────────────────

        /// <summary>
        /// 内容を文字列型で返します。
        /// </summary>
        /// <param name="log_Reports"></param>
        /// <returns></returns>
        public string Lv4Execute_OnImplement(
            EnumHitcount request,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl();

            log_Method.BeginMethod(Info_Syntax.Name_Library, this, "Execute4_OnExpressionString", log_Reports);

            //
            //
            //
            //

            string result;

            // エラーが出ている時は飛ばしたいが、「エラー報告」として利用されることがある。

            //if (!log_Reports.Successful)
            //{
            //    //エラー
            //    sResult = "<E_P1pImpl:エラー101>";
            //    goto gt_EndMethod;
            //}

            result = this.Lv5_Implement(log_Reports);

            // もとに戻す
            this.requestItems = EnumHitcount.Unconstraint;

            goto gt_EndMethod;
            //
            //
            //
            //

gt_EndMethod:
            log_Method.EndMethod(log_Reports);
            return(result);
        }
コード例 #54
0
        //────────────────────────────────────────
        #endregion



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

        /// <summary>
        ///
        /// </summary>
        public void ToText_Snapshot(Log_TextIndented s)
        {
            Log_Method  log_Method = new Log_MethodImpl(0);
            Log_Reports log_Reports_ForSnapshot = new Log_ReportsImpl(log_Method);

            log_Method.BeginMethod(Info_Syntax.Name_Library, this, "ToText_Snapshot", log_Reports_ForSnapshot);

            log_Reports_ForSnapshot.BeginCreateReport(EnumReport.Dammy);
            //


            if (this.dicExpression_Item.Count < 1)
            {
                s.AppendI(0, "属性なし");
                s.Newline();
            }
            else
            {
                s.AppendI(0, "┌────────┐属性数=[");
                s.Append(this.dicExpression_Item.Count);
                s.Append("]");
                s.Newline();


                foreach (Expression_Node_String ec_Item in this.dicExpression_Item.Values)
                {
                    ec_Item.ToText_Snapshot(s);
                }

                s.AppendI(0, "└────────┘");
                s.Newline();
            }

            goto gt_EndMethod;
            //
            //
gt_EndMethod:
            log_Reports_ForSnapshot.EndCreateReport();
            log_Method.EndMethod(log_Reports_ForSnapshot);
        }
コード例 #55
0
        //────────────────────────────────────────

        public List <Expr_String> GetChildElements(
            EnumHitcount request,
            Log_Reports log_Reports
            )
        {
            //
            // エラー。

            Log_Method log_Method = new Log_MethodImpl();

            log_Method.BeginMethod(Info_Syntax.Name_Library, this, "GetChildElements", log_Reports);

            //
            //
            //
            //

            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);

                r.SetTitle("▲エラー101!", log_Method);

                Log_TextIndented t = new Log_TextIndentedImpl();
                t.Append("このメソッド " + log_Method.Fullname + " は使わないでください。");

                // ヒント
                t.Append(r.Message_Conf(this.Conf));

                r.Message = t.ToString();

                log_Reports.EndCreateReport();
            }
            //
            //
            log_Method.EndMethod(log_Reports);
            return(null);
        }
コード例 #56
0
        //────────────────────────────────────────

        /// <summary>
        /// 子要素を追加します。
        /// </summary>
        /// <param name="items"></param>
        /// <param name="request"></param>
        /// <param name="log_Reports"></param>
        public void AddChildElement(
            Expr_String eChild,
            Log_Reports log_Reports
            )
        {
            //
            // エラー。

            Log_Method log_Method = new Log_MethodImpl();

            log_Method.BeginMethod(Info_Syntax.Name_Library, this, "AddChildElement", log_Reports);

            //
            //
            //
            //

            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);

                r.SetTitle("▲エラー201!", log_Method);

                Log_TextIndented t = new Log_TextIndentedImpl();
                t.Append("このメソッド " + log_Method.Fullname + " は使わないでください。");

                // ヒント
                t.Append(r.Message_Conf(this.Conf));

                r.Message = t.ToString();

                log_Reports.EndCreateReport();
            }

            //
            //
            log_Method.EndMethod(log_Reports);
        }
コード例 #57
0
        //────────────────────────────────────────

        /// <summary>
        /// attr系要素の追加。
        /// </summary>
        public void Set(
            string sKey,
            string sValue,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl();

            log_Method.BeginMethod(Info_Syntax.Name_Library, this, "Set", log_Reports);

            //
            //
            //
            //

            this.dictionary_Attribute[sKey] = sValue;

            //
            //
            //
            //
            log_Method.EndMethod(log_Reports);
        }
コード例 #58
0
        public bool TrySelectAttribute(
            out string sResult_Out,
            string sName,
            EnumHitcount hits,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl();

            log_Method.BeginMethod(Info_Syntax.Name_Library, this, "TrySelectAttribute", log_Reports);

            //
            //

            bool bResult = this.Dictionary_Expression_Attribute.TrySelect(out sResult_Out, sName, hits, log_Reports);

            goto gt_EndMethod;
            //
            //
gt_EndMethod:
            log_Method.EndMethod(log_Reports);
            return(bResult);
        }
コード例 #59
0
        public void End(Log_Reports log_reports)
        {
            if (this.IsRunning)
            {
                Log_Method log_Method = new Log_MethodImpl(0);
                log_Method.BeginMethod(Info_Syntax.Name_Library, this, "End", log_reports);

                this.MilliSeconds_End = stopwatch.ElapsedMilliseconds;


                StringBuilder sb = new StringBuilder();

                sb.Append(Info_Syntax.Name_Library);
                sb.Append(":");
                sb.Append(this.GetType().Name);
                sb.Append("#End: 計測 ");
                sb.Append(this.ToString());
                sb.Append(Environment.NewLine);

                log_Method.WriteInfo_ToConsole(sb.ToString());
                log_Method.EndMethod(log_reports);
            }
        }
コード例 #60
0
        //────────────────────────────────────────

        /// <summary>
        /// attr系要素の追加。
        /// </summary>
        public void Set(
            string key,
            string value,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl();

            log_Method.BeginMethod(Info_Syntax.Name_Library, this, "Set", log_Reports);

            //
            //
            //
            //

            this.map[key] = value;

            //
            //
            //
            //
            log_Method.EndMethod(log_Reports);
        }