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

        protected void Execute6_Sub(
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

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

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


            {
                Expression_Node_String ec_ArgFcName;
                this.TrySelectAttribute(out ec_ArgFcName, Expression_Node_Function40Impl.PM_NAME_CONTROL, EnumHitcount.One_Or_Zero, log_Reports);

                // コントロールを1つ検索。
                List <Usercontrol> list_FcUc = this.Owner_MemoryApplication.MemoryForms.GetUsercontrolsByName(
                    ec_ArgFcName, true, log_Reports);

                if (log_Reports.Successful)
                {
                    Usercontrol fcUc = list_FcUc[0];

                    string sValue;
                    this.TrySelectAttribute(out sValue, Expression_Node_Function40Impl.PM_VALUE_VISIBLED, EnumHitcount.One_Or_Zero, log_Reports);

                    bool bValue;
                    if (Boolean.TryParse(sValue, out bValue))
                    {
                        fcUc.ControlCommon.BAutomaticinputting = true;//自動入力。
                        //fcUc.UsercontrolEnabled = bValue; // todo:可視/不可視にしたい。
                        fcUc.UsercontrolVisible = bValue;
                        fcUc.ControlCommon.BAutomaticinputting = false;//自動入力解除。

                        // なぜか、Enabledを変更しても、背景色が 更新されない。
                        // 値は変更されてないからか。
                        // 背景色を更新するために、JudgeValidity を呼んでやる。
                        //
                        // トゥゲザーでやるべきか?
                        fcUc.JudgeValidity(log_Reports);
                    }
                }
            }

            log_Method.EndMethod(log_Reports);
        }
Exemplo n.º 2
0
        //────────────────────────────────────────

        /// <summary>
        /// 指定の仕方で、トゥゲザーを読み取りに行く場所が変わる。
        ///
        /// (1)トゥゲザー名で指定した場合
        /// 「トゥゲザー設定ファイル(Frfr)」の1箇所。
        ///
        /// (2)トゥゲザー名で指定しなかった場合
        /// 「トゥゲザー設定ファイル(Frfr)」と、「コントロール設定ファイル(Fcnf)」の2箇所。
        /// </summary>
        /// <param name="log_Reports"></param>
        protected void Execute6_Sub(
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

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

            if (log_Reports.CanStopwatch)
            {
                log_Method.Log_Stopwatch.Message = Utility_Textformat.Format_StopwatchComment(
                    this,
                    this.Cur_Configuration,
                    log_Reports
                    );

                log_Method.Log_Stopwatch.Begin();
            }


            Configurationtree_Node cf_TgTogether;

            if (log_Reports.Successful)
            {
                string sArg_Name_Together;
                this.TrySelectAttribute(out sArg_Name_Together, Expression_Node_Function27Impl.PM_NAME_TOGETHER, EnumHitcount.One_Or_Zero, log_Reports);

                if ("" != sArg_Name_Together.Trim())
                {
                    //
                    //
                    //
                    // トゥゲザー名を指定した場合
                    //
                    //
                    //
                    this.Execute6_ByName(
                        out cf_TgTogether,
                        log_Reports);
                }
                else
                {
                    //
                    //
                    //
                    // トゥゲザー名を指定していない場合
                    //
                    //
                    //
                    this.Execute6_ByNoName(
                        out cf_TgTogether,
                        log_Reports);
                }
            }
            else
            {
                cf_TgTogether = null;
            }


            //.WriteLine(this.GetType().Name + "#Perform_WrRhn: ◆ 指定のコントロールを、リフレッシュした。");

            // <refresher>が無い場合もある。その場合は無視する。
            if (null == cf_TgTogether)
            {
                goto gt_EndMethod;
            }

            //
            //
            //
            // 妥当性判定を行います。
            //
            //
            //
            if (log_Reports.Successful)
            {
                //
                //
                // 21:妥当性判定
                // 所要時間目安[0]ミリ秒ほど
                //
                //

                //
                // 妥当性を判定したいコントロール名を一覧しているトゥゲザーの名前。
                //
                List <Configurationtree_Node> cfList_RfrTarget = cf_TgTogether.GetChildrenByNodename(NamesNode.S_TARGET, false, log_Reports);


                //.WriteLine(this.GetType().Name + "#: ◆ トゥゲザー名=[" + .Value + "] 対象Fc数=[" + oTargetList.Count + "]");

                foreach (Configurationtree_Node cf_RfrTarget in cfList_RfrTarget)
                {
                    string sName;
                    cf_RfrTarget.Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sName, true, log_Reports);

                    Expression_Node_StringImpl ec_Str = new Expression_Node_StringImpl(this, cf_RfrTarget);
                    ec_Str.AppendTextNode(
                        sName,
                        cf_RfrTarget,
                        log_Reports
                        );


                    List <Usercontrol> list_FcUc2;
                    if (log_Reports.Successful)
                    {
                        list_FcUc2 = this.Owner_MemoryApplication.MemoryForms.GetUsercontrolsByName(
                            ec_Str,
                            true,
                            log_Reports
                            );
                    }
                    else
                    {
                        list_FcUc2 = new List <Usercontrol>();
                    }

                    if (log_Reports.Successful)
                    {
                        Usercontrol fcUc2 = list_FcUc2[0];

                        // 妥当性判定を行います。
                        fcUc2.JudgeValidity(
                            log_Reports
                            );
                    }
                }


                //
                //
                //
                //
            }

            goto gt_EndMethod;
            //
            //
