protected void LinkButton1_Click(object sender, EventArgs e)
 {
     try
     {
         SqlDataReader dr = Usercontrol.Getdetail("select Password,Id from Cashier where Username='******'");
         while (dr.Read())
         {
             TextBox5.Text = dr.GetValue(0).ToString();
             TextBox6.Text = dr.GetValue(1).ToString();
         }
         if (TextBox2.Text == TextBox5.Text)
         {
             if (TextBox3.Text == TextBox4.Text)
             {
                 Usercontrol.editcashierpw(int.Parse(TextBox6.Text.ToString()), TextBox3.Text.ToString());
                 Label6.Text = "";
                 Label7.Text = "";
                 Label8.Text = "Updated Suecssed";
             }
             else
             {
                 Label6.Text = "Reenter your new Password";
             }
         }
         else
         {
             Label7.Text = "Check your Old Password";
         }
     }
     catch
     { }
 }
Exemplo n.º 2
0
        //────────────────────────────────────────

        /// <summary>
        /// 全てのフォームの、レイアウトの一時停止を解除。
        /// </summary>
        private void ResumeLayout(
            TableUserformconfig fo_Config,
            MemoryApplication memoryApplication,
            Log_Reports pg_Logging
            )
        {
            Log_Method pg_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

            pg_Method.BeginMethod(Info_LayoutImpl.Name_Library, this, "ResumeLayout", pg_Logging);
            //
            //

            foreach (RecordUserformconfig fo_Record in fo_Config.List_RecordUserformconfig)
            {
                string sName_Control;
                fo_Record.TryGetString(out sName_Control, NamesFld.S_NAME, true, "", memoryApplication, pg_Logging);

                //
                // S → E。 コントロール名
                Expression_Node_StringImpl ec_FcName = new Expression_Node_StringImpl(null, fo_Record.Parent_TableUserformconfig.Cur_Configurationtree);
                ec_FcName.AppendTextNode(
                    sName_Control,
                    fo_Record.Parent_TableUserformconfig.Cur_Configurationtree,
                    pg_Logging
                    );


                List <Usercontrol> list_FcUc;
                if (pg_Logging.Successful)
                {
                    list_FcUc = memoryApplication.MemoryForms.GetUsercontrolsByName(
                        ec_FcName,
                        true,
                        pg_Logging
                        );
                }
                else
                {
                    list_FcUc = new List <Usercontrol>();
                }


                if (pg_Logging.Successful)
                {
                    Usercontrol uct = list_FcUc[0];

                    if (uct is UsercontrolWindow)
                    {
                        UsercontrolWindow uctWnd = (UsercontrolWindow)uct;
                        uctWnd.CustomcontrolWindow1.ResumeLayout(false);
                    }
                }
            }

            //
            //
            //
            //
            pg_Method.EndMethod(pg_Logging);
        }
Exemplo n.º 3
0
        //────────────────────────────────────────
        #endregion



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

        /// <summary>
        /// 実行。
        ///
        /// 指定のコントロールの、指定のイベントを実行します。
        ///
        /// todo:どこで利用されている?
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="nFcName">コントロール名。</param>
        /// <param name="oEventName"></param>
        /// <param name="log_Reports"></param>
        public void Execute1_Usercontrol(
            object sender,
            Expression_Node_String ec_FcName,
            XenonName o_Name_Event,
            MemoryApplication owner_MemoryApplication,
            Log_Reports log_Reports
            )
        {
            //.WriteLine(this.GetType().Name + "#PerformFc: 【アクション_パフォーマー開始】");

            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

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

            Usercontrol ucFc = null;

            string sFcName1 = ec_FcName.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports);

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

                if (sFcName2 == sFcName1)
                {
                    ucFc = ucFc2;
                }
            });

            if (null != ucFc)
            {
                // 一致したfcUcがあれば、一致した最後のfcUcを。
                this.Execute1_UsercontrolImpl(
                    sender,
                    ucFc,
                    o_Name_Event,
                    owner_MemoryApplication,
                    log_Reports
                    );
            }
            else
            {
                //
                //
                //
                //.WriteLine(this.GetType().Name + "#PerformFc: ■[" + sFcName_prm + "]という名前のコントロールはありませんでした。");
            }


            //
            //
            log_Method.EndMethod(log_Reports);

            //.WriteLine(this.GetType().Name + "#PerformFc: 【アクション_パフォーマー終了】");
        }
Exemplo n.º 4
0
        //────────────────────────────────────────

        /// <summary>
        /// 実行。
        ///
        /// 全てのコントロールの、指定のイベントを実行します。
        ///
        /// アプリケーション起動時に、"OnLoad"を全て実行するなど。
        ///
        /// 別の関数から呼び出されます。
        /// </summary>
        /// <param name="oEventName"></param>
        /// <param name="oEventName"></param>
        /// <param name="log_Reports"></param>
        public void Execute1_AllUsercontrols(
            List <string> sFcNameList,
            object sender,
            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_AllUsercontrols", log_Reports);
            //
            //
            Configurationtree_Node cf_ThisMethod = new Configurationtree_NodeImpl(log_Method.Fullname, null);


            foreach (string sName_Usercontrol in sFcNameList)
            {
                if ("" == sName_Usercontrol)
                {
                    // 空行。飛ばす。
                    goto end_row;
                }

                Expression_Leaf_StringImpl ec_FcName = new Expression_Leaf_StringImpl(null, cf_ThisMethod);
                ec_FcName.SetString(sName_Usercontrol, log_Reports);


                List <Usercontrol> list_UcFc = owner_MemoryApplication.MemoryForms.GetUsercontrolsByName(ec_FcName, true, log_Reports);
                if (list_UcFc.Count < 1)
                {
                    // 正常。
                    // 特に設定をすることのないコントロールは、XMLファイルが用意されていない。
                    // 無視する。
                }
                else
                {
                    Usercontrol ucFc = list_UcFc[0];

                    this.Execute1_UsercontrolImpl(
                        sender,
                        ucFc,
                        o_Name_Event,
                        owner_MemoryApplication,
                        log_Reports
                        );
                }

end_row:
                ;
            }

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

        protected override void LinkToParent(Configurationtree_Node cur_Cf, Configurationtree_Node parent_Cf, MemoryApplication memoryApplication, Log_Reports log_Reports)
        {
            Usercontrol uct = null;

            if (log_Reports.Successful)
            {
                uct = Utility_XmlToConfigurationtree_NodeImpl.GetUsercontrol(cur_Cf, memoryApplication, log_Reports);
            }

            uct.ControlCommon.Configurationtree_Control.List_Child.Add(cur_Cf, log_Reports);
        }
Exemplo n.º 6
0
        //────────────────────────────────────────
        #endregion



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

        public override string Execute5_Main(
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

            log_Method.BeginMethod(Info_Expr.Name_Library, this, "Execute5_Main", log_Reports);
            //
            //
            string sResult;

            //
            List <Usercontrol> ucList_Fc = this.Owner_MemoryApplication.MemoryForms.GetUsercontrolsByName(this.Expression_UsercontrolName, true, log_Reports);

            if (log_Reports.Successful)
            {
                if (1 != ucList_Fc.Count)
                {
                    // TODO:エラー
                    sResult = "";
                    goto gt_Error_No1Hit;
                }

                Usercontrol ucFc = ucList_Fc[0];
                sResult = ucFc.UsercontrolText;
            }
            else
            {
                // エラー
                sResult = "";
            }

            goto gt_EndMethod;
            //
            //
            #region 異常系
            //────────────────────────────────────────
gt_Error_No1Hit:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, this.Expression_UsercontrolName.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports), log_Reports);//コントロールの値

                this.Owner_MemoryApplication.CreateErrorReport("Er:6041;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
gt_EndMethod:
            log_Method.EndMethod(log_Reports);
            return(sResult);
        }
Exemplo n.º 7
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.º 8
0
        //────────────────────────────────────────
        #endregion



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

        /// <summary>
        /// 子コントロールを追加します。
        /// </summary>
        /// <param nFcName="uct"></param>
        public void AppendChild(
            Usercontrol uct,
            Log_Reports log_Reports
            )
        {
            if (log_Reports.Successful)
            {
                //
                // ユーザーコントロールに、
                // ユーザーコントロールを追加します。
                //
                this.Controls.Add((Control)uct);
            }
        }
Exemplo n.º 9
0
        //────────────────────────────────────────
        #endregion



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

        /// <summary>
        /// 子コントロールを追加します。
        /// </summary>
        /// <param nFcName="uct"></param>
        public void AppendChild(
            Usercontrol uct,
            Log_Reports log_Reports
            )
        {
            if (log_Reports.Successful)
            {
                //
                // タブ ページなのは カスタム コントロールなので、
                // カスタム コントロールに、
                // ユーザーコントロールを追加します。
                //
                this.CustomcontrolTabPage1.Controls.Add((Control)uct);
            }
        }
