Example #1
0
        //────────────────────────────────────────

        public abstract void Translate(
            Configurationtree_Node cur_Cf,
            Expression_Node_String parent_Ec,
            MemoryApplication memoryApplication,
            Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog,
            Log_Reports log_Reports
            );
Example #2
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);
        }
Example #3
0
        //────────────────────────────────────────
        #endregion



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

        /// <summary>
        /// データソースから値を取得し、コントロールに取り込みます。
        ///
        /// データソースが設定されていない場合は、フォームのクリアーになります。
        /// </summary>
        public void RefreshData(
            Log_Reports log_Reports
            )
        {
            List <Expression_Node_String> ecList_Data       = this.ControlCommon.Expression_Control.SelectDirectchildByNodename(NamesNode.S_DATA, false, EnumHitcount.Unconstraint, log_Reports);
            List <Expression_Node_String> ecList_DataSource = Utility_Expression_NodeImpl.SelectItemsByPmAsCsv(ecList_Data, PmNames.S_ACCESS.Name_Pm, ValuesAttr.S_FROM, false, EnumHitcount.First_Exist, log_Reports);

            if (!log_Reports.Successful)
            {
                goto gt_EndMethod;
            }
            Expression_Node_String ec_DataSource = ecList_DataSource[0];


            if (null == ec_DataSource)
            {
                // データソースが未設定のとき

                this.Items.Clear();
            }
            else
            {
                // データソースが設定されているとき。

                // 未実装 TODO 実装すること。
            }

            goto gt_EndMethod;
            //
            //
            //
            //
gt_EndMethod:
            ;
        }
Example #4
0
        //────────────────────────────────────────

        public FunctionexecutableAbstract(
            Expression_Node_String parent_Expression,
            Configuration_Node cur_Conf
            )
            : base(parent_Expression, cur_Conf)
        {
        }
Example #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);
        }
        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;
        }
        //────────────────────────────────────────
        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);
        }
 //────────────────────────────────────────
 public FunctionexecutableAbstract(
     Expression_Node_String parent_Expression,
     Configuration_Node cur_Conf
     )
     : base(parent_Expression,cur_Conf)
 {
 }
Example #9
0
        public override Expression_Node_Function NewInstance(
            Expression_Node_String parent_Expression, Configuration_Node cur_Conf,
            object /*MemoryApplication*/ owner_MemoryApplication, Log_Reports log_Reports)
        {
            Log_Method log_Method = new Log_MethodImpl(0);

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

            Expression_Node_Function f0 = new Expression_Node_Function34Impl(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.SetAttribute(PmNames.S_NAME.Name_Pm, new Expression_Leaf_StringImpl(NAME_FUNCTION, null, cur_Conf), log_Reports);

            f0.SetAttribute(Expression_Node_Function34Impl.PM_NAME_VAR, new Expression_Node_StringImpl(this, cur_Conf), log_Reports);
            f0.SetAttribute(Expression_Node_Function34Impl.PM_VALUE, new Expression_Node_StringImpl(this, cur_Conf), log_Reports);
            f0.SetAttribute(Expression_Node_Function34Impl.PM_FLOWSKIP, new Expression_Node_StringImpl(this, cur_Conf), log_Reports);

            //
            log_Method.EndMethod(log_Reports);
            return(f0);
        }
Example #10
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);
        }
Example #11
0
        public override Expression_Node_Function NewInstance(
            Expression_Node_String parent_Expression, Configuration_Node my_Conf,
            object /*MemoryApplication*/ owner_MemoryApplication, Log_Reports log_Reports)
        {
            Log_Method log_Method = new Log_MethodImpl(0);

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

            Expression_Node_Function f0 = new Expression_Node_Function48Impl(this.EnumEventhandler, this.List_NameArgumentInitializer, this.Functiontranslatoritem);

            f0.Parent_Expression = parent_Expression;
            f0.Cur_Configuration = my_Conf;
            ((Expression_Node_FunctionAbstract)f0).Owner_MemoryApplication = (MemoryApplication)owner_MemoryApplication;
            //関数名初期化
            f0.SetAttribute(PmNames.S_NAME.Name_Pm, new Expression_Leaf_StringImpl(NAME_FUNCTION, null, my_Conf), log_Reports);

            f0.SetAttribute(Expression_Node_Function48Impl.PM_FILE_IMPORT_LISTFILE, new Expression_Node_StringImpl(this, my_Conf), log_Reports);
            f0.SetAttribute(Expression_Node_Function48Impl.PM_ENCODING_FILEIMPORT, new Expression_Node_StringImpl(this, my_Conf), log_Reports);
            f0.SetAttribute(Expression_Node_Function48Impl.PM_ENCODING_FILEEXPORT, new Expression_Node_StringImpl(this, my_Conf), log_Reports);
            //↓TODO:未記入判定にひっかからなくなるので、初期値は書かない。
            //f0.SetAttribute(Expression_Node_Function48Impl.PM_FIELDSOURCE_IMPORTLISTFILE, new Expression_Node_StringImpl(this, cur_Conf), log_Reports);
            //f0.SetAttribute(Expression_Node_Function48Impl.PM_FIELDDESTINATION_IMPORTLISTFILE, new Expression_Node_StringImpl(this, cur_Conf), log_Reports);

            //
            log_Method.EndMethod(log_Reports);
            return(f0);
        }
Example #12
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);
        }
        //────────────────────────────────────────
        /// <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);
        }
Example #14
0
 //────────────────────────────────────────
 /// <summary>
 /// コンストラクター。
 /// </summary>
 /// <param name="s_ParentNode"></param>
 /// <param name="moOpyopyo"></param>
 public Expression_FvarImpl(
     Expression_Node_String parent_Expression_Node,
     Configuration_Node parent_Configuration_Node,
     MemoryApplication owner_MemoryApplication
     )
     : base(parent_Expression_Node, parent_Configuration_Node, owner_MemoryApplication)
 {
 }
