Exemplo n.º 1
0
        //────────────────────────────────────────

        /// <summary>
        /// todo:
        /// </summary>
        /// <param nFcName="log_Reports"></param>
        public override void Execute4_OnLr(
            object sender,
            Log_Reports log_Reports
            )
        {
            Log_Method pg_Method = new Log_MethodImpl();

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

            Customcontrol cct = null;

            //
            // コントロール名。
            //
            string sName_Usercontrol;

            if (sender is Customcontrol)
            {
                cct = (Customcontrol)sender;

                sName_Usercontrol = cct.ControlCommon.Expression_Name_Control.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports);

                log_Reports.Comment_EventCreationMe = "[" + sName_Usercontrol + "]コントロールでWrRhnアクションが実行されました。";

                // ステータスバーに、コントロール名を表示。
                //cct.ControlCommon.MoControlMediator.AddStatus_ActionFcName(sName_Usercontrol, log_Reports);
            }
            else
            {
                sName_Usercontrol = "";
                log_Reports.Comment_EventCreationMe = "WrRhnアクションが実行されました。";
            }

            //
            // ストップウォッチ。
            //
            if (log_Reports.CanStopwatch)
            {
                pg_Method.Log_Stopwatch.Message = Utility_Format.Format(
                    sName_Usercontrol,
                    this.ConfigurationtreeToExpression_Event.Name
                    );
                pg_Method.Log_Stopwatch.Begin();
            }

            //
            // 「登録アクション設定」を元に、「アクション」を作成し、実行順に実行。
            //
            if (!this.ConfigurationtreeToExpression_Event.IsTranslated_ConfigurationtreeToExpression)
            {
                this.ConfigurationtreeToExpression_Event.Translate(cct.ControlCommon.Owner_MemoryApplication, log_Reports);
            }

            //EnumEventhandler err_Eh;
            if (log_Reports.Successful)
            {
                foreach (Expression_Node_Function expr_Func in this.List_Item)
                {
                    //
                    // 登録アクション作成・実行ループ。
                    //
                    expr_Func.Execute4_OnLr(
                        sender,
                        log_Reports
                        );
                }
            }

            goto gt_EndMethod;
            //
gt_EndMethod:
            pg_Method.EndMethod(log_Reports);
        }
Exemplo n.º 2
0
        //────────────────────────────────────────
        #endregion



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

        /// <summary>
        /// ドラッグ&ドロップ アクション実行。
        /// </summary>
        /// <param nFcName="sender"></param>
        /// <param nFcName="e"></param>
        public override void Execute4_OnDnD(
            object sender,
            GiveFeedbackEventArgs e
            )
        {
            Log_Method  pg_Method = new Log_MethodImpl(0);
            Log_Reports log_Reports_ThisMethod = new Log_ReportsImpl(pg_Method);

            pg_Method.BeginMethod(Info_Controls.Name_Library, this, "Execute4_OnDnD", log_Reports_ThisMethod);

            //
            //
            //
            //
            Customcontrol cct = null;

            //
            // コントロール名。
            //
            string sName_Usercontrol;

            if (sender is Customcontrol)
            {
                cct = (Customcontrol)sender;

                sName_Usercontrol = cct.ControlCommon.Expression_Name_Control.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports_ThisMethod);

                log_Reports_ThisMethod.Comment_EventCreationMe = "[" + sName_Usercontrol + "]コントロールでドラッグ&ドロップされました。";

                // ステータスバーに、コントロール名を表示。
                //cct.ControlCommon.MoControlMediator.AddStatus_ActionFcName(sName_Usercontrol, d_Logging_Dammy);
            }
            else
            {
                sName_Usercontrol = "";
                log_Reports_ThisMethod.Comment_EventCreationMe = "ドラッグ&ドロップされました。";
            }

            //
            // ストップウォッチ。
            //
            if (log_Reports_ThisMethod.CanStopwatch)
            {
                pg_Method.Log_Stopwatch.Message = Utility_Format.Format(
                    sName_Usercontrol,
                    this.ConfigurationtreeToExpression_Event.Name
                    );
                pg_Method.Log_Stopwatch.Begin();
            }

            //
            // 登録アクション作成・実行ループ。
            //

            // 未作成時「作成」
            if (!this.ConfigurationtreeToExpression_Event.IsTranslated_ConfigurationtreeToExpression)
            {
                this.ConfigurationtreeToExpression_Event.Translate(cct.ControlCommon.Owner_MemoryApplication, log_Reports_ThisMethod);
            }

            // 実行。
            //EnumEventhandler err_Eh;
            if (log_Reports_ThisMethod.Successful)
            {
                foreach (Expression_Node_Function expr_Func in this.List_Item)
                {
                    expr_Func.Execute4_OnDnD(sender, e);
                }
            }

            goto gt_EndMethod;
            //