Exemplo n.º 10
0
        //────────────────────────────────────────

        protected override void LinkToParent(
            Configurationtree_Node cur_Cf, Configurationtree_Node parent_Cf, MemoryApplication memoryApplication, Log_Reports log_Reports)
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

            log_Method.BeginMethod(Info_XmlToConf.Name_Library, this, "LinkToParent", log_Reports);

            Usercontrol uct = null;

            if (log_Reports.Successful)
            {
                Configuration_Node cf_Control = cur_Cf.GetParentByNodename(
                    NamesNode.S_CONTROL1, EnumConfiguration.Tree, true, log_Reports);

                if (log_Reports.Successful)
                {
                    uct = Utility_XmlToConfigurationtree_NodeImpl.GetUsercontrol(
                        (Configurationtree_Node)cf_Control, memoryApplication, log_Reports);
                }
            }

            uct.ControlCommon.Configurationtree_Control.List_Child.Add(cur_Cf, log_Reports);
            goto gt_EndMethod;
            //
            #region 異常系
            //────────────────────────────────────────
gt_Error_UndefinedClass:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー386!", log_Method);

                StringBuilder s = new StringBuilder();
                s.Append("なんらかのエラー。");
                s.Append(Environment.NewLine);

                // ヒント

                r.Message = s.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
gt_EndMethod:
            log_Method.EndMethod(log_Reports);
        }
Exemplo n.º 11
0
        //────────────────────────────────────────
        #endregion



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

        /// <summary>
        /// 子コントロールを追加します。
        /// </summary>
        /// <param nFcName="uct"></param>
        public void AppendChild(
            Usercontrol uct,
            Log_Reports log_Reports
            )
        {
            //
            // エラー。

            Log_Method pg_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

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

            //#このルートはエラー
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー356!", pg_Method);

                StringBuilder t = new StringBuilder();
                t.Append("チェックボックスに、子コントロールを追加しようとしないでください。");
                t.Append(Environment.NewLine);
                t.Append(Environment.NewLine);

                t.Append("[");
                t.Append(this.ControlCommon.Expression_Name_Control);
                t.Append("]に、[");
                t.Append(uct.ControlCommon.Expression_Name_Control);
                t.Append("]を 追加しようとしました。");
                t.Append(Environment.NewLine);
                t.Append(Environment.NewLine);

                // ヒント

                r.Message = t.ToString();
                log_Reports.EndCreateReport();
            }

            //
            //
            //
            //
            pg_Method.EndMethod(log_Reports);
        }
Exemplo n.º 12
0
        //────────────────────────────────────────

        /// <summary>
        /// 子コントロールを追加します。
        /// </summary>
        /// <param nFcName="uct"></param>
        public void AppendChild(
            Usercontrol uct,
            Log_Reports log_Reports)
        {
            if (log_Reports.Successful)
            {
                // レイアウトを一時停止。
                this.customcontrolWindow1.SuspendLayout();

                //
                // カスタム コントロールに、
                // ユーザー コントロールを追加します。
                //
                this.customcontrolWindow1.Controls.Add((Control)uct);

                // レイアウトを再開。レイアウト実行の強制はしない。
                this.customcontrolWindow1.ResumeLayout(false);
            }
        }
Exemplo n.º 13
0
        //────────────────────────────────────────

        /// <summary>
        /// データソース、データターゲットを元に戻さずに、Enabled属性だけを元に戻します。
        /// </summary>
        public void ResetEnabled(
            MemoryApplication moApplication,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

            log_Method.BeginMethod(Info_MiddleImpl.Name_Library, this, "ResetEnabled", log_Reports);
            //
            //

            // コンピューターの自動入力モード・フラグを元に戻します。
            // コントロールの活性を元に戻します。
            int nIndex = 0;

            foreach (Expression_Node_String ec_FcName in array_Expression_NameUsercontrol)
            {
                List <Usercontrol> list_FcUc = moApplication.MemoryForms.GetUsercontrolsByName(
                    ec_FcName,
                    true,
                    log_Reports
                    );

                if (0 < list_FcUc.Count)
                {
                    Usercontrol fcUc = list_FcUc[0];

                    fcUc.ControlCommon.BAutomaticinputting = true;

                    fcUc.UsercontrolEnabled = this.array_BEnabled_Old[nIndex];

                    fcUc.ControlCommon.BAutomaticinputting = this.array_BAutomaticinputting_Old[nIndex];
                }

                nIndex++;
            }

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

        public void ConfigurationtreeToUsercontrol(
            Configurationtree_Node cur_Cf,//Sv_3Validator <validator>
            Usercontrol ucontrol,
            Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

            log_Method.BeginMethod(Info_ConfigurationtreeToExpression.Name_Library, this, "SToFc", log_Reports);

            if (log_Method.CanDebug(1))
            {
                pg_ParsingLog.Increment("(41)" + cur_Cf.Name);
            }

            //
            //
            //
            //

            string    err_SParameterValue = null;
            Exception err_Excp            = null;
            string    err_SValue          = null;
            string    err_SName_Validator = null;



            EnumValidation_Old enumResult = EnumValidation_Old.Thru;

            if (cur_Cf.Dictionary_Attribute.ContainsKey(PmNames.S_VALUE_RESULT.Name_Pm))
            {
                string sValue_Parameter;
                cur_Cf.Dictionary_Attribute.TryGetValue(PmNames.S_VALUE_RESULT, out sValue_Parameter, true, log_Reports);
                switch (sValue_Parameter)
                {
                case "OK":
                    enumResult = EnumValidation_Old.Ok;
                    break;

                case "NG":
                    enumResult = EnumValidation_Old.Ng;
                    break;

                case "THRU":
                    enumResult = EnumValidation_Old.Thru;
                    break;

                default:
                    //
                    // エラー。
                    goto gt_Error_UndefinedValidator02;
                }
            }



            string sName;
            string sName_ValidatorTrim;

            {
                PmName pmName = PmNames.S_NAME;
                if (cur_Cf.Dictionary_Attribute.ContainsKey(pmName.Name_Pm))
                {
                    cur_Cf.Dictionary_Attribute.TryGetValue(pmName, out sName, true, log_Reports);
                    sName_ValidatorTrim = sName.Trim();
                }
                else
                {
                    sName = "";
                    sName_ValidatorTrim = "";
                }
            }



            //
            // バリデーターの選択
            switch (sName_ValidatorTrim)
            {
            case NamesFnc.S_VLD_SPACES:
            {
                // SToE:
                Expressionv_SpacesTextValidator_Old nValidator = new Expressionv_SpacesTextValidator_Old(enumResult);

                ucontrol.AddValidator(
                    nValidator,
                    log_Reports
                    );
            }
            break;

            case NamesFnc.S_VLD_MATCH:
            {
                string sValue_Parameter;
                cur_Cf.Dictionary_Attribute.TryGetValue(PmNames.S_EXPECTED, out sValue_Parameter, false, log_Reports);
                err_SParameterValue = sValue_Parameter;

                // SToE:
                Expressionv_MatchTextValidator_Old ecv_Validator = new Expressionv_MatchTextValidator_Old(sValue_Parameter);

                ucontrol.AddValidator(
                    ecv_Validator,
                    log_Reports
                    );
            }
            break;

            case NamesFnc.S_VLD_INT_RANGE:
            {
                bool bSuccessful = true;
                int  nBeginValue = 0;
                if (bSuccessful)
                {
                    string sBegin;
                    cur_Cf.Dictionary_Attribute.TryGetValue(PmNames.S_BEGIN, out sBegin, false, log_Reports);

                    if (!int.TryParse(sBegin, out nBeginValue))
                    {
                        // エラー。
                        err_Excp   = null;
                        err_SValue = sBegin;
                        goto gt_Error_InvalidatedBegin02;
                    }
                }

                int nEndValue = 0;
                if (bSuccessful)
                {
                    string sEnd;
                    cur_Cf.Dictionary_Attribute.TryGetValue(PmNames.S_END, out sEnd, false, log_Reports);

                    if (!int.TryParse(sEnd, out nEndValue))
                    {
                        // エラー。
                        err_Excp   = null;
                        err_SValue = sEnd;
                        goto gt_Error_InvalidatedEnd02;
                    }
                }

                if (bSuccessful)
                {
                    // SToE:
                    Expressionv_IntRangeTextValidator_Old nValidator = new Expressionv_IntRangeTextValidator_Old(nBeginValue, nEndValue);

                    ucontrol.AddValidator(
                        nValidator,
                        log_Reports
                        );
                }
            }
            break;

            case NamesFnc.S_VLD_ALL:
            {
                // SToE:
                Expressionv_AllTextValidator_Old ecv_Validator = new Expressionv_AllTextValidator_Old(enumResult);

                ucontrol.AddValidator(
                    ecv_Validator,
                    log_Reports
                    );
            }
            break;

            default:
                //
                // エラー。
                err_SName_Validator = sName;
                goto gt_Error_UndefinedValidator03;
            }//switch

            goto gt_EndMethod;
            //
            //
            #region 異常系
            //────────────────────────────────────────
gt_Error_UndefinedValidator02:
            // TODO 未定義のバリデーターの場合。
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, PmNames.S_VALUE_RESULT.Name_Pm, log_Reports); //引数名
                tmpl.SetParameter(2, err_SParameterValue, log_Reports);            //バリデーター名

                ucontrol.ControlCommon.Owner_MemoryApplication.CreateErrorReport("Er:7012;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
gt_Error_InvalidatedBegin02:
            // 設定エラー
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, PmNames.S_BEGIN.Name_Pm, log_Reports);                          //属性名
                tmpl.SetParameter(2, err_SValue, log_Reports);                                       //属性値
                tmpl.SetParameter(3, Log_RecordReportsImpl.ToText_Exception(err_Excp), log_Reports); //例外メッセージ

                ucontrol.ControlCommon.Owner_MemoryApplication.CreateErrorReport("Er:7013;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
gt_Error_InvalidatedEnd02:
            // 設定エラー
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, PmNames.S_END.Name_Pm, log_Reports);                            //属性名
                tmpl.SetParameter(2, err_SValue, log_Reports);                                       //属性値
                tmpl.SetParameter(3, Log_RecordReportsImpl.ToText_Exception(err_Excp), log_Reports); //例外メッセージ

                ucontrol.ControlCommon.Owner_MemoryApplication.CreateErrorReport("Er:7014;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
gt_Error_UndefinedValidator03:
            // TODO 未定義のバリデーターの場合。
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, err_SName_Validator, log_Reports);//バリデーター名

                ucontrol.ControlCommon.Owner_MemoryApplication.CreateErrorReport("Er:7015;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
gt_EndMethod:
            if (Log_ReportsImpl.BDebugmode_Static)
            {
                pg_ParsingLog.Decrement(cur_Cf.Name);
            }
            log_Method.EndMethod(log_Reports);
        }
Exemplo n.º 15
0
 //────────────────────────────────────────
 public Expression_ControlImpl(Expression_Node_String parent_Expr, Configurationtree_Node cur_Cf, Usercontrol parent_Usercontrol, MemoryApplication owner_MemoryApplication)
     : base(parent_Expr, cur_Cf, owner_MemoryApplication)
 {
     this.parent_Usercontrol = parent_Usercontrol;
     this.list_Expression_Data = new List<Expression_Node_String>();
 }
Exemplo n.º 16
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();
            }

            //
            //
            //
            // コントロール
            //
            //
            //
            List <Usercontrol> list_FcUc;

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

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

                list_FcUc = this.Owner_MemoryApplication.MemoryForms.GetUsercontrolsByName(
                    ec_ArgFcName,
                    true,
                    log_Reports
                    );
            }
            else
            {
                list_FcUc = new List <Usercontrol>();
            }

            if (log_Reports.Successful)
            {
                // 正常時
                Usercontrol uct = list_FcUc[0];

                if (uct is UsercontrolWindow)
                {
                    UsercontrolWindow uctWnd = (UsercontrolWindow)uct;

                    // ウィンドウを閉じます。
                    uctWnd.Close(
                        log_Reports
                        );
                }

                // 子コントロールのゴミは残る?
                uct.Destruct(
                    log_Reports
                    );
            }


            log_Method.EndMethod(log_Reports);

            //if (log_Reports.Successful)
            //{
            //    //essageBox.Show(this.GetType().Name + "#: アクションのtype=[" + this.Type + "]", "デバッグ中です。(アクション「" + this.Type + "」として指定されています)");

            //}
        }