Example #15
0
 /// <summary>
 /// 属性を上書きします。
 /// </summary>
 /// <param name="name_Attribute"></param>
 /// <param name="expr_Attribute"></param>
 /// <param name="log_Reports"></param>
 public void SetAttribute(
     string name_Attribute,
     Expression_Node_String expr_Attribute,
     Log_Reports log_Reports
     )
 {
     this.Dictionary_Expression_Attribute.Set(name_Attribute, expr_Attribute, log_Reports);
 }
Example #16
0
        //────────────────────────────────────────

        /// <summary>
        /// コンストラクター。
        /// </summary>
        /// <param name="e_ParentNode"></param>
        /// <param name="s_ParentNode"></param>
        /// <param name="moOpyopyo"></param>
        public Expression_FparamImpl(
            Expression_Node_String parent_Expression_Node,
            Configurationtree_Node parent_Configurationtree_Node,
            MemoryApplication owner_MemoryApplication
            )
            : base(parent_Expression_Node, parent_Configurationtree_Node, owner_MemoryApplication)
        {
        }
Example #17
0
        /// <summary>
        /// コンストラクター。
        /// </summary>
        public Expression_Leaf_StringImpl(string sHumanInput, Expression_Node_String parent_Expression, Configuration_Node cur_Conf)
        {
            this.sHumanInput = sHumanInput;
            this.parent_Expression = parent_Expression;
            this.cur_Configuration = cur_Conf;

            this.enumHitcount = EnumHitcount.Unconstraint;
            this.dictionary_Expression_Attribute = new Dictionary_Expression_Node_StringImpl(this.Cur_Configuration);
        }
Example #18
0
        //────────────────────────────────────────

        /// <summary>
        /// コンストラクター。
        /// </summary>
        /// <param name="parent_Expression"></param>
        /// <param name="cur_Conf">生成時に指定できないものもある。</param>
        public Expression_Node_StringImpl(Expression_Node_String parent_Expression, Configuration_Node cur_Conf)
        {
            this.parent_Expression = parent_Expression;
            this.cur_Configuration = cur_Conf;

            enumHitcount      = EnumHitcount.Unconstraint;
            this.ecList_Child = new List_Expression_Node_StringImpl(this);
            this.dictionary_Expression_Attribute = new Dictionary_Expression_Node_StringImpl(this.Cur_Configuration);
        }
Example #19
0
        //────────────────────────────────────────

        /// <summary>
        /// 未実装。
        /// </summary>
        /// <param name="oFStrNode"></param>
        /// <param name="nFAelem"></param>
        /// <param name="memoryApplication"></param>
        /// <param name="log_Reports"></param>
        public override void Translate(
            Configurationtree_Node cur_Cf,    //<def-param>
            Expression_Node_String parent_Ec, //親<●●>要素。汎用。
            MemoryApplication memoryApplication,
            Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog,
            Log_Reports log_Reports
            )
        {
        }
 //────────────────────────────────────────
 /// <summary>
 /// コンストラクター。
 /// </summary>
 /// <param name="form"></param>
 public ConfigurationtreeToFunction_ListImpl(
     Expression_Node_String parent_Expression,
     Configuration_Node cur_Conf,
     MemoryApplication owner_MemoryApplication,
     Log_Reports log_Reports
     )
 {
     this.owner_MemoryApplication = owner_MemoryApplication;
 }
        //"f-listbox-for-items",
        //────────────────────────────────────────
        public Expressionv_3FListboxValidationImpl(
            Expression_Node_String parent_Expression, Configurationtree_Node parent_Conf, MemoryApplication owner_MemoryApplication)
            : base(parent_Expression, parent_Conf, owner_MemoryApplication)
        {
            this.Owner_MemoryApplication = owner_MemoryApplication;

            this.list_Expressionv_ADisplay = new List<Expressionv_4ADisplay>();
            this.list_Expressionv_ASelectRecord = new List<Expressionv_4ASelectRecord>();
        }
Example #22
0
        //────────────────────────────────────────

        /// <summary>
        /// コンストラクター。
        /// </summary>
        /// <param name="form"></param>
        public ConfigurationtreeToFunction_ListImpl(
            Expression_Node_String parent_Expression,
            Configuration_Node cur_Conf,
            MemoryApplication owner_MemoryApplication,
            Log_Reports log_Reports
            )
        {
            this.owner_MemoryApplication = owner_MemoryApplication;
        }
Example #23
0
        //────────────────────────────────────────
        /// <summary>
        /// 
        /// </summary>
        /// <param name="nFcNameArray">コントロール名の一覧。</param>
        public AccessorEjector(Expression_Node_String[] ecArray_FcName)
        {
            this.array_Expression_NameUsercontrol = ecArray_FcName;

            this.array_BEnabled_Old = new bool[ecArray_FcName.Length];
            this.array_BAutomaticinputting_Old = new bool[ecArray_FcName.Length];
            this.listArray_Expression_DatasourceQuery_Old = new List<Expression_Node_String>[ecArray_FcName.Length];//NString
            this.listArray_Expression_DatatargetQuery_Old = new List<Expression_Node_String>[ecArray_FcName.Length];//NString
        }
 //────────────────────────────────────────
 /// <summary>
 /// 未実装。
 /// </summary>
 /// <param name="oFStrNode"></param>
 /// <param name="nFAelem"></param>
 /// <param name="memoryApplication"></param>
 /// <param name="log_Reports"></param>
 public override void Translate(
     Configurationtree_Node cur_Cf,//<def-param>
     Expression_Node_String parent_Ec,//親<●●>要素。汎用。
     MemoryApplication memoryApplication,
     Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog,
     Log_Reports log_Reports
     )
 {
 }
