//────────────────────────────────────────
        /// <summary>
        /// 実行。
        /// 
        /// 指定のコントロールの、指定のイベントを実行します。
        /// </summary>
        /// <param name="oEventName"></param>
        /// <param name="oEventName"></param>
        /// <param name="log_Reports"></param>
        private void Execute1b(
            object sender,
            string name_ExpectedUsercontrol,
            string sEventName,
            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, "Execute2", log_Reports);
            //
            //

            Usercontrol foundUsercontrol = null;

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

                //.WriteLine(this.GetType().Name + "#: ■■コントロール=[" + fcUc.ControlCommon.Name.Value + "] イベント数=[" + fcUc.ControlCommon.OEvents.Items.Count + "]");

                if (name_ExpectedUsercontrol == name_CurUsercontrol)
                {
                    foundUsercontrol = curUsercontrol;

                    //.WriteLine(this.GetType().Name + "#: ■■コントロール=[" + fcNameStr2 + "] イベント数=[" + fcUc.ControlCommon.OFcnfControl.OEvents.Count + "]");

                    Configurationtree_Node hitEvent_Cnf = null;
                    List<Configurationtree_Node> list_EventCnf = curUsercontrol.ControlCommon.Configurationtree_Control.GetChildrenByNodename(NamesNode.S_EVENT, false, log_Reports);
                    foreach (Configurationtree_Node event_Cnf in list_EventCnf)
                    {
                        string name_Fnc;
                        event_Cnf.Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out name_Fnc, false, log_Reports);

                        if (name_Fnc == sEventName)
                        {
                            hitEvent_Cnf = event_Cnf;
                        }
                    }

                    if (null != hitEvent_Cnf)
                    {
                        //
                        // 最初の<event>要素
                        //
                        Executer2_EventImpl exe1 = new Executer2_EventImpl();
                        exe1.Execute2_Event(
                            sender,
                            hitEvent_Cnf,
                            owner_MemoryApplication,
                            log_Reports
                            );
                    }
                    else
                    {
                        string sFcName3 = curUsercontrol.ControlCommon.Expression_Name_Control.Execute4_OnExpressionString(
                            EnumHitcount.Unconstraint,
                            log_Reports
                            );

                        {
                            Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                            tmpl.SetParameter(1, sFcName3, log_Reports);//コントロール名
                            tmpl.SetParameter(2, sEventName, log_Reports);//イベント名

                            owner_MemoryApplication.CreateErrorReport("Er:110027;", tmpl, log_Reports);
                        }
                    }

                }//nFcName_prm
            });

            //loop_end:
            //.WriteLine(this.GetType().Name + "#: 【アクション_パフォーマー終了】");

            if (null == foundUsercontrol)
            {
                goto gt_Error_NotFoundUsercontrol;
            }

            goto gt_EndMethod;
            //
            //
            #region 異常系
            //────────────────────────────────────────
            gt_Error_NotFoundUsercontrol:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, name_ExpectedUsercontrol, log_Reports);//コントロール名

                owner_MemoryApplication.CreateErrorReport("Er:110028;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
            gt_EndMethod:
            log_Method.EndMethod(log_Reports);
        }
示例#2
0
        //────────────────────────────────────────

        /// <summary>
        /// 実行。
        ///
        /// 指定のコントロールの、指定のイベントを実行します。
        /// </summary>
        /// <param name="oEventName"></param>
        /// <param name="oEventName"></param>
        /// <param name="log_Reports"></param>
        private void Execute1b(
            object sender,
            string name_ExpectedUsercontrol,
            string sEventName,
            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, "Execute2", log_Reports);
            //
            //

            Usercontrol foundUsercontrol = null;

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


                //.WriteLine(this.GetType().Name + "#: ■■コントロール=[" + fcUc.ControlCommon.Name.Value + "] イベント数=[" + fcUc.ControlCommon.OEvents.Items.Count + "]");

                if (name_ExpectedUsercontrol == name_CurUsercontrol)
                {
                    foundUsercontrol = curUsercontrol;


                    //.WriteLine(this.GetType().Name + "#: ■■コントロール=[" + fcNameStr2 + "] イベント数=[" + fcUc.ControlCommon.OFcnfControl.OEvents.Count + "]");

                    Configurationtree_Node hitEvent_Cnf         = null;
                    List <Configurationtree_Node> list_EventCnf = curUsercontrol.ControlCommon.Configurationtree_Control.GetChildrenByNodename(NamesNode.S_EVENT, false, log_Reports);
                    foreach (Configurationtree_Node event_Cnf in list_EventCnf)
                    {
                        string name_Fnc;
                        event_Cnf.Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out name_Fnc, false, log_Reports);

                        if (name_Fnc == sEventName)
                        {
                            hitEvent_Cnf = event_Cnf;
                        }
                    }

                    if (null != hitEvent_Cnf)
                    {
                        //
                        // 最初の<event>要素
                        //
                        Executer2_EventImpl exe1 = new Executer2_EventImpl();
                        exe1.Execute2_Event(
                            sender,
                            hitEvent_Cnf,
                            owner_MemoryApplication,
                            log_Reports
                            );
                    }
                    else
                    {
                        string sFcName3 = curUsercontrol.ControlCommon.Expression_Name_Control.Execute4_OnExpressionString(
                            EnumHitcount.Unconstraint,
                            log_Reports
                            );

                        {
                            Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                            tmpl.SetParameter(1, sFcName3, log_Reports);   //コントロール名
                            tmpl.SetParameter(2, sEventName, log_Reports); //イベント名

                            owner_MemoryApplication.CreateErrorReport("Er:110027;", tmpl, log_Reports);
                        }
                    }
                }//nFcName_prm
            });

            //loop_end:
            //.WriteLine(this.GetType().Name + "#: 【アクション_パフォーマー終了】");

            if (null == foundUsercontrol)
            {
                goto gt_Error_NotFoundUsercontrol;
            }

            goto gt_EndMethod;
            //
            //
            #region 異常系
            //────────────────────────────────────────
