Example #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);

            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();
            }
            //
            //

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

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

                Expression_Node_String ec_FcName_Prm;
                this.TrySelectAttribute(out ec_FcName_Prm, Expression_Node_Function36Impl.PM_CONTROL_NAME, EnumHitcount.One_Or_Zero, log_Reports);

                string sFcName_Prm = ec_FcName_Prm.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports);


                List <Expression_Node_String> ecList_FcName = new List <Expression_Node_String>();
                if ("" == sFcName_Prm)
                {
                    //
                    // fcName未設定時は、この<action>要素を含んでいるcontrol要素から
                    // コントロールの名前を取得。
                    //

                    Configuration_Node cf_Event = this.Cur_Configuration.GetParentByNodename(
                        NamesNode.S_EVENT, EnumConfiguration.Unknown, 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)
                        {
                            string sName;
                            bool   bHit = ((Configurationtree_Node)owner_Configurationtree_Control).Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sName, false, log_Reports);

                            if (bHit)
                            {
                                Expression_Node_StringImpl ec_Str = new Expression_Node_StringImpl(this, this.Cur_Configuration);
                                ec_Str.AppendTextNode(
                                    sName,
                                    this.Cur_Configuration,
                                    log_Reports
                                    );

                                // 上書き
                                ec_FcName_Prm = ec_Str;
                                ecList_FcName.Add(ec_FcName_Prm);
                            }
                            else
                            {
                            }
                        }
                        else
                        {
                            //nFcName_prm = null;
                        }
                    }
                    else
                    {
                        //nFcName_prm = null;
                    }
                }
                else
                {
                    //
                    // fcName 指定時。

                    // カンマ区切りか確認。
                    CsvTo_ListImpl csvTo            = new CsvTo_ListImpl();
                    List <string>  sList_FcName_Prm = csvTo.Read(sFcName_Prm);

                    foreach (string sFcName2 in sList_FcName_Prm)
                    {
                        // コントロール名。
                        Expression_Node_StringImpl ec_FcName4 = new Expression_Node_StringImpl(this, this.Cur_Configuration);
                        ec_FcName4.AppendTextNode(
                            sFcName2,
                            this.Cur_Configuration,
                            log_Reports
                            );

                        ecList_FcName.Add(ec_FcName4);
                    }
                }

                foreach (Expression_Node_String ec_FcName5 in ecList_FcName)
                {
                    //
                    // 指定のコントロール
                    //
                    List <Usercontrol> list_FcUc2 = this.Owner_MemoryApplication.MemoryForms.GetUsercontrolsByName(
                        ec_FcName5,
                        true,
                        log_Reports
                        );

                    if (0 < list_FcUc2.Count)
                    {
                        Usercontrol fcUc = list_FcUc2[0];
                        list_FcUc.Add(fcUc);
                    }
                }
            }
            else
            {
            }



            foreach (Usercontrol fcUc in list_FcUc)
            {
                if (log_Reports.Successful)
                {
                    ////
                    //// 妥当性判定を行います。
                    ////
                    //if (log_Reports.Successful)
                    //{
                    //    fcUc.JudgeValidity(
                    //        log_Reports
                    //        );

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


                    if (fcUc.ControlCommon.BAutomaticinputting)
                    {
                        // コンピューターにより自動入力されたとき。
                    }
                    else
                    {
                        // 手入力による更新。

                        {
                            ToMemory_Performer toM = new ExpressionDataTargetUpdaterImpl();
                            toM.ToMemory(
                                "",// 空文字列
                                fcUc.ControlCommon.Expression_Control,
                                fcUc.ControlCommon.Owner_MemoryApplication,
                                log_Reports
                                );
                        }
                    }
                }
            }


            log_Method.EndMethod(log_Reports);
        }
Example #2
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();
            }
            //
            //

            //
            // テーブルにデータを書き出す方法。
            string err_sNodeName;

            //string err_sFncName;
            {
                ToMemory_Performer toM = new ExpressionDataTargetUpdaterImpl();

                // ID? 『f-var value="Us:クリップmr_SK10;"』のように記述されているので、変数展開して "6001"等 を取得する。
                string sFrom;
                this.TrySelectAttribute(out sFrom, Expression_Node_Function38Impl.PM_FROM, EnumHitcount.One_Or_Zero, log_Reports);
                //ystem.Console.WriteLine(this.GetType().Name + "#: ”from”の型=[" + this.In_nFrom.GetType().Name + "] ”from”の子要素数=[" + this.In_nFrom.ChildNList.Count + "] sFrom=[" + sFrom + "]");

                // 『Sf:cell;』で、セルが指定されているはず。
                Expression_Node_String ec_ArgTo;
                this.TrySelectAttribute(out ec_ArgTo, Expression_Node_Function38Impl.PM_TO, EnumHitcount.One_Or_Zero, log_Reports);

                {
                    string sNodeName;
                    sNodeName = ec_ArgTo.Cur_Configuration.Name;

                    // arg3はバグで、name属性は取得できない。
                    //string sFncName;
                    //e_ArgTo.TrySelectAttribute(out sFncName, PmNames.NAME.SAttrName, true, EnumHitcount.Unconstraint, log_Reports);

                    if (!(NamesNode.S_ARG == sNodeName))// && E_SysFnc38Impl.S_ARG_TO == sFncName
                    {
                        // エラー
                        err_sNodeName = sNodeName;
                        //err_sFncName = sFncName;
                        goto gt_Error_NotTo;
                    }
                }

                if (log_Reports.Successful)
                {
                    toM.ToMemory_ParentFcells(
                        sFrom,
                        ec_ArgTo,// Sf:cell;の親を指定すること。
                        this.Owner_MemoryApplication,
                        log_Reports
                        );
                }
            }

            goto gt_EndMethod;
            //
            //
            #region 異常系
            //────────────────────────────────────────
gt_Error_NotTo:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, Expression_Node_Function38Impl.PM_TO, log_Reports); //引数名
                tmpl.SetParameter(2, err_sNodeName, log_Reports);                        //ノード名

                this.Owner_MemoryApplication.CreateErrorReport("Er:110025;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
gt_EndMethod:
            log_Method.EndMethod(log_Reports);
        }