Example #25
0
        //────────────────────────────────────────
        /// <summary>
        /// コンストラクター。
        /// </summary>
        /// <param name="parent_Expression"></param>
        /// <param name="cur_Conf">生成時に指定できないものもある。</param>
        public Expression_Node_StringImpl(Expression_Node_String parent_Expression, Configuration_Node cur_Conf)
        {
            this.parent_Expression = parent_Expression;
            this.cur_Configuration = cur_Conf;

            enumHitcount = EnumHitcount.Unconstraint;
            this.ecList_Child = new List_Expression_Node_StringImpl(this);
            this.dictionary_Expression_Attribute = new Dictionary_Expression_Node_StringImpl(this.Cur_Configuration);
        }
Example #26
0
        /// <summary>
        /// コンストラクター。
        /// </summary>
        public Expression_Leaf_StringImpl(string sHumanInput, Expression_Node_String parent_Expression, Configuration_Node cur_Conf)
        {
            this.sHumanInput       = sHumanInput;
            this.parent_Expression = parent_Expression;
            this.cur_Configuration = cur_Conf;

            this.enumHitcount = EnumHitcount.Unconstraint;
            this.dictionary_Expression_Attribute = new Dictionary_Expression_Node_StringImpl(this.Cur_Configuration);
        }
Example #27
0
        //────────────────────────────────────────

        public Expressionv_3FListboxValidationImpl(
            Expression_Node_String parent_Expression, Configurationtree_Node parent_Conf, MemoryApplication owner_MemoryApplication)
            : base(parent_Expression, parent_Conf, owner_MemoryApplication)//"f-listbox-for-items",
        {
            this.Owner_MemoryApplication = owner_MemoryApplication;

            this.list_Expressionv_ADisplay      = new List <Expressionv_4ADisplay>();
            this.list_Expressionv_ASelectRecord = new List <Expressionv_4ASelectRecord>();
        }
Example #28
0
        //────────────────────────────────────────
        #endregion



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

        /// <summary>
        /// 実行。
        ///
        /// 指定のコントロールの、指定のイベントを実行します。
        ///
        /// todo:どこで利用されている?
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="nFcName">コントロール名。</param>
        /// <param name="oEventName"></param>
        /// <param name="log_Reports"></param>
        public void Execute1_Usercontrol(
            object sender,
            Expression_Node_String ec_FcName,
            XenonName o_Name_Event,
            MemoryApplication owner_MemoryApplication,
            Log_Reports log_Reports
            )
        {
            //.WriteLine(this.GetType().Name + "#PerformFc: 【アクション_パフォーマー開始】");

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

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

            Usercontrol ucFc = null;

            string sFcName1 = ec_FcName.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports);

            owner_MemoryApplication.MemoryForms.ForEach_Children(delegate(string sKey, Usercontrol ucFc2, ref bool bRemove, ref bool bBreak)
            {
                string sFcName2 = ucFc2.ControlCommon.Expression_Name_Control.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports);

                if (sFcName2 == sFcName1)
                {
                    ucFc = ucFc2;
                }
            });

            if (null != ucFc)
            {
                // 一致したfcUcがあれば、一致した最後のfcUcを。
                this.Execute1_UsercontrolImpl(
                    sender,
                    ucFc,
                    o_Name_Event,
                    owner_MemoryApplication,
                    log_Reports
                    );
            }
            else
            {
                //
                //
                //
                //.WriteLine(this.GetType().Name + "#PerformFc: ■[" + sFcName_prm + "]という名前のコントロールはありませんでした。");
            }


            //
            //
            log_Method.EndMethod(log_Reports);

            //.WriteLine(this.GetType().Name + "#PerformFc: 【アクション_パフォーマー終了】");
        }
Example #29
0
 /// <summary>
 /// E_Elm属性。
 /// </summary>
 /// <param name="out_E_Result">検索結果。</param>
 /// <param name="sName"></param>
 /// <param name="bRequired"></param>
 /// <param name="hits"></param>
 /// <param name="log_Reports"></param>
 /// <returns>検索結果が1件以上あれば真。</returns>
 public bool TrySelectAttribute(
     out Expression_Node_String ec_Result_Out,
     string sName,
     EnumHitcount hits,
     Log_Reports log_Reports
     )
 {
     return(this.Dictionary_Expression_Attribute.TrySelect(
                out ec_Result_Out, sName, hits, log_Reports));
 }
Example #30
0
        //────────────────────────────────────────

        public Expressionv_4ASelectRecordImpl(Expression_Node_String parent_Expression_Node, Configurationtree_Node parent_Configurationtree_Node, MemoryApplication owner_MemoryApplication)
            : base(parent_Expression_Node, parent_Configurationtree_Node, owner_MemoryApplication)//
        {
            this.expression_Field       = new Expression_Node_StringImpl(parent_Expression_Node, parent_Configurationtree_Node);
            this.expression_LookupVal   = new Expression_Node_StringImpl(parent_Expression_Node, parent_Configurationtree_Node);
            this.expression_Required    = new Expression_Node_StringImpl(parent_Expression_Node, parent_Configurationtree_Node);
            this.expression_From        = new Expression_Node_StringImpl(parent_Expression_Node, parent_Configurationtree_Node);
            this.expression_Storage     = new Expression_Node_StringImpl(parent_Expression_Node, parent_Configurationtree_Node);
            this.expression_Description = new Expression_Node_StringImpl(parent_Expression_Node, parent_Configurationtree_Node);
        }