Exemplo n.º 17
0
        //────────────────────────────────────────
        /// <summary>
        /// 子コントロールを追加します。
        /// </summary>
        /// <param nFcName="uct"></param>
        public void AppendChild(
            Usercontrol uct,
            Log_Reports log_Reports
            )
        {
            Log_Method pg_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);
            pg_Method.BeginMethod(Info_Controls.Name_Library, this, "AppendChild",log_Reports);
            //
            //

            if (log_Reports.Successful)
            {

                foreach (Customcontrol cct in uct.List_Customcontrol)
                {
                    //
                    // タブ ペーンに追加できるのは、タブ ページだけです。
                    //

                    //
                    // タブ ペーン"tbp" 直下にあるタブ ページ"tbg" だけが、タブ ペーンに追加できます。
                    //

                    if (cct is CustomcontrolTabPage)
                    {
                        CustomcontrolTabPage ccTabPage = (CustomcontrolTabPage)cct;

                        //
                        // このユーザーコントロールは タブペーンではなく、
                        // タブペーンを持っているユーザーコントロールなので、
                        // 持っているタブペーン(カスタム コントロール)に、子要素を追加します。
                        //
                        //
                        // ユーザーコントロール(UC)はタブページではないので追加できないので、
                        // タブページをextendsしているカスタムコントロール(CC)を追加します。
                        //
                        this.customcontrolTabControl1.TabPages.Add(ccTabPage);

                    }
                    else
                    {
                        goto gt_Error_AnotherChildType;
                    }

                }
            }

            goto gt_EndMethod;
            //
            //
            #region 異常系
            //────────────────────────────────────────
            gt_Error_AnotherChildType:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, this.ControlCommon.Expression_Name_Control.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports), log_Reports);//タブペーン・コントロール名
                tmpl.SetParameter(2, uct.ControlCommon.Expression_Name_Control.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports), log_Reports);//追加しようとしたコントロール名

                this.ControlCommon.Owner_MemoryApplication.CreateErrorReport("Er:524;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
            gt_EndMethod:
            pg_Method.EndMethod(log_Reports);
        }
Exemplo n.º 18
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);
        }
Exemplo n.º 19
0
        //────────────────────────────────────────
        #endregion



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

        /// <summary>
        /// 実行。
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="eventMonitor"></param>
        /// <param name="log_Reports"></param>
        public override string Execute5_Main(Log_Reports log_Reports)
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

            log_Method.BeginMethod(Info_Functions.Name_Library, this, "Execute5_Main", 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 = "「E■[" + sFncName0 + "]アクション」実行(A)";
                log_Method.Log_Stopwatch.Begin();
            }


            if (this.EnumEventhandler == EnumEventhandler.O_Lr)
            {
                string sName_Usercontrol;
                if (this.Functionparameterset.Sender is Customcontrol)
                {
                    Customcontrol ccFc = (Customcontrol)this.Functionparameterset.Sender;

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

                    log_Reports.Comment_EventCreationMe += "/追記:[" + sName_Usercontrol + "]コントロールが、[" + sFncName0 + "]アクションを実行。";
                }
                else
                {
                    sName_Usercontrol = "(▲不明101!)";
                    log_Reports.Comment_EventCreationMe += "/追記:[" + sFncName0 + "]アクションを実行。";
                }

                //
                //
                //
                //

                List <Usercontrol> ucFcList;
                if (log_Reports.Successful)
                {
                    // 正常時

                    // テーブルデータをコントロールにセットします。

                    //
                    // 指定のコントロール(無指定の場合、自コントロール)を
                    // まず取得。
                    //
                    Expression_Node_String ec_ArgListboxName;
                    this.TrySelectAttribute(out ec_ArgListboxName, Expression_Node_Function20Impl.PM_NAME_CONTROL_LISTBOX, EnumHitcount.One_Or_Zero, log_Reports);

                    ucFcList = this.Owner_MemoryApplication.MemoryForms.GetUsercontrolsByName(
                        ec_ArgListboxName, true, log_Reports);
                }
                else
                {
                    ucFcList = new List <Usercontrol>();
                }


                // リストボックスにテーブルのデータソースを関連付けます。
                if (log_Reports.Successful)
                {
                    // 正常時

                    // リストボックス コントロール。
                    Usercontrol fcUc = ucFcList[0];


                    Expression_Node_String ec_TableName = null;
                    string sTableName;
                    this.TrySelectAttribute(out sTableName, Expression_Node_Function20Impl.PM_NAME_TABLE, EnumHitcount.One_Or_Zero, log_Reports);

                    if ("" != sTableName)//this.E_SysArgDic.ContainsKey(E_SysFnc20Impl.S_ARG_TABLE_NAME)
                    {
                        //テーブル名を指定(アクション用引数)
                        this.TrySelectAttribute(out ec_TableName, Expression_Node_Function20Impl.PM_NAME_TABLE, EnumHitcount.One_Or_Zero, log_Reports);

                        // #デバッグ
                        if (log_Method.CanWarning())
                        {
                            log_Method.WriteWarning_ToConsole(" <arg3 tableName=”[" + ec_TableName.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports) + "]”>属性でした。");
                        }
                    }
                    else
                    {
                        // #デバッグ
                        if (log_Method.CanWarning())
                        {
                            log_Method.WriteWarning_ToConsole(" <arg3 tableName=”☆”>属性が未指定でした。");
                        }



                        Configuration_Node owner_Configurationtree_Control;
                        {
                            owner_Configurationtree_Control = this.Cur_Configuration.GetParentByNodename(
                                NamesNode.S_CONTROL1, EnumConfiguration.Tree, true, log_Reports);
                        }

                        //
                        // 次を期待。
                        // <data target=”list-box”>
                        //     <arg5 name=”tableName” value=”☆”>
                        //
                        List <Configurationtree_Node> cfList_Data = ((Configurationtree_Node)owner_Configurationtree_Control).GetChildrenByNodename(
                            NamesNode.S_DATA, false, log_Reports);
                        foreach (Configurationtree_Node cf_Data in cfList_Data)
                        {
                            string sAccess;
                            cf_Data.Dictionary_Attribute.TryGetValue(PmNames.S_ACCESS, out sAccess, false, log_Reports);

                            List <string> sList_Access = new CsvTo_ListImpl().Read(sAccess);

                            if (sList_Access.Contains(ValuesAttr.S_FROM))
                            {
                                // <data access=”from”>

                                string sDataMemory;
                                cf_Data.Dictionary_Attribute.TryGetValue(PmNames.S_MEMORY, out sDataMemory, true, log_Reports);

                                if (!log_Reports.Successful)
                                {
                                    goto gt_EndMethod;
                                }

                                if (ValuesAttr.S_RECORDS == sDataMemory)
                                {
                                    cf_Data.Dictionary_Attribute.TryGetValue(PmNames.S_NAME_TABLE, out sTableName, true, log_Reports);
                                    if (!log_Reports.Successful)
                                    {
                                        goto gt_EndMethod;
                                    }

                                    ec_TableName = new Expression_Leaf_StringImpl(sTableName, this, cf_Data);

                                    // #デバッグ
                                    if (log_Method.CanWarning())
                                    {
                                        log_Method.WriteWarning_ToConsole(" <data tableName=”[" + sTableName + "]”>属性でした。");
                                    }
                                }
                                else
                                {
                                    //#連続エラー
                                    {
                                        Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                                        tmpl.SetParameter(1, sDataMemory, log_Reports);//属性memoryの値

                                        this.Owner_MemoryApplication.CreateErrorReport("Er:110007;", tmpl, log_Reports);
                                    }
                                }
                            }
                        }



                        if (null == ec_TableName)
                        {
                            // エラー処理?
                            if (log_Method.CanError())
                            {
                                log_Method.WriteError_ToConsole(" 直接指定されなかったので、既に<data>にtableName属性があると期待しましたが、ありませんでした。");
                            }

                            sTableName   = "";                                                                                //string sTableName = "";
                            ec_TableName = new Expression_Leaf_StringImpl(sTableName, this, owner_Configurationtree_Control); // owner_Cf_Fc.S_DataSource
                        }
                    }

                    //↓この中で時間かかってる。
                    Utility_Listbox.BindTableToDatasource(
                        fcUc,// リストボックス・コントロール
                        ec_TableName,
                        this.Owner_MemoryApplication,
                        log_Reports
                        );
                    //↑この中で時間かかってる。
                }
            }

            goto gt_EndMethod;
            //
            //