gt_EndMethod:
            pg_Method.EndMethod(log_Reports_ThisMethod);
            log_Reports_ThisMethod.EndLogging(pg_Method);
        }
Exemplo n.º 3
0
        //────────────────────────────────────────
        #endregion



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

        public override void Execute4_OnOEa(
            object sender, EventArgs e
            )
        {
            Log_Method  pg_Method = new Log_MethodImpl(0);
            Log_Reports log_Reports_ThisMethod = new Log_ReportsImpl(pg_Method);

            pg_Method.BeginMethod(Info_Controls.Name_Library, this, "Execute4_OnOEa", log_Reports_ThisMethod);
            //
            //

            Customcontrol cct = null;

            string sName_Usercontrol;

            if (sender is Customcontrol)
            {
                cct = (Customcontrol)sender;

                sName_Usercontrol = cct.ControlCommon.Expression_Name_Control.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports_ThisMethod);

                log_Reports_ThisMethod.Comment_EventCreationMe = "[" + sName_Usercontrol + "]コントロールでOEaアクションが実行されました。";
            }
            else
            {
                sName_Usercontrol = "";
                log_Reports_ThisMethod.Comment_EventCreationMe = "OEaアクションが実行されました。";
            }


            if (log_Reports_ThisMethod.CanStopwatch)
            {
                string sEventName;
                this.Configurationtree_Event.Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sEventName, true, log_Reports_ThisMethod);

                pg_Method.Log_Stopwatch.Message = Utility_Format.Format(
                    sName_Usercontrol,
                    sEventName
                    );
                pg_Method.Log_Stopwatch.Begin();
            }

            //
            //
            //
            //


            // ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
            // ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
            // ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
            {
                CustomcontrolListbox ccLst = (CustomcontrolListbox)sender;

                //true ||
                if (this.nIndex_PreSelected != ccLst.SelectedIndex)
                {
                    //essageBox.Show(Info_Forms.LibraryName + ":" + this.GetType().Name + "#Perform_OEa: FC[" + fcNameStr + "]で、イベント(リストボックスの項目選択等)が起こりました。 .SelectedIndex=[" + .SelectedIndex + "] preSelectedIndex=["+this.preSelectedIndex+"]");
                }
                else
                {
                    //
                    // リストボックスの selectedIndex が変わっていないとき。
                    //
                    // ※ dataSourceのテーブルの行が変わったりすると、ここに来ます。
                    //
                    return;

                    //essageBox.Show(Info_Forms.LibraryName + ":" + this.GetType().Name + "#Perform_OEa: FC[" + fcNameStr + "]で、イベント(リストボックスの項目選択等)が起こっていません。選択項目インデックスが同じです。 .SelectedIndex=[" + .SelectedIndex + "] preSelectedIndex=[" + this.preSelectedIndex + "]");
                }

                this.nIndex_PreSelected = ccLst.SelectedIndex;
            }


            //
            // 「登録アクション設定」を元に、「アクション」を作成し、実行順に実行。
            //

            Configurationtree_Event.List_Child.ForEach(delegate(Configurationtree_Node systemFunction_Conf, ref bool bBreak)
            {
                Expression_Node_Function expr_Func = cct.ControlCommon.Owner_MemoryApplication.MemoryForms.ConfigurationtreeToFunction.Translate(
                    systemFunction_Conf,
                    true,
                    log_Reports_ThisMethod
                    );

                if (log_Reports_ThisMethod.Successful)
                {
                    //ystem.Console.WriteLine(Info_Forms.LibraryName + ":" + this.GetType().Name + "#Perform_OEa: 何回呼び出される?(B)");
                    expr_Func.Execute4_OnOEa(sender, e);
                }
            });


            goto gt_EndMethod;
            //
gt_EndMethod:
            pg_Method.EndMethod(log_Reports_ThisMethod);
            log_Reports_ThisMethod.EndLogging(pg_Method);
        }