Example #31
0
        //────────────────────────────────────────

        /// <summary>
        /// コンストラクター。
        /// </summary>
        /// <param name="moOpyopyo"></param>
        /// <param name="s_ParentNode"></param>
        public Expression_ValuecontrolImpl(
            Expression_Node_String ec_FcName,
            MemoryApplication owner_MemoryApplication,
            Expression_Node_String parent_Expression_Node,
            Configurationtree_Node parent_Configurationtree_Node
            )
            : base(parent_Expression_Node, parent_Configurationtree_Node, owner_MemoryApplication)
        {
            this.expression_UsercontrolName = ec_FcName;
        }
 //────────────────────────────────────────
 /// <summary>
 /// コンストラクター。
 /// </summary>
 /// <param name="moOpyopyo"></param>
 /// <param name="s_ParentNode"></param>
 public Expression_ValuecontrolImpl(
     Expression_Node_String ec_FcName,
     MemoryApplication owner_MemoryApplication,
     Expression_Node_String parent_Expression_Node,
     Configurationtree_Node parent_Configurationtree_Node
     )
     : base(parent_Expression_Node, parent_Configurationtree_Node, owner_MemoryApplication)
 {
     this.expression_UsercontrolName = ec_FcName;
 }
 //
 //────────────────────────────────────────
 public Expressionv_4ASelectRecordImpl(Expression_Node_String parent_Expression_Node, Configurationtree_Node parent_Configurationtree_Node, MemoryApplication owner_MemoryApplication)
     : base(parent_Expression_Node, parent_Configurationtree_Node, owner_MemoryApplication)
 {
     this.expression_Field = new Expression_Node_StringImpl(parent_Expression_Node, parent_Configurationtree_Node);
     this.expression_LookupVal = new Expression_Node_StringImpl(parent_Expression_Node, parent_Configurationtree_Node);
     this.expression_Required = new Expression_Node_StringImpl(parent_Expression_Node, parent_Configurationtree_Node);
     this.expression_From = new Expression_Node_StringImpl(parent_Expression_Node, parent_Configurationtree_Node);
     this.expression_Storage = new Expression_Node_StringImpl(parent_Expression_Node, parent_Configurationtree_Node);
     this.expression_Description = new Expression_Node_StringImpl(parent_Expression_Node, parent_Configurationtree_Node);
 }
Example #34
0
        /// <summary>
        /// レコードセットの取得。
        /// </summary>
        /// <param name="eName"></param>
        /// <param name="log_Reports"></param>
        /// <returns>該当がなければヌル。</returns>
        public RecordSet Get(Expression_Node_String ec_Name,
                             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, "Get", log_Reports);
            //
            //

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


            RecordSet nResult;

            try
            {
                //ystem.Console.WriteLine(Info_N.LibraryName + ":" + this.GetType().Name + "#Remove: 【レコードセット削除】sName=[" + sName + "]");
                nResult = this.dictionary_Recordset[sName];
            }
            catch (KeyNotFoundException ex)
            {
                nResult = null;

                {
                    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:6043;", tmpl, log_Reports);
                }
            }
            catch (Exception ex)
            {
                nResult = null;

                {
                    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:6044;", tmpl, log_Reports);
                }
            }

            //
            //
            //
            //

            log_Method.EndMethod(log_Reports);
            return(nResult);
        }
Example #35
0
 /// <summary>
 /// 属性。
 /// </summary>
 /// <param name="out_E_Result">検索結果。</param>
 /// <param name="sName"></param>
 /// <param name="bRequired"></param>
 /// <param name="hits"></param>
 /// <param name="log_Reports"></param>
 /// <returns>検索結果が1件以上あれば真。</returns>
 public bool TrySelectAttribute(
     out Expression_Node_String ec_Result_Out,
     string sName,
     EnumHitcount hits,
     Log_Reports log_Reports
     )
 {
     // 使いません。
     ec_Result_Out = new Expression_Node_StringImpl(this, this.Cur_Configuration);
     return(false);
 }
Example #36
0
        //────────────────────────────────────────

        /// <summary>
        /// コンストラクター。
        /// </summary>
        public Expression_TexttemplateP1pImpl(Expression_Node_String parent_Expr, Configurationtree_Node cur_Conf)
        {
            this.parent_Expression     = parent_Expr;
            this.cur_Configurationtree = cur_Conf;

            this.requestItems = EnumHitcount.Unconstraint;

            this.dictionary_P1p                  = new Dictionary <int, string>();
            this.list_Expression_Child           = new List_Expression_Node_StringImpl(this);//使いません。
            this.dictionary_Expression_Attribute = new Dictionary_Expression_Node_StringImpl(this.Cur_Configuration);
        }
Example #37
0
        /// <summary>
        /// 込み入った処理が必要なこともあるので、コンストラクターとは分けています。
        /// </summary>
        /// <param name="parent_Expression"></param>
        /// <param name="cur_Conf"></param>
        /// <param name="owner_MemoryApplication"></param>
        /// <param name="log_Reports"></param>
        /// <returns></returns>
        public virtual Expression_Node_Function NewInstance(
            Expression_Node_String parent_Expression,
            Configuration_Node cur_Conf,
            object /*MemoryApplication*/ owner_MemoryApplication,
            Log_Reports log_Reports)
        {
            Expression_Node_FunctionImpl expr_Func = new Expression_Node_FunctionImpl(parent_Expression, cur_Conf, this.List_NameArgumentInitializer);

            expr_Func.Owner_MemoryApplication = (MemoryApplication)owner_MemoryApplication;
            return(expr_Func);
        }
        //────────────────────────────────────────
        /// <summary>
        /// コンストラクター。
        /// </summary>
        public Expression_TexttemplateP1pImpl(Expression_Node_String parent_Expr, Configurationtree_Node cur_Conf)
        {
            this.parent_Expression = parent_Expr;
            this.cur_Configurationtree = cur_Conf;

            this.requestItems = EnumHitcount.Unconstraint;

            this.dictionary_P1p = new Dictionary<int, string>();
            this.list_Expression_Child = new List_Expression_Node_StringImpl(this);//使いません。
            this.dictionary_Expression_Attribute = new Dictionary_Expression_Node_StringImpl(this.Cur_Configuration);
        }