gt_EndMethod:
            log_Method.EndMethod(log_Reports);
            return("");
        }
Exemplo n.º 20
0
        //────────────────────────────────────────
        /// <summary>
        /// コントロール(UserControl)を追加します。
        /// </summary>
        /// <param select="nFcName">コントロール名。</param>
        /// <param select="fcUc"></param>
        public void PutUsercontrol(
            Expression_Node_String ec_FcName,
            Usercontrol fcUc,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);
            log_Method.BeginMethod(Info_MiddleImpl.Name_Library, this, "PutUsercontrol",log_Reports);
            //
            //

            string sFcName = ec_FcName.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports);

            if (fcUc is Control)
            {
                this.dictionary_Item[sFcName] = fcUc;
            }
            else
            {
                MessageBox.Show(
                    "コントロール[" + sFcName + "]は Control ではありませんでした。",
                    "▲プログラム・エラー86!"
                    );
            }

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

        /// <summary>
        /// 指定のテーブルに、テーブルデータを データソースとして関連付けます。
        /// </summary>
        /// <param name="oEventName"></param>
        /// <param name="nTableType"></param>
        public static void BindTableToDatasource(
            Usercontrol uct,
            Expression_Node_String ec_TableName,
            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, "Util_Listbox", "BindTableToDataSource", log_Reports);
            //
            //


            if (null == uct)
            {
                MessageBox.Show(
                    "テーブルデータを、コントロールに対応付けようとしましたが、コントロールがヌルでした。\ntableId=[" + ec_TableName + "]"
                    , "▲L11エラー②!"
                    );
                goto gt_EndMethod;
            }


            Table_Humaninput o_Table = owner_MemoryApplication.MemoryTables.GetTable_HumaninputByName(
                ec_TableName,
                true,
                log_Reports
                );

            if (null == o_Table)
            {
                // エラー中断。
                goto gt_EndMethod;
            }



            //
            // テーブルに対して行われた変更を、明示的に確定しておきます。
            //
            //↓重い処理。
            //o_Table.DataTable.AcceptChanges();
            //↑これに6003msぐらいかかってる。

            if (uct is UsercontrolListbox)
            {
                UsercontrolListbox uctLst = (UsercontrolListbox)uct;

                //
                // リストボックスのデータ取得元をテーブルとします。
                //

                //
                // データソースをセットします。
                //
                //     (SelectedIndexChangedイベントが60回ぐらい呼び出される?)
                //
                uctLst.ControlCommon.BAutomaticinputting = true;
                // ↓ 0.2秒ぐらいかかる処理。
                uctLst.DataSource = o_Table.DataTable;
                // ↑ 0.2秒ぐらいかかる処理。
                uctLst.ControlCommon.BAutomaticinputting = false;

                uctLst.CustomcontrolListbox1.Table_Humaninput_Datasource = o_Table;
            }
            else
            {
                string sName_Usercontrol = uct.ControlCommon.Expression_Name_Control.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports);

                MessageBox.Show("該当する型のないコントロールでした。[" + sName_Usercontrol + "]", "▲L11エラー③!");
            }

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



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

        public override string Execute5_Main(Log_Reports log_Reports)
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

            log_Method.BeginMethod(Info_Functions.Name_Library, this, "Execute5_Main", 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();
            }

            //
            //

            Expression_Node_String err_Ec_FcName1;

            if (this.EnumEventhandler == EnumEventhandler.O_Lr)
            {
                if (this.Functionparameterset.Sender is Customcontrol)
                {
                    Customcontrol fcCc = (Customcontrol)this.Functionparameterset.Sender;

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

                    log_Reports.Comment_EventCreationMe = "[" + sName_Usercontrol + "]コントロールが、[" + sFncName0 + "]アクションを実行。";
                }
                else
                {
                    log_Reports.Comment_EventCreationMe = "[" + sFncName0 + "]アクションを実行。";
                }

                //
                //
                //
                //

                //
                // このNAction29を含んでいるcontrol要素から
                // コントロールの名前を取得。
                Expression_Node_String ec_FcName1;

                //
                // このNAction29要素を含んでいる control要素から、コントロールの名前を取得。
                List <Usercontrol> list_FcUc;
                if (log_Reports.Successful)
                {
                    // 正常時

                    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_Usercontrol;
                            ((Configurationtree_Node)owner_Configurationtree_Control).Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sName_Usercontrol, true, log_Reports);


                            Expression_Node_StringImpl ec_Str = new Expression_Node_StringImpl(this, this.Cur_Configuration);
                            ec_Str.AppendTextNode(
                                sName_Usercontrol,
                                this.Cur_Configuration,
                                log_Reports
                                );

                            ec_FcName1 = ec_Str;
                        }
                        else
                        {
                            ec_FcName1 = null;
                        }
                    }
                    else
                    {
                        ec_FcName1 = null;
                    }

                    //
                    // 指定のコントロール
                    //
                    list_FcUc = this.Owner_MemoryApplication.MemoryForms.GetUsercontrolsByName(
                        ec_FcName1,
                        true,
                        log_Reports
                        );
                }
                else
                {
                    //
                    // エラー。
                    ec_FcName1     = null;
                    list_FcUc      = null;
                    err_Ec_FcName1 = ec_FcName1;
                    goto gt_Error_NullFcUc;
                }
                // ここで、fcUc は必ずある。
                Usercontrol fct = list_FcUc[0];

                //
                //
                //
                // View
                //
                //
                //

                // 最初の1個のみ有効。必ずあるとする。
                List <Expression_Node_String> ecList_View = fct.ControlCommon.Expression_Control.SelectDirectchildByNodename(NamesNode.S_VIEW, false, EnumHitcount.One, log_Reports);
                if (!log_Reports.Successful)
                {
                    goto gt_EndMethod;
                }
                Expression_Node_StringImpl ec_View = (Expression_Node_StringImpl)ecList_View[0];

                //
                // O → N は、Fcnfをロードした時点で実行済み。
                if (ec_View.List_Expression_Child.Count < 1)
                {
                    //
                    // エラー。
                    //
                    // このアクションを使うからには、
                    // 必ず<view>の中に子要素がないといけない。
                    err_Ec_FcName1 = ec_FcName1;
                    goto gt_Error_EmptyView;
                }


                object errorRule = null;
                Expression_Node_String err_Ec_DataTarget = null;
                if (log_Reports.Successful)
                {
                    // 正常時

                    ec_View.List_Expression_Child.ForEach(delegate(Expression_Node_String ec_Child, ref bool bRemove, ref bool bBreak)
                    {
                        string sFncName;
                        ec_Child.TrySelectAttribute(out sFncName, PmNames.S_NAME.Name_Pm, EnumHitcount.One_Or_Zero, log_Reports);

                        if (
                            NamesNode.S_FNC == ec_Child.Cur_Configuration.Name &&
                            NamesFnc.S_LISTBOX_LABELS == sFncName
                            )
                        {
                            // <f-list-box-labels>


                            //
                            // fcUc は、必ずリストボックス。
                            if (!(fct is UsercontrolListbox))
                            {
                                //
                                // エラー。
                                goto gt_Error_NotListbox;
                            }

                            UsercontrolListbox uctLst = (UsercontrolListbox)fct;

                            //
                            // リストボックスの表示を自作します。項目の高さが固定の場合。
                            uctLst.DrawMode = DrawMode.OwnerDrawFixed;



                            //
                            // N → Uc

                            //
                            // 描画プログラムの作成。
                            ListboxItemDrawer_02Impl drawer = new ListboxItemDrawer_02Impl(
                                this.Owner_MemoryApplication);

                            //
                            // item-valur-to-variable="" 属性
                            //
                            //if (null == nF11.E_ItemValueToVariable)
                            {
                                // <データ access="to">から取りたい。
                                Expression_Node_String ec_ItemValueToVariable = null;//ソース情報利用


                                List <Expression_Node_String> ecList_DataTarget;
                                {
                                    List <Expression_Node_String> ecList_Data = uctLst.ControlCommon.Expression_Control.SelectDirectchildByNodename(NamesNode.S_DATA, false, EnumHitcount.Unconstraint, log_Reports);
                                    ecList_DataTarget = Utility_Expression_NodeImpl.SelectItemsByPmAsCsv(ecList_Data, PmNames.S_ACCESS.Name_Pm, ValuesAttr.S_TO, false, EnumHitcount.First_Exist, log_Reports);
                                }

                                if (!log_Reports.Successful)
                                {
                                    goto gt_EndMethod2;
                                }
                                Expression_Node_String ec_DataTarget = ecList_DataTarget[0];
                                err_Ec_DataTarget = ec_DataTarget;


                                if (null != ec_DataTarget)
                                {
                                    bool bHit = ec_DataTarget.TrySelectAttribute(
                                        out ec_ItemValueToVariable, PmNames.S_NAME_VAR.Name_Pm, EnumHitcount.One, log_Reports);
                                    if (bHit)
                                    {
                                        drawer.Expression_ValueVariableName = ec_ItemValueToVariable;
                                    }
                                    else
                                    {
                                        // エラー。
                                        goto gt_Error_NullItemValueToVariable;
                                    }
                                }
                                else
                                {
                                    // エラー。
                                    goto gt_Error_NotFoundDataTarget;
                                }
                            }
                            //else
                            //{
                            //    //
                            //    // 変数名設定。
                            //    drawer.Ec_ValueVariableName = nF11.E_ItemValueToVariable;
                            //}

                            //
                            // <fnc name=”Sf:item-label;”>
                            List <Expression_Node_String> ecList_Fnc = ec_Child.SelectDirectchildByNodename(NamesNode.S_FNC, false, EnumHitcount.Unconstraint, log_Reports);
                            ecList_Fnc = Utility_Expression_NodeImpl.SelectItemsByPmAsCsv(ecList_Fnc, PmNames.S_NAME.Name_Pm, NamesFnc.S_ITEM_LABEL2, false, EnumHitcount.First_Exist, log_Reports);
                            if (!log_Reports.Successful)
                            {
                                // エラー。
                                goto gt_EndMethod2;
                            }

                            drawer.Expression_ItemLabel = ecList_Fnc[0];

                            if (log_Reports.Successful)
                            {
                                //
                                // 描画プログラムの変更。
                                uctLst.ListboxItemDrawer = drawer;
                            }
                        }
                        else
                        {
                            errorRule = ec_Child;

                            //
                            // エラー。未定義の<view>。
                            goto gt_Error_UndefinedView;
                        }

                        goto gt_EndMethod2;

                        //
                        //
                        //
                        //

                        //
                        // エラー。
                        gt_Error_NotListbox:
                        {
                            Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                            tmpl.SetParameter(1, ec_FcName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports), log_Reports); //コントロール名
                            tmpl.SetParameter(2, fct.GetType().Name, log_Reports);                                                             //コントロールのクラス名

                            this.Owner_MemoryApplication.CreateErrorReport("Er:110019;", tmpl, log_Reports);
                        }
                        goto gt_EndMethod2;

                        //
                        // エラー。
                        gt_Error_NotFoundDataTarget:
                        {
                            Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                            tmpl.SetParameter(1, ec_FcName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports), log_Reports);//コントロール名

                            this.Owner_MemoryApplication.CreateErrorReport("Er:110020;", tmpl, log_Reports);
                        }
                        goto gt_EndMethod2;

                        //
                        // エラー。
                        gt_Error_NullItemValueToVariable:
                        {
                            Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                            tmpl.SetParameter(1, PmNames.S_NAME_VAR.Name_Pm, log_Reports);                                                     //引数名NameVar
                            tmpl.SetParameter(2, ec_FcName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports), log_Reports); //コントロール名

                            //
                            // 「access="to"」要素を取得しているような。
                            //
                            Log_TextIndented s1 = new Log_TextIndentedImpl();
                            err_Ec_DataTarget.ToText_Snapshot(s1);
                            tmpl.SetParameter(3, s1.ToString(), log_Reports);//データターゲットの変数の中身

                            Log_TextIndented s2 = new Log_TextIndentedImpl();
                            err_Ec_DataTarget.Cur_Configuration.ToText_Content(s2);
                            tmpl.SetParameter(4, s2.ToString(), log_Reports);//データターゲットの設定の中身

                            this.Owner_MemoryApplication.CreateErrorReport("Er:110021;", tmpl, log_Reports);
                        }
                        goto gt_EndMethod2;

                        //
                        // エラー。
                        gt_Error_UndefinedView:
                        {
                            Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                            tmpl.SetParameter(1, errorRule.GetType().Name, log_Reports);        //要素のクラス名
                            tmpl.SetParameter(2, ec_Child.Cur_Configuration.Name, log_Reports); //設定の子要素のノード名
                            tmpl.SetParameter(3, sFncName, log_Reports);                        //設定の子要素の関数名

                            this.Owner_MemoryApplication.CreateErrorReport("Er:110022;", tmpl, log_Reports);
                        }
                        goto gt_EndMethod2;

                        gt_EndMethod2:
                        ;
                    });



                    //
                    // 「表示プログラム」を作成、
                    // リストボックスにその「リスト作成プログラム」を渡す。
                    // リストボックスは再表示されるたびに、
                    // その「リスト作成プログラム」を実行。

                    // 以下、その「表示プログラム」の内容。

                    //
                    // ループカウンタの回数だけ、リストに項目を追加。

                    //
                    // その内容は、値が<a-item-value>から取得。

                    //
                    // その内容は、表示ラベルが<a-item-label>から取得。

                    //
                    // その表示ラベルは、次の条件に一致した時、グレー色にする。
                    //
                    // <a-item-gray-out>
                    // <f-all-true>
                    // <a-empty-field>
                }
                goto gt_EndMethod;
            }

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

                this.Owner_MemoryApplication.CreateErrorReport("Er:110023;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
gt_Error_EmptyView:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, err_Ec_FcName1.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports), log_Reports);//検索ヒット数

                this.Owner_MemoryApplication.CreateErrorReport("Er:110024;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
gt_EndMethod:
            log_Method.EndMethod(log_Reports);
            return("");
        }