gt_EndMethod:
            log_Method.EndMethod(log_Reports);
        }
Exemplo n.º 3
0
        //────────────────────────────────────────

        protected void Execute6_Sub(
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

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

            string sFncName0;

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

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


            //
            // 指定された引数から、または、
            // このNAction29要素を含んでいる control要素から、コントロールの名前を取得。
            List <Usercontrol> list_Usercontrol;

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


                Expression_Node_String ec_Name_Control;

                //
                // コントロール名が指定されていれば、そのコントロール名。
                //
                this.TrySelectAttribute(out ec_Name_Control, Expression_Node_Function29Impl.PM_NAME_CONTROL, EnumHitcount.One_Or_Zero, log_Reports);

                string sName_Control = ec_Name_Control.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports);


                if ("" == sName_Control.Trim())
                {
                    //コントロール名が指定されていない場合。
                    //
                    //  ・このシステム関数を含んでいるイベント要素→コントロール要素と辿り、コントロール名を取得。
                    Configuration_Node cf_Event = this.Cur_Configuration.GetParentByNodename(
                        NamesNode.S_EVENT, EnumConfiguration.Unknown, false, log_Reports);

                    if (null != cf_Event)
                    {
                        Configuration_Node owner_Configuration_Control = cf_Event.GetParentByNodename(
                            NamesNode.S_CONTROL1, EnumConfiguration.Tree, true, log_Reports);

                        if (null != (Configurationtree_Node)owner_Configuration_Control)
                        {
                            bool bHit = ((Configurationtree_Node)owner_Configuration_Control).Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sName_Control, false, log_Reports);

                            if (bHit)
                            {
                                ec_Name_Control = new Expression_Node_StringImpl(this, this.Cur_Configuration);
                                ec_Name_Control.AppendTextNode(
                                    sName_Control,
                                    this.Cur_Configuration,
                                    log_Reports
                                    );
                            }
                        }
                        else
                        {
                            //nFcName_prm = null;
                        }
                    }
                    else
                    {
                        //nFcName_prm = null;
                    }
                }

                //
                // 指定のコントロール
                //
                list_Usercontrol = this.Owner_MemoryApplication.MemoryForms.GetUsercontrolsByName(
                    ec_Name_Control,
                    true,
                    log_Reports
                    );
            }
            else
            {
                list_Usercontrol = new List <Usercontrol>();
            }



            //
            // 妥当性判定を行います。
            //
            if (log_Reports.Successful)
            {
                if (0 < list_Usercontrol.Count)
                {
                    Usercontrol uct = list_Usercontrol[0];
                    uct.JudgeValidity(log_Reports);
                }

                //.WriteLine(this.GetType().Name + "#: ◆ 妥当性判定を行った。");
            }



            if (log_Reports.Successful)
            {
                //
                // 指定のコントロールの内容を、データ・ソースから読取り直して最新表示します。
                //

                if (0 < list_Usercontrol.Count)
                {
                    Usercontrol uct = list_Usercontrol[0];

                    //.WriteLine(this.GetType().Name + "#: ◆ 指定のコントロールに、データのアップデートを指示。");

                    if (uct.ControlCommon.BAutomaticinputting)
                    {
                        // コンピューターにより自動入力されたとき。
                        //essageBox.Show("コンピュータによって自動入力されました。 コントロールID=[" + this.FormObjectId + "]", "デバッグ");
                    }
                    else
                    {
                        // 手入力による更新。

                        uct.UsercontrolToMemory(log_Reports);
                    }
                }


                //.WriteLine(this.GetType().Name + "#: ◆ 指示終了。");
            }


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