Example #39
0
        //────────────────────────────────────────

        /// <summary>
        /// コンストラクター。
        /// </summary>
        /// <param name="parent_Expression">生成時はヌルを入れておいて、#NewInstanceで後から設定することもできます。</param>
        /// <param name="cur_Conf">生成時はヌルを入れておいて、#NewInstanceで後から設定することもできます。</param>
        public Expression_Node_FunctionImpl(
            Expression_Node_String parent_Expression,
            Configuration_Node cur_Conf,
            List <string> list_NameArgumentInitializer
            )
            : base(parent_Expression, cur_Conf)
        {
            this.dictionary_Expression_Parameter = new Dictionary_Expression_Node_StringImpl(cur_Conf);
            this.functionparameterset            = new FunctionparametersetImpl();

            this.list_NameArgumentInitializer = list_NameArgumentInitializer;// new List<string>();
        }
        //────────────────────────────────────────
        /// <summary>
        /// コンストラクター。
        /// </summary>
        /// <param name="parent_Expression">生成時はヌルを入れておいて、#NewInstanceで後から設定することもできます。</param>
        /// <param name="cur_Conf">生成時はヌルを入れておいて、#NewInstanceで後から設定することもできます。</param>
        public Expression_Node_FunctionImpl(
            Expression_Node_String parent_Expression,
            Configuration_Node cur_Conf,
            List<string> list_NameArgumentInitializer
            )
            : base(parent_Expression, cur_Conf)
        {
            this.dictionary_Expression_Parameter = new Dictionary_Expression_Node_StringImpl(cur_Conf);
            this.functionparameterset = new FunctionparametersetImpl();

            this.list_NameArgumentInitializer = list_NameArgumentInitializer;// new List<string>();
        }
Example #41
0
 //────────────────────────────────────────
 public SelectstatementImpl(Expression_Node_String parent_Expr, Configuration_Node parent_Conf)
 {
     this.parent = parent_Conf;
     this.List_SName_SelectField = new List<string>();
     this.Expression_From = new Expression_Node_StringImpl(parent_Expr, parent_Conf);
     this.Expression_Into = new Expression_Node_StringImpl(parent_Expr, parent_Conf);
     this.Expression_Where_RecordSetLoadFrom = new Expression_Node_StringImpl(parent_Expr, parent_Conf);
     this.EnumWherelogic = EnumLogic.And;//whereのlogic属性のデフォルト。
     this.list_Recordcondition = new List<Recordcondition>();
     this.Required = "";
     this.Storage = "";
     this.Description = "";
 }
Example #42
0
        //────────────────────────────────────────

        public SelectstatementImpl(Expression_Node_String parent_Expr, Configuration_Node parent_Conf)
        {
            this.parent = parent_Conf;
            this.List_SName_SelectField             = new List <string>();
            this.Expression_From                    = new Expression_Node_StringImpl(parent_Expr, parent_Conf);
            this.Expression_Into                    = new Expression_Node_StringImpl(parent_Expr, parent_Conf);
            this.Expression_Where_RecordSetLoadFrom = new Expression_Node_StringImpl(parent_Expr, parent_Conf);
            this.EnumWherelogic       = EnumLogic.And;//whereのlogic属性のデフォルト。
            this.list_Recordcondition = new List <Recordcondition>();
            this.Required             = "";
            this.Storage     = "";
            this.Description = "";
        }
        public override Expression_Node_Function NewInstance(
            Expression_Node_String parent_Expression, Configuration_Node cur_Conf,
            object/*MemoryApplication*/ owner_MemoryApplication, Log_Reports log_Reports)
        {
            Expression_Node_Function f0 = new Expression_Node_Function11Impl(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.SetAttribute(PmNames.S_NAME.Name_Pm, new Expression_Leaf_StringImpl(NAME_FUNCTION, null, cur_Conf), log_Reports);

            return f0;
        }
Example #44
0
        //────────────────────────────────────────
        #endregion



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

        /// <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);
        }
Example #45
0
        //────────────────────────────────────────
        #endregion



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

        /// <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);
        }
Example #46
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);
        }
Example #47
0
        public string GetMessage(Log_Reports log_Reports)
        {
            Expression_Node_String expr_Str = this.p1pText.Compile(log_Reports);

            StringBuilder sb = new StringBuilder();

            sb.Append(expr_Str.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports));
            sb.Append(System.Environment.NewLine);

            // コールスタックを付けます。
            sb.Append(this.text_Callstack);

            return(sb.ToString());
        }
Example #48
0
        public override Expression_Node_Function NewInstance(
            Expression_Node_String parent_Expression, Configuration_Node cur_Conf,
            object /*MemoryApplication*/ owner_MemoryApplication, Log_Reports log_Reports)
        {
            Expression_Node_Function f0 = new Expression_Node_Function21Impl(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.SetAttribute(PmNames.S_NAME.Name_Pm, new Expression_Leaf_StringImpl(NAME_FUNCTION, null, cur_Conf), log_Reports);

            return(f0);
        }
Example #49
0
        //────────────────────────────────────────
        /// <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;
        }