Exemplo n.º 23
0
        //────────────────────────────────────────

        /// <summary>
        /// 子コントロールを追加します。
        /// </summary>
        /// <param nFcName="uct"></param>
        public void AppendChild(
            Usercontrol uct,
            Log_Reports log_Reports)
        {
            if (log_Reports.Successful)
            {

                // レイアウトを一時停止。
                this.customcontrolWindow1.SuspendLayout();

                //
                // カスタム コントロールに、
                // ユーザー コントロールを追加します。
                //
                this.customcontrolWindow1.Controls.Add((Control)uct);

                // レイアウトを再開。レイアウト実行の強制はしない。
                this.customcontrolWindow1.ResumeLayout(false);
            }
        }
Exemplo n.º 24
0
        //────────────────────────────────────────

        /// <summary>
        /// コントロールにスタイルを設定します。
        /// </summary>
        public void SetupStyle(
            TableUserformconfig fo_Config,
            MemoryApplication memoryApplication,
            Log_Reports pg_Logging
            )
        {
            Log_Method pg_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

            pg_Method.BeginMethod(Info_LayoutImpl.Name_Library, this, "SetupStyle", pg_Logging);
            //

            //
            // 全てのフォームの、レイアウトを一時停止。
            //
            this.SuspendLayout(
                fo_Config,
                memoryApplication,
                pg_Logging
                );

            foreach (RecordUserformconfig fo_Record in fo_Config.List_RecordUserformconfig)
            {
                string sName_Control;
                fo_Record.TryGetString(out sName_Control, NamesFld.S_NAME, true, "", memoryApplication, pg_Logging);

                //
                // S → E。 コントロール名
                Expression_Node_StringImpl e_fcName = new Expression_Node_StringImpl(null, fo_Record.Parent_TableUserformconfig.Cur_Configurationtree);
                e_fcName.AppendTextNode(
                    sName_Control,
                    fo_Record.Parent_TableUserformconfig.Cur_Configurationtree,
                    pg_Logging
                    );


                //
                // 名前から、コントロールの取得。
                //
                List <Usercontrol> fcUcList;
                if (pg_Logging.Successful)
                {
                    fcUcList = memoryApplication.MemoryForms.GetUsercontrolsByName(
                        e_fcName,
                        true,
                        pg_Logging
                        );
                }
                else
                {
                    fcUcList = new List <Usercontrol>();
                }


                //
                // スタイルの設定。
                //
                if (pg_Logging.Successful)
                {
                    Usercontrol fcUc = fcUcList[0];
                    fcUc.SetupStyle(
                        fo_Record,
                        pg_Logging
                        );
                }



                // 「メインウィンドウ」の場合、更にスタイル設定の上書き。
                string sType_Control;
                fo_Record.TryGetString(out sType_Control, NamesFld.S_TYPE, true, "", memoryApplication, pg_Logging);
                if (NamesF.S_MAINWND == sType_Control)
                {
                    //
                    // スタイルの設定。
                    //
                    if (pg_Logging.Successful)
                    {
                        memoryApplication.MemoryForms.Mainwnd_FormWrapping.SetupStyle(
                            fo_Record,
                            pg_Logging
                            );
                    }
                }
            }

            //
            //
            // 全てのフォームの、レイアウトの一時停止を解除。
            //
            //
            this.ResumeLayout(
                fo_Config,
                memoryApplication,
                pg_Logging
                );


            //
            //
            //
            //
            pg_Method.EndMethod(pg_Logging);
        }