gt_Error_NotFoundUsercontrol:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, name_ExpectedUsercontrol, log_Reports);//コントロール名

                owner_MemoryApplication.CreateErrorReport("Er:110028;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
gt_EndMethod:
            log_Method.EndMethod(log_Reports);
        }
        //────────────────────────────────────────
        /// <summary>
        /// 実行。
        /// 
        /// 指定のコントロールの、指定のイベントを実行します。
        /// 
        /// アプリケーション起動時に、"OnLoad"を全て実行するなど。
        /// </summary>
        /// <param name="oEventName"></param>
        /// <param name="oEventName"></param>
        /// <param name="log_Reports"></param>
        protected void Execute1_UsercontrolImpl(
            object sender,
            Usercontrol ucFc,
            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_UsercontrolImpl", log_Reports);
            //
            //
            string sFcName2 = ucFc.ControlCommon.Expression_Name_Control.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports);

            if (null == ucFc.ControlCommon.Configurationtree_Control)
            {
                //
                // 「コントロール設定ファイル」が無いコントロールの場合は、無視します。
                //
                goto gt_EndMethod;
            }

            //if (0 < fcUc.ControlCommon.OCnf_Control.OEvents.Count)
            //{
            //    //.WriteLine(this.GetType().Name + "#: ■■コントロール=[" + fcNameStr2 + "] イベント数=[" + fcUc.ControlCommon.OFcnfControl.OEvents.Count + "]");
            //}

            List<Configurationtree_Node> cfList_Event = ucFc.ControlCommon.Configurationtree_Control.GetChildrenByNodename(NamesNode.S_EVENT, false, log_Reports);
            foreach (Configurationtree_Node cf_Event in cfList_Event)
            {

                string sEventName;
                cf_Event.Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sEventName, true, log_Reports);
                if (!log_Reports.Successful)
                {
                    goto gt_EndMethod;
                }

                if (o_Name_Event.SValue == sEventName)
                {
                    Executer2_EventImpl exe1 = new Executer2_EventImpl();
                    exe1.Execute2_Event(
                        sender,
                        cf_Event,
                        owner_MemoryApplication,
                        log_Reports
                        );

                }//oEventName

            }//foreach

            goto gt_EndMethod;
            //
            //
            gt_EndMethod:
            log_Method.EndMethod(log_Reports);
        }
示例#4
0
        //────────────────────────────────────────

        /// <summary>
        /// 実行。
        ///
        /// 指定のコントロールの、指定のイベントを実行します。
        ///
        /// アプリケーション起動時に、"OnLoad"を全て実行するなど。
        /// </summary>
        /// <param name="oEventName"></param>
        /// <param name="oEventName"></param>
        /// <param name="log_Reports"></param>
        protected void Execute1_UsercontrolImpl(
            object sender,
            Usercontrol ucFc,
            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_UsercontrolImpl", log_Reports);
            //
            //
            string sFcName2 = ucFc.ControlCommon.Expression_Name_Control.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports);


            if (null == ucFc.ControlCommon.Configurationtree_Control)
            {
                //
                // 「コントロール設定ファイル」が無いコントロールの場合は、無視します。
                //
                goto gt_EndMethod;
            }



            //if (0 < fcUc.ControlCommon.OCnf_Control.OEvents.Count)
            //{
            //    //.WriteLine(this.GetType().Name + "#: ■■コントロール=[" + fcNameStr2 + "] イベント数=[" + fcUc.ControlCommon.OFcnfControl.OEvents.Count + "]");
            //}


            List <Configurationtree_Node> cfList_Event = ucFc.ControlCommon.Configurationtree_Control.GetChildrenByNodename(NamesNode.S_EVENT, false, log_Reports);

            foreach (Configurationtree_Node cf_Event in cfList_Event)
            {
                string sEventName;
                cf_Event.Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sEventName, true, log_Reports);
                if (!log_Reports.Successful)
                {
                    goto gt_EndMethod;
                }

                if (o_Name_Event.SValue == sEventName)
                {
                    Executer2_EventImpl exe1 = new Executer2_EventImpl();
                    exe1.Execute2_Event(
                        sender,
                        cf_Event,
                        owner_MemoryApplication,
                        log_Reports
                        );
                } //oEventName
            }     //foreach


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