Exemplo n.º 4
0
        //────────────────────────────────────────

        /// <summary>
        /// アクション実行。
        ///
        /// 引数が object と EventArgs の場合。
        ///
        /// ListBox の「項目選択時」は、これではなく、
        /// NEventPerformer_ListboxImpl#Perform_OEa
        /// を使ってください。
        ///
        /// 数値ボックスの "Se:値変更時;" は、ここにくる。
        /// </summary>
        /// <param nFcName="sender"></param>
        /// <param nFcName="e"></param>
        public override void Execute4_OnOEa(
            object sender, EventArgs e
            )
        {
            Log_Method  pg_Method = new Log_MethodImpl(0);
            Log_Reports log_Reports_ThisMethod = new Log_ReportsImpl(pg_Method);

            pg_Method.BeginMethod(Info_Controls.Name_Library, this, "Execute4_OnOEa", log_Reports_ThisMethod);
            //
            //

            Customcontrol cct = null;

            //
            // コントロール名。
            //
            string sName_Usercontrol;

            if (sender is Customcontrol)
            {
                cct = (Customcontrol)sender;

                sName_Usercontrol = cct.ControlCommon.Expression_Name_Control.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports_ThisMethod);

                log_Reports_ThisMethod.Comment_EventCreationMe = "[" + sName_Usercontrol + "]コントロールでOEaアクションが実行されました。";

                // ステータスバーに、コントロール名を表示。
                //cct.ControlCommon.MoControlMediator.AddStatus_ActionFcName(sName_Usercontrol, d_Logging_Dammy);
            }
            else
            {
                sName_Usercontrol = "";
                log_Reports_ThisMethod.Comment_EventCreationMe = "OEaアクションが実行されました。";
            }

            //
            // ストップウォッチ
            //
            if (log_Reports_ThisMethod.CanStopwatch)
            {
                pg_Method.Log_Stopwatch.Message = Utility_Format.Format(
                    sName_Usercontrol,
                    this.ConfigurationtreeToExpression_Event.Name
                    );
                pg_Method.Log_Stopwatch.Begin();
            }

            //
            //
            //
            //
            //ystem.Console.WriteLine(Info_Forms.LibraryName + ":" + this.GetType().Name + "#Perform_OEa: 何回呼び出される?(A)");


            //
            // 登録アクション作成・実行ループ。
            //

            //
            // 「登録アクション設定」を元に、「アクション」を作成し、実行順に実行。
            //
            if (!this.ConfigurationtreeToExpression_Event.IsTranslated_ConfigurationtreeToExpression)
            {
                // まだアクションが作成されていなければ、作成。
                this.ConfigurationtreeToExpression_Event.Translate(cct.ControlCommon.Owner_MemoryApplication, log_Reports_ThisMethod);
            }

            //EnumEventhandler err_Eh;
            if (log_Reports_ThisMethod.Successful)
            {
                // 登録されているアクションを実行。
                foreach (Expression_Node_Function expr_Func in this.List_Item)
                {
                    expr_Func.Execute4_OnOEa(sender, e);
                }
            }


            goto gt_EndMethod;
            //
gt_EndMethod:
            pg_Method.EndMethod(log_Reports_ThisMethod);
            log_Reports_ThisMethod.EndLogging(pg_Method);
        }
Exemplo n.º 5
0
        //────────────────────────────────────────
        #endregion



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

        public override void Execute4_OnOEa(
            object sender, EventArgs e
            )
        {
            Log_Method  pg_Method = new Log_MethodImpl(0);
            Log_Reports log_Reports_ThisMethod = new Log_ReportsImpl(pg_Method);

            pg_Method.BeginMethod(Info_Controls.Name_Library, this, "Execute4_OnOEa", log_Reports_ThisMethod);
            //
            //

            Customcontrol cct = null;

            string sName_Usercontrol;

            if (sender is Customcontrol)
            {
                cct = (Customcontrol)sender;

                sName_Usercontrol = cct.ControlCommon.Expression_Name_Control.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports_ThisMethod);

                log_Reports_ThisMethod.Comment_EventCreationMe = "[" + sName_Usercontrol + "]コントロールでOEaアクションが実行されました。";
            }
            else
            {
                sName_Usercontrol = "";
                log_Reports_ThisMethod.Comment_EventCreationMe = "OEaアクションが実行されました。";
            }

            if (log_Reports_ThisMethod.CanStopwatch)
            {
                string sEventName;
                this.Configurationtree_Event.Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sEventName, true, log_Reports_ThisMethod);

                pg_Method.Log_Stopwatch.Message = Utility_Format.Format(
                    sName_Usercontrol,
                    sEventName
                    );
                pg_Method.Log_Stopwatch.Begin();
            }

            //
            //
            //
            //
            //ystem.Console.WriteLine(Info_Forms.LibraryName + ":" + this.GetType().Name + "#Perform_OEa: 何回呼び出される?(A)");

            //EnumEventhandler err_Eh;
            //
            // 「登録アクション設定」を元に、「アクション」を作成し、実行順に実行。
            //
            Configurationtree_Event.List_Child.ForEach(delegate(Configurationtree_Node systemFunction_Conf, ref bool bBreak)
            {
                Expression_Node_Function expr_Func = cct.ControlCommon.Owner_MemoryApplication.MemoryForms.ConfigurationtreeToFunction.Translate(
                    systemFunction_Conf, true, log_Reports_ThisMethod);

                if (log_Reports_ThisMethod.Successful)
                {
                    expr_Func.Execute4_OnOEa(sender, e);
                }

                goto gt_EndMethod2;
                //
                gt_EndMethod2:
                ;
            });

            goto gt_EndMethod;
            //
gt_EndMethod:
            pg_Method.EndMethod(log_Reports_ThisMethod);
            log_Reports_ThisMethod.EndLogging(pg_Method);
        }