Exemplo n.º 25
0
        //────────────────────────────────────────
        #endregion



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

        /// <summary>
        /// 『レイアウト設定ファイル』をもとに、
        /// コントロール(UserControl)を作成します。
        ///
        /// 作成できなかった、または作成しなかった場合はヌル。
        ///
        /// プロパティーの設定は、この時点では、名前だけ行います。
        /// </summary>
        /// <param name="fo_Record"></param>
        /// <param name="bRequired">未定義の設定があったときに、エラーにするなら真。</param>
        /// <param name="pg_Logging"></param>
        public Usercontrol Create(
            RecordUserformconfig fo_Record,
            bool bRequired_NotUse,// TODO:必ず真でいいのでは?
            MemoryApplication owner_MemoryApplication,
            Log_Reports pg_Logging
            )
        {
            Log_Method pg_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

            pg_Method.BeginMethod(Info_LayoutImpl.Name_Library, this, "Create", pg_Logging);
            //
            //


            string sName_Control;

            fo_Record.TryGetString(out sName_Control, NamesFld.S_NAME, true, "", owner_MemoryApplication, pg_Logging);

            //
            // コントロール名 レコード→Ec
            Expression_Node_StringImpl ec_Name_Control = new Expression_Node_StringImpl(null, fo_Record.Parent_TableUserformconfig.Cur_Configurationtree);

            ec_Name_Control.AppendTextNode(
                sName_Control,
                fo_Record.Parent_TableUserformconfig.Cur_Configurationtree,
                pg_Logging
                );


            Usercontrol ucontrol = null;

            string sType_Control;

            fo_Record.TryGetString(out sType_Control, NamesFld.S_TYPE, true, "", owner_MemoryApplication, pg_Logging);
            if (null == sType_Control)
            {
                goto gt_Error_Type;
            }
            else if (!this.Dictionary_UsercontrolCreator.ContainsKey(sType_Control))//TODO:設定ミス時への対応。フィールド名がヌル?
            {
                goto gt_Error_FName;
            }

            UsercontrolCreator2 uctCreator = this.Dictionary_UsercontrolCreator[sType_Control];

            ucontrol = uctCreator.Perform(ec_Name_Control, owner_MemoryApplication);


            if (null != ucontrol)
            {
                // ヌル オブジェクトを設定。
                ucontrol.ControlCommon.Expression_Control = new Expression_ControlImpl(
                    null,
                    new Configurationtree_NodeImpl(NamesNode.S_HARDCODING_CONTROL, null),
                    ucontrol,
                    owner_MemoryApplication
                    );


                ucontrol.ControlCommon.Owner_MemoryApplication = owner_MemoryApplication;
            }
            else
            {
                goto gt_Error_NullUsercontrol;
            }

            goto gt_EndMethod;
            //
            //
            #region 異常系
            //────────────────────────────────────────
gt_Error_NullUsercontrol:
            if (pg_Logging.CanCreateReport)
            {
                Log_RecordReports r = pg_Logging.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー356!", pg_Method);

                Log_TextIndented s = new Log_TextIndentedImpl();

                s.Append("ucontrolがヌルでした。");
                s.Newline();
                s.Newline();

                // ヒント
                s.Append(r.Message_Configuration(fo_Record.Parent_TableUserformconfig.Cur_Configurationtree));

                r.Message = s.ToString();
                pg_Logging.EndCreateReport();
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
gt_Error_Type:
            if (pg_Logging.CanCreateReport)
            {
                Log_RecordReports r = pg_Logging.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー355!", pg_Method);

                Log_TextIndented s = new Log_TextIndentedImpl();

                s.Append("コントロールの型が指定されていません。");
                s.Newline();
                s.Newline();

                s.Append(" 『レイアウト設定』をもとに、コントロールを作成しているときに、");
                s.Newline();
                s.Append(" エラーが発生しました。");
                s.Newline();


                // ヒント
                s.Append(r.Message_Configuration(fo_Record.Parent_TableUserformconfig.Cur_Configurationtree));

                r.Message = s.ToString();
                pg_Logging.EndCreateReport();
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
gt_Error_FName:
            // テーブルタイプが「Form」で、"TREE" フィールドがないとき。
            // (Form_lstタイプには、TREEフィールドは要らない)
            if (pg_Logging.CanCreateReport)
            {
                Log_RecordReports r = pg_Logging.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー354!", pg_Method);

                Log_TextIndented t = new Log_TextIndentedImpl();

                t.Append(" 『レイアウト設定』をもとに、コントロールを作成しているときに、");
                t.Newline();
                t.Append(" エラーが発生しました。");
                t.Newline();
                t.Newline();

                t.Append("  指定の型=[");
                t.Append(sType_Control);
                t.Append("]は未定義のコントロールの型です。");

                // ヒント
                t.Append(r.Message_Configuration(fo_Record.Parent_TableUserformconfig.Cur_Configurationtree));

                r.Message = t.ToString();
                pg_Logging.EndCreateReport();
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
gt_EndMethod:
            pg_Method.EndMethod(pg_Logging);
            return(ucontrol);
        }
Exemplo n.º 26
0
 public void OnGet()
 {
     users = Usercontrol.GetUsers();
 }
        //────────────────────────────────────────
        public void ConfigurationtreeToUsercontrol(
            Configurationtree_Node cur_Cf,//Sv_3Validator <validator>
            Usercontrol ucontrol,
            Log_TextIndented_ConfigurationtreeToExpression pg_ParsingLog,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);
            log_Method.BeginMethod(Info_ConfigurationtreeToExpression.Name_Library, this, "SToFc",log_Reports);

            if (log_Method.CanDebug(1))
            {
                pg_ParsingLog.Increment("(41)" + cur_Cf.Name);
            }

            //
            //
            //
            //

            string err_SParameterValue = null;
            Exception err_Excp = null;
            string err_SValue = null;
            string err_SName_Validator = null;

            EnumValidation_Old enumResult = EnumValidation_Old.Thru;

            if (cur_Cf.Dictionary_Attribute.ContainsKey(PmNames.S_VALUE_RESULT.Name_Pm))
            {
                string sValue_Parameter;
                cur_Cf.Dictionary_Attribute.TryGetValue(PmNames.S_VALUE_RESULT, out sValue_Parameter, true, log_Reports);
                switch (sValue_Parameter)
                {
                    case "OK":
                        enumResult = EnumValidation_Old.Ok;
                        break;
                    case "NG":
                        enumResult = EnumValidation_Old.Ng;
                        break;
                    case "THRU":
                        enumResult = EnumValidation_Old.Thru;
                        break;
                    default:
                        //
                        // エラー。
                        goto gt_Error_UndefinedValidator02;
                }
            }

            string sName;
            string sName_ValidatorTrim;
            {
                PmName pmName = PmNames.S_NAME;
                if (cur_Cf.Dictionary_Attribute.ContainsKey(pmName.Name_Pm))
                {
                    cur_Cf.Dictionary_Attribute.TryGetValue(pmName, out sName, true, log_Reports);
                    sName_ValidatorTrim = sName.Trim();
                }
                else
                {
                    sName = "";
                    sName_ValidatorTrim = "";
                }
            }

            //
            // バリデーターの選択
            switch (sName_ValidatorTrim)
            {
                case NamesFnc.S_VLD_SPACES:
                    {
                        // SToE:
                        Expressionv_SpacesTextValidator_Old nValidator = new Expressionv_SpacesTextValidator_Old(enumResult);

                        ucontrol.AddValidator(
                            nValidator,
                            log_Reports
                            );
                    }
                    break;

                case NamesFnc.S_VLD_MATCH:
                    {
                        string sValue_Parameter;
                        cur_Cf.Dictionary_Attribute.TryGetValue(PmNames.S_EXPECTED, out sValue_Parameter, false, log_Reports);
                        err_SParameterValue = sValue_Parameter;

                        // SToE:
                        Expressionv_MatchTextValidator_Old ecv_Validator = new Expressionv_MatchTextValidator_Old(sValue_Parameter);

                        ucontrol.AddValidator(
                            ecv_Validator,
                            log_Reports
                            );
                    }
                    break;

                case NamesFnc.S_VLD_INT_RANGE:
                    {
                        bool bSuccessful = true;
                        int nBeginValue = 0;
                        if (bSuccessful)
                        {
                            string sBegin;
                            cur_Cf.Dictionary_Attribute.TryGetValue(PmNames.S_BEGIN, out sBegin, false, log_Reports);

                            if (!int.TryParse(sBegin, out nBeginValue))
                            {
                                // エラー。
                                err_Excp = null;
                                err_SValue = sBegin;
                                goto gt_Error_InvalidatedBegin02;
                            }
                        }

                        int nEndValue = 0;
                        if (bSuccessful)
                        {
                            string sEnd;
                            cur_Cf.Dictionary_Attribute.TryGetValue(PmNames.S_END, out sEnd, false, log_Reports);

                            if (!int.TryParse(sEnd, out nEndValue))
                            {
                                // エラー。
                                err_Excp = null;
                                err_SValue = sEnd;
                                goto gt_Error_InvalidatedEnd02;
                            }
                        }

                        if (bSuccessful)
                        {
                            // SToE:
                            Expressionv_IntRangeTextValidator_Old nValidator = new Expressionv_IntRangeTextValidator_Old(nBeginValue, nEndValue);

                            ucontrol.AddValidator(
                                nValidator,
                                log_Reports
                                );
                        }
                    }
                    break;

                case NamesFnc.S_VLD_ALL:
                    {
                        // SToE:
                        Expressionv_AllTextValidator_Old ecv_Validator = new Expressionv_AllTextValidator_Old(enumResult);

                        ucontrol.AddValidator(
                            ecv_Validator,
                            log_Reports
                            );
                    }
                    break;

                default:
                    //
                    // エラー。
                    err_SName_Validator = sName;
                    goto gt_Error_UndefinedValidator03;
            }//switch

            goto gt_EndMethod;
            //
            //
            #region 異常系
            //────────────────────────────────────────
            gt_Error_UndefinedValidator02:
            // TODO 未定義のバリデーターの場合。
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, PmNames.S_VALUE_RESULT.Name_Pm, log_Reports);//引数名
                tmpl.SetParameter(2, err_SParameterValue, log_Reports);//バリデーター名

                ucontrol.ControlCommon.Owner_MemoryApplication.CreateErrorReport("Er:7012;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            gt_Error_InvalidatedBegin02:
            // 設定エラー
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, PmNames.S_BEGIN.Name_Pm, log_Reports);//属性名
                tmpl.SetParameter(2, err_SValue, log_Reports);//属性値
                tmpl.SetParameter(3, Log_RecordReportsImpl.ToText_Exception(err_Excp), log_Reports);//例外メッセージ

                ucontrol.ControlCommon.Owner_MemoryApplication.CreateErrorReport("Er:7013;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            gt_Error_InvalidatedEnd02:
            // 設定エラー
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, PmNames.S_END.Name_Pm, log_Reports);//属性名
                tmpl.SetParameter(2, err_SValue, log_Reports);//属性値
                tmpl.SetParameter(3, Log_RecordReportsImpl.ToText_Exception(err_Excp), log_Reports);//例外メッセージ

                ucontrol.ControlCommon.Owner_MemoryApplication.CreateErrorReport("Er:7014;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            gt_Error_UndefinedValidator03:
            // TODO 未定義のバリデーターの場合。
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, err_SName_Validator, log_Reports);//バリデーター名

                ucontrol.ControlCommon.Owner_MemoryApplication.CreateErrorReport("Er:7015;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
            gt_EndMethod:
            if (Log_ReportsImpl.BDebugmode_Static)
            {
                pg_ParsingLog.Decrement(cur_Cf.Name);
            }
            log_Method.EndMethod(log_Reports);
        }
Exemplo n.º 28
0
        //────────────────────────────────────────

        /// <summary>
        /// 子コントロールを追加します。
        /// </summary>
        /// <param nFcName="uct"></param>
        public void AppendChild(
            Usercontrol uct,
            Log_Reports log_Reports
            )
        {
            Log_Method pg_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

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

            if (log_Reports.Successful)
            {
                foreach (Customcontrol cct in uct.List_Customcontrol)
                {
                    //
                    // タブ ペーンに追加できるのは、タブ ページだけです。
                    //

                    //
                    // タブ ペーン"tbp" 直下にあるタブ ページ"tbg" だけが、タブ ペーンに追加できます。
                    //

                    if (cct is CustomcontrolTabPage)
                    {
                        CustomcontrolTabPage ccTabPage = (CustomcontrolTabPage)cct;

                        //
                        // このユーザーコントロールは タブペーンではなく、
                        // タブペーンを持っているユーザーコントロールなので、
                        // 持っているタブペーン(カスタム コントロール)に、子要素を追加します。
                        //
                        //
                        // ユーザーコントロール(UC)はタブページではないので追加できないので、
                        // タブページをextendsしているカスタムコントロール(CC)を追加します。
                        //
                        this.customcontrolTabControl1.TabPages.Add(ccTabPage);
                    }
                    else
                    {
                        goto gt_Error_AnotherChildType;
                    }
                }
            }

            goto gt_EndMethod;
            //
            //
            #region 異常系
            //────────────────────────────────────────
gt_Error_AnotherChildType:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, this.ControlCommon.Expression_Name_Control.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports), log_Reports); //タブペーン・コントロール名
                tmpl.SetParameter(2, uct.ControlCommon.Expression_Name_Control.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports), log_Reports);  //追加しようとしたコントロール名

                this.ControlCommon.Owner_MemoryApplication.CreateErrorReport("Er:524;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
gt_EndMethod:
            pg_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);
        }