Example #50
0
        //────────────────────────────────────────
        /// <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);
        }
        //────────────────────────────────────────
        /// <summary>
        /// このデータ・ターゲットに指定されている場所へ、値をセットします。
        /// </summary>
        /// <returns>成功すれば真。</returns>
        public void ToMemory(
            string sValue_Output,
            Expression_Node_String ec_Control,//「Expr■control」相当。
            MemoryApplication moApplication,
            Log_Reports log_Reports
            )
        {
            Log_Method pg_Method = new Log_MethodImpl();
            pg_Method.BeginMethod(Info_Controls.Name_Library, this, "ToM",log_Reports);

            //
            //

            List<Expression_Node_String> listExpr_Data = ec_Control.SelectDirectchildByNodename(NamesNode.S_DATA, false, EnumHitcount.Unconstraint, log_Reports);
            List<Expression_Node_String> listExpr_DataTarget = Utility_Expression_NodeImpl.SelectItemsByPmAsCsv(listExpr_Data, PmNames.S_ACCESS.Name_Pm, ValuesAttr.S_TO, false, EnumHitcount.First_Exist, log_Reports);
            if (!log_Reports.Successful)
            {
                goto gt_EndMethod;
            }
            Expression_Node_String ec_DataTarget = listExpr_DataTarget[0];

            this.ToMemory_ParentFcells(
                sValue_Output,
                ec_DataTarget,
                moApplication,
                log_Reports
                );

            //essageBox.Show("アップデートデータ【終了】", "(FormsImpl)" + this.GetType().NFcName + "#:");
            //.WriteLine(this.GetType().NFcName + "#: 【終了】");

            //
            //
            //
            //
            goto gt_EndMethod;

            gt_EndMethod:
            pg_Method.EndMethod(log_Reports);

            // 正常終了
            return;
        }
        public override Expression_Node_Function NewInstance(
            Expression_Node_String parent_Expression, Configuration_Node cur_Conf,
            object/*MemoryApplication*/ owner_MemoryApplication, Log_Reports log_Reports)
        {
            Log_Method log_Method = new Log_MethodImpl(0);
            log_Method.BeginMethod(Info_Functions.Name_Library, this, "NewInstance",log_Reports);
            //

            Expression_Node_Function f0 = new Expression_Node_Function46Impl(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.SetAttribute(PmNames.S_NAME.Name_Pm, new Expression_Leaf_StringImpl(NAME_FUNCTION, null, cur_Conf), log_Reports);

            f0.SetAttribute(Expression_Node_Function46Impl.PM_MESSAGE, new Expression_Node_StringImpl(this, cur_Conf), log_Reports);

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

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

            ConfigurationtreeToExpression_F14_FncImpl_ dammy = new ConfigurationtreeToExpression_F14_FncImpl_();//メソッドが使いたいだけなので、何でもいい。
            dammy.ParseAttr_InConfigurationtreeToExpression(
                cur_Cf,
                cur_Ec,
                bRequired_NameAttr,
                bRequired_ValueAttrIsChild,
                log_Reports
                );

            goto gt_EndMethod;
            //
            //
            gt_EndMethod:

            if (Log_ReportsImpl.BDebugmode_Static)
            {
                //d_ParsingLog.Decrement(s_Cur.Name_Node);
            }
            log_Method.EndMethod(log_Reports);
        }
Example #54
0
 /// <summary>
 /// コンストラクター。
 /// node_Configurationtree を後で InitializeBeforeuse を使って指定する必要がある。
 /// </summary>
 /// <param name="parent_Expression"></param>
 public Expression_Node_StringImpl(Expression_Node_String parent_Expression)
     : this(parent_Expression, null)
 {
 }
        //────────────────────────────────────────
        /// <summary>
        /// 読取。
        /// </summary>
        /// <param name="s_View"></param>
        /// <param name="ef_View"></param>
        /// <param name="moOpyopyo"></param>
        /// <param name="log_Reports"></param>
        public void Translate(
            Configurationtree_Node cur_Cf,//<view>
            Expression_Node_String parent_Ec,//「E■form-component」
            MemoryApplication memoryApplication,
            Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);
            log_Method.BeginMethod(Info_ConfigurationtreeToExpression.Name_Library, this, "SToE",log_Reports);

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

            //
            //
            //
            //

            //
            //
            //
            // 自
            //
            //
            //

            Expression_Node_StringImpl cur_Ec = new Expression_Node_StringImpl(parent_Ec, cur_Cf);

            //
            //
            //
            // 子
            //
            //
            //
            {
                //<●●>要素を全検索。<f-list-box-labels>があることが期待されます。

                cur_Cf.List_Child.ForEach(delegate(Configurationtree_Node cf_Child, ref bool bBreak)
                {
                    if (cf_Child is Configurationtree_Node)
                    {
                        Configurationtree_Node cf_Node = (Configurationtree_Node)cf_Child;

                        string sName_Node = cf_Node.Name;
                        string sName_Fnc = "";
                        {
                            bool bRequired;

                            if (NamesNode.S_FNC == sName_Node)
                            {
                                bRequired = true;
                            }
                            else
                            {
                                bRequired = false;
                            }

                            // todo; 子要素のnameも取りたい。
                            cf_Node.Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sName_Fnc, bRequired, log_Reports);
                        }

                        if (NamesNode.S_FNC == sName_Node && NamesFnc.S_LISTBOX_LABELS == sName_Fnc)
                        {
                            // 「S■fnc name=”Sf:f-listbox-labels;”」

                            ConfigurationtreeToExpression_F91_FListboxLabelsImpl_ to = new ConfigurationtreeToExpression_F91_FListboxLabelsImpl_();
                            to.Translate(
                                cf_Child,
                                cur_Ec,
                                memoryApplication,
                                pg_ParsingLog,
                                log_Reports
                                );
                        }
                        else
                        {
                            // エラー
                            {
                                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                                tmpl.SetParameter(1, sName_Node, log_Reports);//設定ノード名
                                tmpl.SetParameter(2, sName_Fnc, log_Reports);//関数名

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

                            bBreak = true;
                        }
                    }
                });
            }

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

            goto gt_EndMethod;
            //
            //

            gt_EndMethod:
            if (Log_ReportsImpl.BDebugmode_Static)
            {
                pg_ParsingLog.Decrement(cur_Cf.Name);
            }
            log_Method.EndMethod(log_Reports);
        }
        //────────────────────────────────────────
        public void Translate(
            Configurationtree_Node cur_Cf,//コントロール
            Expression_Node_String ec_Cur,//「E■form-component」
            MemoryApplication memoryApplication,
            Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog,
            Log_Reports log_Reports
            )
        {
            List<Configurationtree_Node> cfList_Data = cur_Cf.GetChildrenByNodename(NamesNode.S_DATA, false, log_Reports);
            foreach (Configurationtree_Node cf_Data in cfList_Data)
            {
                string sAccess;
                cf_Data.Dictionary_Attribute.TryGetValue(PmNames.S_ACCESS, out sAccess, false, log_Reports);

                List<string> sList_Access = new CsvTo_ListImpl().Read(sAccess);

                if (sList_Access.Contains(ValuesAttr.S_FROM))
                {
                    // <data>要素(access="from")を S→E。

                    ConfigurationtreeToExpression_F12_ to = new ConfigurationtreeToExpression_F12_DataImpl_();
                    to.Translate(
                        cf_Data,
                        ec_Cur,
                        memoryApplication,
                        pg_ParsingLog,
                        log_Reports
                        );
                }

                // fromとtoは、両方持つこともある。

                if (sList_Access.Contains(ValuesAttr.S_TO))
                {
                    // <data>(access="to")要素要素を S→E。

                    ConfigurationtreeToExpression_F12_ to = new ConfigurationtreeToExpression_F12_DataImpl_();
                    to.Translate(
                        cf_Data,
                        ec_Cur,
                        memoryApplication,
                        pg_ParsingLog,
                        log_Reports
                        );
                }
            }

            //
            // <view>要素を S→E。
            List<Configurationtree_Node> sList_View = cur_Cf.GetChildrenByNodename(NamesNode.S_VIEW, false, log_Reports);
            if(1<sList_View.Count)
            {
                // <view>要素は1個だけあるという前提。
                throw new Exception("<[" + NamesNode.S_VIEW + "]>要素が2個以上あるのはエラー。");
            }
            else if (0 < sList_View.Count)
            {
                Configurationtree_Node cf_View = sList_View[0];

                ConfigurationtreeToExpression_F12_ViewImpl_ to = new ConfigurationtreeToExpression_F12_ViewImpl_();
                to.Translate(
                    cf_View,
                    ec_Cur,//.E_View,
                    memoryApplication,
                    pg_ParsingLog,
                    log_Reports
                    );
            }
            else
            {
            }
        }
        //────────────────────────────────────────
        public void ToMemory_DataTargetFcell(
            string sValue_Output,
            Expression_Node_String ec_SfCell,//Sf:cell;
            MemoryApplication moApplication,
            Log_Reports log_Reports
            )
        {
            Log_Method pg_Method = new Log_MethodImpl(0);
            pg_Method.BeginMethod(Info_Controls.Name_Library, this, "ToM_DataTargetFcell",log_Reports);
            //
            //

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

            // ■f-cellの子要素
            Expression_Node_String ec_KeyExpected1 = null;
            int nKeyCount = 0;
            {
                //
                //「E■f-cell」の子要素のリスト。
                ec_SfCell.List_Expression_Child.ForEach(delegate(Expression_Node_String e_Item, ref bool bRemove2, ref bool bBreak2)
                {
                    // キー値 が1つ入っています。
                    ec_KeyExpected1 = e_Item;
                    nKeyCount++;
                });
            }

            // それでも @keyValueを取得できなければ。
            if (null == ec_KeyExpected1)
            {
                //「E■rec-cond」を調べる。
                Expression_Node_String ec_Where;
                bool bHit2 = ec_SfCell.TrySelectAttribute(out ec_Where, PmNames.S_WHERE.Name_Pm, EnumHitcount.One_Or_Zero, log_Reports);
                if (bHit2)
                {
                    ec_Where.List_Expression_Child.ForEach(delegate(Expression_Node_String e_Item, ref bool bRemove2, ref bool bBreak2)
                    {
                        if (NamesNode.S_FNC == e_Item.Cur_Configuration.Name)
                        {
                            //ystem.Console.WriteLine(Info_Forms.LibraryName + ":" + this.GetType().Name + "#ToM: 「E■f-cell」の「E■@where」属性の下の「E■fnc」を解析。その子要素がvalue相当であるはず。");
                            ec_KeyExpected1 = e_Item;
                        }
                        else
                        {
                        }

                    });
                }
            }

            if (1 < nKeyCount)
            {
                ec_KeyExpected1 = null;

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

                    Log_TextIndented s = new Log_TextIndentedImpl();

                    s.Append("「E■f-cell」系要素の子要素が、「E■rec-cond」を除いて[" + nKeyCount + "]個ありました。");
                    s.Newline();

                    s.Append("この子要素は キー値になるもので、1個でなければいけません。");
                    s.Newline();

                    // 一覧
                    s.Append("──────────子要素名一覧");
                    s.Newline();

                    ec_SfCell.List_Expression_Child.ForEach(delegate(Expression_Node_String e_Str1, ref bool bRemove2, ref bool bBreak2)
                    {
                        if ("" == e_Str1.Cur_Configuration.Name)
                        {
                            s.Append("E■(要素名無し)");
                            s.Newline();
                        }
                        else
                        {
                            s.Append("E■");
                            s.Append(e_Str1.Cur_Configuration.Name);
                            s.Newline();
                        }
                    });
                    s.Append("──────────");
                    s.Newline();

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

                    r.Message = s.ToString();
                    log_Reports.EndCreateReport();
                }
            }
            else if (null == ec_KeyExpected1)
            {
                if (log_Reports.CanCreateReport)
                {
                    Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                    r.SetTitle("▲エラー312!", pg_Method);

                    Log_TextIndented s = new Log_TextIndentedImpl();

                    //s.Append("「E■f-cell」系要素の子要素に、「E■f-text」や「E■f-cell」が無いのか、有っても値がありませんでした。");
                    s.Append("「E■f-cell」の「keyValue」相当の値が指定されていませんでした。");
                    s.Newline();

                    // 一覧
                    s.Append("──────────子要素名一覧");
                    s.Newline();
                    ec_SfCell.List_Expression_Child.ForEach(delegate(Expression_Node_String e_Str1, ref bool bRemove2, ref bool bBreak2)
                    {
                        if ("" == e_Str1.Cur_Configuration.Name)
                        {
                            s.Append("E■(要素名無し)");
                            s.Newline();
                        }
                        else
                        {
                            s.Append("E■");
                            s.Append(e_Str1.Cur_Configuration.Name);
                            s.Newline();
                        }
                    });
                    s.Append("──────────");
                    s.Newline();

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

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

            if (log_Reports.Successful)
            {

                //
                // <f-cell>1つにつき。
                //
                ExpressionToMemory_FcellImpl to = new ExpressionToMemory_FcellImpl();
                to.Translate(
                    sValue_Output,
                    ec_KeyExpected1,
                    ec_SfCell,// <f-cell>相当と想定。
                    moApplication,
                    log_Reports
                    );
            }

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

                Log_TextIndented s = new Log_TextIndentedImpl();

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

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

                r.Message = s.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;
            //
            //
            gt_EndMethod:
            pg_Method.EndMethod(log_Reports);
        }
        //────────────────────────────────────────
        public void ToMemory_ParentFcells(
            string sValue_Output,
            Expression_Node_String parent_Expr_Fcells,//子「Sf:Cell;」関数を持った親要素。
            MemoryApplication moApplication,
            Log_Reports log_Reports
            )
        {
            Log_Method pg_Method = new Log_MethodImpl();
            pg_Method.BeginMethod(Info_Controls.Name_Library, this, "ToM_ParentFcells",log_Reports);
            //
            //

            // <data>の子要素のリスト。
            parent_Expr_Fcells.List_Expression_Child.ForEach(delegate(Expression_Node_String child_Expr, ref bool bRemove, ref bool bBreak)
            {
                string sName_Fnc;
                child_Expr.TrySelectAttribute(out sName_Fnc, PmNames.S_NAME.Name_Pm, EnumHitcount.One, log_Reports);

                if (log_Reports.Successful)
                {
                    if (NamesFnc.S_CELL == sName_Fnc)
                    {
                        // Sf:cell;

                        this.ToMemory_DataTargetFcell(
                            sValue_Output,
                            child_Expr,
                            moApplication,
                            log_Reports
                            );
                    }
                    //else if (NamesNode.S_ARG3 == e_Child.Cur_Configurationtree.Name_Node)
                    //{
                    //    // スルー
                    //    d_InMethod.WarningWrite("[" + e_Child.Cur_Configurationtree.Name_Node + "]ノードを無視しました。");
                    //}
                    else
                    {
                        if (log_Reports.CanCreateReport)
                        {
                            Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                            r.SetTitle("▲エラー377!", pg_Method);

                            Log_TextIndented t = new Log_TextIndentedImpl();

                            t.AppendI(0, "Sf:cell; 以外の要素が指定されていました。");
                            t.Newline();
                            t.AppendI(0, "「データターゲット」または「arg3 to」には、Sf:cell; 要素1つしか指定してはいけません。");
                            t.Newline();
                            t.Newline();

                            t.AppendI(0, "もしかして? 「『Sf:cell;』の親」 を渡すべきところに、「『arg3 to』の親」を渡していませんか?");
                            t.Newline();

                            // ヒント
                            t.AppendI(1, r.Message_Configuration(child_Expr.Cur_Configuration));

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

            goto gt_EndMethod;
            //
            //
            gt_EndMethod:
            pg_Method.EndMethod(log_Reports);
        }
Example #59
0
 /// <summary>
 /// 属性を上書きします。
 /// </summary>
 /// <param name="name_Attribute"></param>
 /// <param name="expr_Attribute"></param>
 /// <param name="log_Reports"></param>
 public void SetAttribute(
     string name_Attribute,
     Expression_Node_String expr_Attribute,
     Log_Reports log_Reports
     )
 {
     this.Dictionary_Expression_Attribute.Set(name_Attribute, expr_Attribute, log_Reports);
 }
Example #60
0
 /// <summary>
 /// E_Elm属性。
 /// </summary>
 /// <param name="out_E_Result">検索結果。</param>
 /// <param name="sName"></param>
 /// <param name="bRequired"></param>
 /// <param name="hits"></param>
 /// <param name="log_Reports"></param>
 /// <returns>検索結果が1件以上あれば真。</returns>
 public bool TrySelectAttribute(
     out Expression_Node_String ec_Result_Out,
     string sName,
     EnumHitcount hits,
     Log_Reports log_Reports
     )
 {
     return this.Dictionary_Expression_Attribute.TrySelect(
         out ec_Result_Out, sName, hits, log_Reports);
 }