Ejemplo n.º 1
0
        //────────────────────────────────────────

        /// <summary>
        /// トゥゲザー名で指定した場合。
        /// </summary>
        /// <param name="log_Reports"></param>
        private void Execute6_ByName(
            out Configurationtree_Node cf_TgTogether,
            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_ByName", 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();
            }


            //
            //
            //
            // (0)トゥゲザーの取得
            //
            //
            // トゥゲザーのname属性から取得。
            cf_TgTogether = null;
            {
                Expression_Node_String ec_Arg_Name_Together;
                this.TrySelectAttribute(out ec_Arg_Name_Together, Expression_Node_Function27Impl.PM_NAME_TOGETHER, EnumHitcount.One_Or_Zero, log_Reports);

                string sExpectedFncName = ec_Arg_Name_Together.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports);

                List <Configurationtree_Node> listCf_Together = this.Owner_MemoryApplication.MemoryTogethers.Configurationtree_Togetherconfig.GetChildrenByNodename(NamesNode.S_TOGETHER, false, log_Reports);
                foreach (Configurationtree_Node cf_Together in listCf_Together)
                {
                    string sFncName;
                    cf_Together.Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sFncName, false, log_Reports);

                    if (sExpectedFncName == sFncName)
                    {
                        cf_TgTogether = cf_Together;
                        break;
                    }
                }
            }


            if (log_Reports.Successful)
            {
                this.Owner_MemoryApplication.MemoryTogethers.RefreshDataByTogether(
                    cf_TgTogether,
                    log_Reports
                    );
            }

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

        /// <summary>
        /// トゥゲザー名で指定しなかった場合。
        ///
        /// (1)「コントロール設定ファイル(Fcnf)」の<refresher>を読みにいく。
        /// (2)なければ「トゥゲザー設定ファイル(Frfr)」の<refresher>を読みにいく。
        /// </summary>
        /// <param name="log_Reports"></param>
        private void Execute6_ByNoName(
            out Configurationtree_Node cf_TgTogether,
            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_ByNoName", 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();
            }
            //
            //

            string sFncName0;

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

            if (null != this.Cur_Configuration)
            {
                Configuration_Node cf_Event = this.Cur_Configuration.GetParentByNodename(
                    NamesNode.S_EVENT, EnumConfiguration.Tree, false, log_Reports);

                if (null != cf_Event)
                {
                    Configuration_Node owner_Configurationtree_Control = cf_Event.GetParentByNodename(
                        NamesNode.S_CONTROL1, EnumConfiguration.Tree, true, log_Reports);
                    if (null != owner_Configurationtree_Control)
                    {
                        //
                        // (1)「コントロール設定ファイル(Fcnf)」の<refresher>を読みにいく。
                        //
                        this.Execute3b_ByNoName_1Fcnf(
                            out cf_TgTogether,
                            (Configurationtree_Node)owner_Configurationtree_Control,
                            (Configurationtree_Node)cf_Event,
                            log_Reports);

                        if (null == cf_TgTogether)
                        {
                            //
                            // (2)「トゥゲザー設定ファイル(Frfr)」の<refresher>を読みにいく。
                            //
                            this.Execute3b_ByNoName_2Frfr(
                                out cf_TgTogether,
                                (Configurationtree_Node)owner_Configurationtree_Control,
                                (Configurationtree_Node)cf_Event,
                                log_Reports
                                );
                        }

                        //
                        //
                        // 13:トゥゲザーの実行
                        // 所要時間目安[1]~[4343]ミリ秒ほど
                        //
                        //

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

                        if (log_Reports.Successful)
                        {
                            //
                            // トゥゲザー<together>を使います。
                            //

                            this.Owner_MemoryApplication.MemoryTogethers.RefreshDataByTogether(
                                cf_TgTogether,
                                log_Reports
                                );
                        }
                    }
                    else
                    {
                        cf_TgTogether = null;
                        goto gt_Error_NullParentControl;
                    }
                }
                else
                {
                    cf_TgTogether = null;
                    goto gt_Error_NullParentEvent;
                }
            }
            else
            {
                cf_TgTogether = null;
                goto gt_Error_NullTogetherName;
            }

            goto gt_EndMethod;
            //
            //
            #region 異常系
            //────────────────────────────────────────
gt_Error_NullParentControl:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, sFncName0, log_Reports);                                                          //関数名
                tmpl.SetParameter(2, Log_RecordReportsImpl.ToText_Configuration(this.Cur_Configuration), log_Reports); //設定位置パンくずリスト

                this.Owner_MemoryApplication.CreateErrorReport("Er:110012;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
gt_Error_NullParentEvent:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, sFncName0, log_Reports);                                                          //関数名
                tmpl.SetParameter(2, Log_RecordReportsImpl.ToText_Configuration(this.Cur_Configuration), log_Reports); //設定位置パンくずリスト

                this.Owner_MemoryApplication.CreateErrorReport("Er:110013;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
gt_Error_NullTogetherName:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, sFncName0, log_Reports);                                                          //関数名
                tmpl.SetParameter(2, Log_RecordReportsImpl.ToText_Configuration(this.Cur_Configuration), log_Reports); //設定位置パンくずリスト

                this.Owner_MemoryApplication.CreateErrorReport("Er:110014;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
gt_EndMethod:
            log_Method.EndMethod(log_Reports);
        }
Ejemplo n.º 3
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);
        }