Exemplo n.º 30
0
        //────────────────────────────────────────

        protected void Execute6_Sub(
            object sender,
            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();
            }
            //
            //

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

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

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

                    log_Reports.Comment_EventCreationMe += "/追記:[" + sName_Usercontrol + "]コントロールが、[" + sFncName0 + "]アクションを実行。";
                }
                else
                {
                    log_Reports.Comment_EventCreationMe += "/追記:[" + sFncName0 + "]アクションを実行。";
                }
            }
            else
            {
            }

            //
            //
            //
            // リストボックス
            //
            //
            //
            UsercontrolListbox uctLst;

            if (log_Reports.Successful)
            {
                Expression_Node_String ec_ArgFcName;
                this.TrySelectAttribute(out ec_ArgFcName, Expression_Node_Function33Impl.PM_NAME_CONTROL, EnumHitcount.One_Or_Zero, log_Reports);


                List <Usercontrol> list_FcUc = this.Owner_MemoryApplication.MemoryForms.GetUsercontrolsByName(
                    ec_ArgFcName,
                    true,
                    log_Reports
                    );

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

                    if (uct is UsercontrolListbox)
                    {
                        uctLst = (UsercontrolListbox)uct;
                    }
                    else
                    {
                        uctLst = null;
                    }
                }
                else
                {
                    uctLst = null;
                }
            }
            else
            {
                uctLst = null;
            }


            //
            //
            //
            // 項目選択の要求。
            //
            //
            //
            if (log_Reports.Successful)
            {
                Expression_Node_String ec_ArgExpectedValue;
                this.TrySelectAttribute(out ec_ArgExpectedValue, Expression_Node_Function33Impl.PM_VALUE_EXPECTED, EnumHitcount.One_Or_Zero, log_Reports);

                Expression_Node_String ec_ArgKeyFieldName;
                this.TrySelectAttribute(out ec_ArgKeyFieldName, Expression_Node_Function33Impl.PM_NAME_FIELD_KEY, EnumHitcount.One_Or_Zero, log_Reports);

                Expression_Node_String ec_ArgEmptyToAltValue;
                this.TrySelectAttribute(out ec_ArgEmptyToAltValue, Expression_Node_Function33Impl.PM_VALUE_EMPTY, EnumHitcount.One_Or_Zero, log_Reports);

                if ("" == ec_ArgExpectedValue.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports))
                {
                    //
                    // 空文字列が指定されたときの代替値で検索。(初期値は空文字列)。
                    //

                    uctLst.SelectItem(
                        ec_ArgKeyFieldName,
                        ec_ArgEmptyToAltValue,
                        log_Reports
                        );
                }
                else
                {
                    uctLst.SelectItem(
                        ec_ArgKeyFieldName,
                        ec_ArgExpectedValue,
                        log_Reports
                        );
                }


                //
                // 一致項目がなければ、選択は解除されている。
                //
                if (-1 == uctLst.SelectedIndex)
                {
                    // #警告
                    log_Method.WriteWarning_ToConsole("選択されてない。。。");

                    Expression_Node_String ec_ArgExpectedValue2;
                    this.TrySelectAttribute(out ec_ArgExpectedValue2, Expression_Node_Function33Impl.PM_VALUE_EXPECTED2, EnumHitcount.One_Or_Zero, log_Reports);

                    //
                    // デフォルト値の設定があるかどうか。
                    //
                    if ("" != ec_ArgExpectedValue2.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports))
                    {
                        if ("" == ec_ArgExpectedValue2.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports))
                        {
                            //
                            // 空文字列が指定されたときの代替値で検索。(初期値は空文字列)。
                            //

                            uctLst.SelectItem(
                                ec_ArgKeyFieldName,
                                ec_ArgEmptyToAltValue,
                                log_Reports
                                );
                        }
                        else
                        {
                            uctLst.SelectItem(
                                ec_ArgKeyFieldName,
                                ec_ArgExpectedValue2,
                                log_Reports
                                );
                        }
                    }
                }
            }


            log_Method.EndMethod(log_Reports);
        }
Exemplo n.º 31
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);
        }
Exemplo n.º 32
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);
        }
Exemplo n.º 33
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.º 34
0
        //────────────────────────────────────────

        public static Usercontrol GetUsercontrol(
            Configurationtree_Node cf_CurTree,
            MemoryApplication memoryApplication,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

            log_Method.BeginMethod(Info_XmlToConf.Name_Library, "Util_XmlToConfigurationtree_NodeImpl", "GetUsercontrol", log_Reports);

            Usercontrol fcUc = null;
            string      sFcName;
            string      err_FcName;

            //
            // 対応するコントロール。
            List <Usercontrol> list_Usercontrol;

            {
                // コントロール名。
                Expression_Node_StringImpl ec_String = new Expression_Node_StringImpl(null, memoryApplication.MemoryValidators.Configurationtree_Validatorsconfig);
                {
                    PmName pmName = PmNames.S_NAME;
                    if (cf_CurTree.Dictionary_Attribute.ContainsKey(pmName.Name_Pm))
                    {
                        cf_CurTree.Dictionary_Attribute.TryGetValue(pmName, out sFcName, true, log_Reports);

                        ec_String.AppendTextNode(
                            sFcName,
                            memoryApplication.MemoryValidators.Configurationtree_Validatorsconfig,
                            log_Reports
                            );
                    }
                    else
                    {
                        //
                        // エラー。
                        err_FcName = "<コントロール名無し>";
                        goto gt_Error_NotFoundFc02;
                    }
                }


                list_Usercontrol = memoryApplication.MemoryForms.GetUsercontrolsByName(
                    ec_String,
                    true,
                    log_Reports
                    );
            }

            if (list_Usercontrol.Count < 1)
            {
                //
                // エラー。
                err_FcName = sFcName;
                goto gt_Error_NotFoundFc02;
            }
            else
            {
                fcUc = list_Usercontrol[0];
            }

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

                memoryApplication.CreateErrorReport("Er:8001;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
gt_EndMethod:
            log_Method.EndMethod(log_Reports);
            return(fcUc);
        }
Exemplo n.º 35
0
        //────────────────────────────────────────

        /// <summary>
        /// 子コントロールを追加します。
        /// </summary>
        /// <param nFcName="uct"></param>
        public void AppendChild(
            Usercontrol uct,
            Log_Reports log_Reports
            )
        {
            if (log_Reports.Successful)
            {
                ////
                //// ユーザーコントロールに、
                //// ユーザーコントロールを追加します。
                ////
                this.Controls.Add((Control)uct);

                //
                // パネルなのは カスタム コントロールなので、
                // カスタム コントロールに、
                // ユーザーコントロールを追加します。
                //
                //this.CcPanel.Controls.Add((Control)uct);
            }
        }
Exemplo n.º 36
0
        //────────────────────────────────────────

        /// <summary>
        /// フォームのデータの再読み込みを行います。
        ///
        /// どのフォームを再読み込みするかは、コントロール・リローディング設定ファイルで
        /// 設定しているリローダー要素の名前を指定します。
        /// </summary>
        /// <param select="o_Name_Together"></param>
        public void RefreshDataRange(
            XenonName o_Name_Together,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

            log_Method.BeginMethod(Info_MiddleImpl.Name_Library, this, "RefreshDataRange", log_Reports);

            //
            //
            //
            //

            List <Configurationtree_Node> listCf_Together = this.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);

                // 一致するのは1件しかない前提。
                if (sFncName == o_Name_Together.SValue)
                {
                    if (log_Reports.Successful)
                    {
                        // 最新表示にするコントロールの名前のリスト。
                        List <Configurationtree_Node> cfList_RfrTarget = cf_Together.GetChildrenByNodename(NamesNode.S_TARGET, false, log_Reports);


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

                                Expression_Node_StringImpl e_str = new Expression_Node_StringImpl(null, cf_RfrTarget);
                                e_str.AppendTextNode(
                                    sName,
                                    cf_RfrTarget,
                                    log_Reports
                                    );

                                list_FcUc = this.Owner_MemoryApplication.MemoryForms.GetUsercontrolsByName(
                                    e_str,
                                    true,
                                    log_Reports
                                    );
                            }

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

                                fcUc.RefreshData(
                                    log_Reports
                                    );
                            }
                        }
                    }
                }
            }

            //
            //
            //
            //
            log_Method.EndMethod(log_Reports);
        }
Exemplo n.º 37
0
        //────────────────────────────────────────
        #endregion



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

        /// <summary>
        /// 子コントロールを追加します。
        /// </summary>
        /// <param nFcName="uct"></param>
        public void AppendChild(
            Usercontrol uct,
            Log_Reports log_Reports
            )
        {
            //
            // エラー。

            Log_Method pg_Method = new Log_MethodImpl();
            pg_Method.BeginMethod(Info_Controls.Name_Library, this, "GetString",log_Reports);
            //
            //

            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー374!", pg_Method);

                StringBuilder t = new StringBuilder();
                t.Append("テキストボックスに、子コントロールを追加しようとしないでください。");
                t.Append(Environment.NewLine);
                t.Append(Environment.NewLine);

                t.Append("[");
                t.Append(this.ControlCommon.Expression_Name_Control);
                t.Append("]に、[");
                t.Append(uct.ControlCommon.Expression_Name_Control);
                t.Append("]を 追加しようとしました。");
                t.Append(Environment.NewLine);
                t.Append(Environment.NewLine);

                // ヒント
                r.Message = t.ToString();
                log_Reports.EndCreateReport();
            }

            //
            //
            //
            //
            pg_Method.EndMethod(log_Reports);
        }
Exemplo n.º 38
0
        //────────────────────────────────────────
        /// <summary>
        /// 指定のテーブルに、テーブルデータを データソースとして関連付けます。
        /// </summary>
        /// <param name="oEventName"></param>
        /// <param name="nTableType"></param>
        public static void BindTableToDatasource(
            Usercontrol uct,
            Expression_Node_String ec_TableName,
            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, "Util_Listbox", "BindTableToDataSource",log_Reports);
            //
            //

            if (null == uct)
            {
                MessageBox.Show(
                    "テーブルデータを、コントロールに対応付けようとしましたが、コントロールがヌルでした。\ntableId=[" + ec_TableName + "]"
                    , "▲L11エラー②!"
                    );
                goto gt_EndMethod;
            }

            Table_Humaninput o_Table = owner_MemoryApplication.MemoryTables.GetTable_HumaninputByName(
                ec_TableName,
                true,
                log_Reports
                );

            if (null == o_Table)
            {
                // エラー中断。
                goto gt_EndMethod;
            }

            //
            // テーブルに対して行われた変更を、明示的に確定しておきます。
            //
            //↓重い処理。
            //o_Table.DataTable.AcceptChanges();
            //↑これに6003msぐらいかかってる。

            if (uct is UsercontrolListbox)
            {
                UsercontrolListbox uctLst = (UsercontrolListbox)uct;

                //
                // リストボックスのデータ取得元をテーブルとします。
                //

                //
                // データソースをセットします。
                //
                //     (SelectedIndexChangedイベントが60回ぐらい呼び出される?)
                //
                uctLst.ControlCommon.BAutomaticinputting = true;
                // ↓ 0.2秒ぐらいかかる処理。
                uctLst.DataSource = o_Table.DataTable;
                // ↑ 0.2秒ぐらいかかる処理。
                uctLst.ControlCommon.BAutomaticinputting = false;

                uctLst.CustomcontrolListbox1.Table_Humaninput_Datasource = o_Table;
            }
            else
            {
                string sName_Usercontrol = uct.ControlCommon.Expression_Name_Control.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports);

                MessageBox.Show("該当する型のないコントロールでした。[" + sName_Usercontrol + "]", "▲L11エラー③!");
            }

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

        public Expression_ControlImpl(Expression_Node_String parent_Expr, Configurationtree_Node cur_Cf, Usercontrol parent_Usercontrol, MemoryApplication owner_MemoryApplication)
            : base(parent_Expr, cur_Cf, owner_MemoryApplication)
        {
            this.parent_Usercontrol   = parent_Usercontrol;
            this.list_Expression_Data = new List <Expression_Node_String>();
        }
Exemplo n.º 40
0
        //────────────────────────────────────────
        #endregion



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

        /// <summary>
        /// 子コントロールを追加します。
        /// </summary>
        /// <param nFcName="uct"></param>
        public void AppendChild(
            Usercontrol uct,
            Log_Reports log_Reports
            )
        {

            if (log_Reports.Successful)
            {
                //
                // タブ ページなのは カスタム コントロールなので、
                // カスタム コントロールに、
                // ユーザーコントロールを追加します。
                //
                this.CustomcontrolTabPage1.Controls.Add((Control)uct);
            }
        }