Esempio n. 1
0
        //────────────────────────────────────────

        /// <summary>
        /// クリアー
        /// </summary>
        public void Clear()
        {
            // リストボックス
            {
                UsercontrolListbox uctLst = (UsercontrolListbox)this.UctlstNameProject;
                uctLst.ControlCommon.BAutomaticinputting = true;
                uctLst.Clear();
                uctLst.ControlCommon.BAutomaticinputting = false;
            }

            UsercontrolTextbox uctTxt = (UsercontrolTextbox)this.PctxtFpathProjectcnf;

            uctTxt.ControlCommon.BAutomaticinputting = true;
            uctTxt.Clear();
            uctTxt.ControlCommon.BAutomaticinputting = false;

            this.pctxtInformation.Text = "";
        }
Esempio n. 2
0
        //────────────────────────────────────────

        public Usercontrol Perform(
            Expression_Node_StringImpl ec_FcName,
            MemoryApplication moApplication
            )
        {
            UsercontrolListbox uctLst = new UsercontrolListbox();

            // 名前だけ初期設定
            uctLst.Expression_Name_Control = ec_FcName;
            uctLst.ControlCommon.Owner_MemoryApplication = moApplication;

            //
            // 項目に色を付けるなどの機能に、変更。
            //
            {
                uctLst.ListboxItemDrawer = new ListboxItemDrawer_03Impl(moApplication);
                // リストボックスの表示を自作します。項目の高さが固定の場合。
                uctLst.DrawMode = DrawMode.OwnerDrawFixed;
            }

            return(uctLst);
        }
Esempio n. 3
0
        //────────────────────────────────────────

        public Usercontrol Perform(
            Expression_Node_StringImpl ec_Name_Control,
            MemoryApplication owner_MemoryApplication
            )
        {
            UsercontrolListbox uctLst = new UsercontrolListbox();

            // 名前だけ初期設定
            uctLst.Expression_Name_Control = ec_Name_Control;
            uctLst.ControlCommon.Owner_MemoryApplication = owner_MemoryApplication;

            // E_Action08、E_Action26 の内容をここに移動。
            {
                // 動作
                uctLst.ListboxItemDrawer = new ListboxItemDrawer_01Impl(owner_MemoryApplication);

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

            return(uctLst);
        }
Esempio n. 4
0
 /// <summary>
 /// コンストラクター
 /// </summary>
 /// <param name="listBox"></param>
 public OperatorOfListbox(UsercontrolListbox usercontrolListbox)
     : base()
 {
     this.listboxWrapper = new ListboxWrapperImpl(usercontrolListbox);
 }
Esempio n. 5
0
        //────────────────────────────────────────

        /// <summary>
        /// S → E。
        /// </summary>
        public void Translate(
            MemoryApplication memoryApplication,
            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, "SToE", log_Reports);

            if (log_Method.CanDebug(1))
            {
                pg_ParsingLog.Increment("(41)バリデーションファイル");
            }

            //
            //
            //
            //

            if (log_Reports.Successful)
            {
                //
                // コントロール順
                memoryApplication.MemoryForms.ForEach_Children(delegate(string sKey, Usercontrol uct, ref bool bRemove, ref bool bBreak)
                {
                    if (uct is UsercontrolListbox)
                    {
                        //
                        // リストボックスなら。
                        UsercontrolListbox uctLst = (UsercontrolListbox)uct;

                        List <Configurationtree_Node> cfList_ValidatorConfig = uctLst.ControlCommon.Configurationtree_Control.GetChildrenByNodename(NamesNode.S_CODEFILE_VALIDATORS, false, log_Reports);
                        if (1 < cfList_ValidatorConfig.Count)
                        {
                            throw new Exception("バリデーター設定要素が2つ以上ありました。");
                        }
                        else if (0 < cfList_ValidatorConfig.Count)
                        {
                            Configurationtree_Node cf_ValidatorConfig = cfList_ValidatorConfig[0];

                            // (Sv)コントロールのSv
                            {
                                ConfigurationtreeToExpression_V52_FListboxValidationImpl_ to = new ConfigurationtreeToExpression_V52_FListboxValidationImpl_();

                                List <Configurationtree_Node> cfList_Validation = cf_ValidatorConfig.GetChildrenByNodename(NamesNode.S_F_LISTBOX_VALIDATION, false, log_Reports);

                                foreach (Configurationtree_Node child_Cf in cfList_Validation)
                                {
                                    //
                                    // <f-list-box-validation>
                                    to.Translate(
                                        child_Cf,
                                        uctLst,
                                        memoryApplication,
                                        pg_ParsingLog,
                                        log_Reports
                                        );
                                }//foreach
                            }

                            {
                                ConfigurationtreeToUsercontrol_V52_ValidatorImpl_ to = new ConfigurationtreeToUsercontrol_V52_ValidatorImpl_();

                                List <Configurationtree_Node> cfList_Validator = cf_ValidatorConfig.GetChildrenByNodename(NamesNode.S_VALIDATOR, false, log_Reports);
                                foreach (Configurationtree_Node cf in cfList_Validator)
                                {
                                    to.ConfigurationtreeToUsercontrol(
                                        cf,
                                        uct,
                                        pg_ParsingLog,
                                        log_Reports
                                        );
                                }
                            }
                        }//Ov
                    }
                    else
                    {
                    }
                });
            }

            goto gt_EndMethod;


            //
            //
            //
            //
gt_EndMethod:

            if (Log_ReportsImpl.BDebugmode_Static)
            {
                pg_ParsingLog.Decrement("(41)バリデーションファイル");
            }
            log_Method.EndMethod(log_Reports);
        }
Esempio n. 6
0
        //────────────────────────────────────────

        public void Translate(
            Configurationtree_Node cur_Conf,//Sv_3FListboxValidation
            UsercontrolListbox uctLst,
            MemoryApplication memoryApplication,
            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, "SToE", log_Reports);

            if (log_Method.CanDebug(1))
            {
                pg_ParsingLog.Increment("(34)" + cur_Conf.Name);
            }

            //
            //

            // バリデーター設定要素
            Configurationtree_Node cf_ValidatorConfig;
            {
                List <Configurationtree_Node> cfList_ValidatorConfig = uctLst.ControlCommon.Configurationtree_Control.GetChildrenByNodename(NamesNode.S_CODEFILE_VALIDATORS, false, log_Reports);

                if (1 < cfList_ValidatorConfig.Count)
                {
                    throw new Exception("バリデーター設定要素が2つ以上ありました。");
                }
                else if (0 < cfList_ValidatorConfig.Count)
                {
                    cf_ValidatorConfig = cfList_ValidatorConfig[0];
                }
                else
                {
                    cf_ValidatorConfig = null;
                }
            }



            //
            //
            //
            // 自
            //
            //
            //
            Expressionv_3FListboxValidationImpl cur_Exprv = new Expressionv_3FListboxValidationImpl(null, cf_ValidatorConfig, memoryApplication);

            //
            //
            //
            // 子
            //
            //
            //
            List <Configurationtree_Node> cfList_Fnc = cur_Conf.GetChildrenByNodename(NamesNode.S_FNC, false, log_Reports);

            // #デバッグ中
            //d_InMethod.WriteDebug_ToConsole(1, " <a-display>数=[" + sv_Cur.Sv_ADisplayList.Count + "]");
            //d_InMethod.WriteDebug_ToConsole(1, " <fnc name=”a-record-set-save-to”>数=[" + sv_Cur.Sv_ASelectRecordList.Count + "]");

            foreach (Configurationtree_Node child_Cf in cfList_Fnc)
            {
                string sName_Fnc;
                child_Cf.Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sName_Fnc, true, log_Reports);

                if (NamesFnc.S_VLD_SELECT_RECORD == sName_Fnc)
                {
                    ConfigurationtreeToExpression_V53_ASelectRecordImpl_ to = new ConfigurationtreeToExpression_V53_ASelectRecordImpl_();
                    to.Translate(
                        child_Cf,
                        cur_Exprv,
                        memoryApplication,
                        pg_ParsingLog,
                        log_Reports
                        );
                }
                else if (NamesFnc.S_VLD_DISPLAY == sName_Fnc)
                {
                    // <a-display>要素
                    ConfigurationtreeToExpression_V53_ADisplayImpl_ to = new ConfigurationtreeToExpression_V53_ADisplayImpl_();
                    to.Translate(
                        child_Cf,
                        cur_Exprv,
                        uctLst,
                        memoryApplication,
                        pg_ParsingLog,
                        log_Reports
                        );
                }
                else
                {
                    log_Method.WriteError_ToConsole("未実装です。");
                    throw new Exception("未実装です。");
                }
            }


            goto gt_EndMethod;


            //
            //
            //
            //
gt_EndMethod:

            if (Log_ReportsImpl.BDebugmode_Static)
            {
                pg_ParsingLog.Decrement(cur_Conf.Name);
            }
            log_Method.EndMethod(log_Reports);
        }
Esempio n. 7
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);
        }
Esempio n. 8
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("");
        }
Esempio n. 9
0
        //────────────────────────────────────────

        public void Translate(
            Configurationtree_Node cur_Cf,
            Expressionv_3FListboxValidationImpl parent_Exprv,
            UsercontrolListbox uctLst,
            MemoryApplication memoryApplication,
            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, "SToE", log_Reports);

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

            //
            //

            string err_Child_SName_Node             = "";
            string err_Parent_SName_Node            = "";
            Configurationtree_Node err_Child_CfNode = null;



            //
            //
            //
            // 自
            //
            //
            //
            Expressionv_4ADisplayImpl cur_Exprv = new Expressionv_4ADisplayImpl(parent_Exprv, cur_Cf, memoryApplication);


            //
            //
            //
            // 属性
            //
            //
            //
            {
                {
                    PmName pmName = PmNames.S_TYPE;
                    string sValue;
                    bool   bHit = cur_Cf.Dictionary_Attribute.TryGetValue(pmName, out sValue, false, log_Reports);
                    if (bHit)
                    {
                        cur_Exprv.Dictionary_SAttribute.Add(pmName.Name_Pm, sValue);
                    }
                }

                {
                    PmName pmName = PmNames.S_DESCRIPTION;
                    string sValue;
                    bool   bHit = cur_Cf.Dictionary_Attribute.TryGetValue(pmName, out sValue, false, log_Reports);
                    if (bHit)
                    {
                        cur_Exprv.Dictionary_SAttribute.Add(pmName.Name_Pm, sValue);
                    }
                }
            }

            parent_Exprv.List_Expressionv_ADisplay.Add(cur_Exprv);
            uctLst.AddValidator_FListboxForItems(parent_Exprv, log_Reports);

            // #デバッグ中
            if (log_Method.CanDebug(1))
            {
                log_Method.WriteDebug_ToConsole(" 子<f-●●>数=[" + cur_Cf.List_Child.Count + "]");
            }

            //
            //
            //
            // 子
            //
            //
            //
            cur_Cf.List_Child.ForEach(delegate(Configurationtree_Node child_Cf, ref bool bBreak)
            {
                if (child_Cf is Configurationtree_Node)
                {
                    Configurationtree_Node child_Configurationtree_Node = (Configurationtree_Node)child_Cf;

                    string sName_Fnc;
                    child_Configurationtree_Node.Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sName_Fnc, false, log_Reports);

                    if (NamesFnc.S_VLD_ALL_FIELDS_IS_EMPTY == sName_Fnc)
                    {
                        //
                        // <f-all-fields-is-empty>要素
                        ConfigurationtreeToExpression_V54_FAllFieldsIsEmptyImpl_ to = new ConfigurationtreeToExpression_V54_FAllFieldsIsEmptyImpl_();
                        to.Translate(
                            child_Configurationtree_Node,
                            cur_Exprv,
                            memoryApplication,
                            pg_ParsingLog,
                            log_Reports
                            );
                    }
                    else if (NamesFnc.S_ALL_TRUE == sName_Fnc)
                    {
                        //
                        // <f-all-true>要素
                        ConfigurationtreeToExpression_V54_FAllTrueImpl_ to = new ConfigurationtreeToExpression_V54_FAllTrueImpl_();
                        to.Translate(
                            child_Configurationtree_Node,
                            cur_Exprv,
                            memoryApplication,
                            pg_ParsingLog,
                            log_Reports
                            );
                    }
                    else
                    {
                        //
                        // エラー。
                        err_Child_SName_Node  = child_Configurationtree_Node.Name;
                        err_Parent_SName_Node = cur_Cf.Name;
                        err_Child_CfNode      = child_Configurationtree_Node;
                        bBreak = true;
                    }
                }
            });
            if (null != err_Child_SName_Node)
            {
                goto undefined_element;
            }

            goto gt_EndMethod;
            //
            //
            #region 異常系
            //────────────────────────────────────────
undefined_element:
            {
                Builder_TexttemplateP1p tmpl = new Builder_TexttemplateP1pImpl();
                tmpl.SetParameter(1, err_Child_SName_Node, log_Reports);                                         //子設定ノード名
                tmpl.SetParameter(2, err_Parent_SName_Node, log_Reports);                                        //親設定ノード名
                tmpl.SetParameter(3, Log_RecordReportsImpl.ToText_Configuration(err_Child_CfNode), log_Reports); //設定位置パンくずリスト

                memoryApplication.CreateErrorReport("Er:7020;", 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);
        }
Esempio n. 10
0
        //────────────────────────────────────────

        private void Load_Form2_(Log_Reports pg_Logging)
        {
            //
            //
            //
            //()メソッド開始
            //
            //
            //
            Log_Method pg_Method = new Log_MethodImpl(0);

            pg_Method.BeginMethod(Info_Toolwindow.Name_Library, this, "Form1_Load", pg_Logging);



            StringBuilder sb = new StringBuilder();

            MemoryAatoolxmlDialog moAatoolxmlDialog;

            if (null != this.Owner_MemoryApplication)
            {
                moAatoolxmlDialog = this.Owner_MemoryApplication.MemoryForms.MemoryAatoolxmlDialog;
            }
            else
            {
                // ダミーを作成。
                pg_Method.WriteInfo_ToConsole("ダミー・MemoryAatoolxmlDialogを作成。");
                moAatoolxmlDialog = new MemoryAatoolxmlDialogImpl(this.Owner_MemoryApplication);
            }

            moAatoolxmlDialog.MemoryAatoolxml = new MemoryAatoolxmlImpl(this.Owner_MemoryApplication);


            Configurationtree_Node parent_Conf = new Configurationtree_NodeImpl("!ハードコーディング_" + this.GetType().Name + "#Form1_Load", null);


            // ツール設定ファイルへのパスは固定とします。
            Expression_Node_Filepath ec_Fpath_toolcnf;

            {
                Configurationtree_NodeFilepath cf_Fpath = new Configurationtree_NodeFilepathImpl("ファイルパス出典未指定L09TcDlg_3", parent_Conf);
                cf_Fpath.InitPath(
                    ValuesAttr.S_FPATHR_AATOOLXML,
                    pg_Logging);
                if (!pg_Logging.Successful)
                {
                    // 既エラー。
                    goto gt_EndMethod;
                }

                ec_Fpath_toolcnf = new Expression_Node_FilepathImpl(cf_Fpath);
            }


            //
            //
            //
            //「ツール設定ファイル」読取り
            //
            //
            //
            moAatoolxmlDialog.MemoryAatoolxml.LoadFile(ec_Fpath_toolcnf, pg_Logging);
            if (!pg_Logging.Successful)
            {
                // 既エラー。
                goto gt_EndMethod;
            }

            {
                UsercontrolListbox uctLst = (UsercontrolListbox)this.UctlstNameProject;
                uctLst.Clear();
                foreach (string sName_Project in moAatoolxmlDialog.MemoryAatoolxml.Dictionary_Editor.Dictionary_Item.Keys)
                {
                    uctLst.Items.Add(sName_Project);
                }

                if ("" == moAatoolxmlDialog.Name_SelectedEditor)
                {
                    // 選択プロジェクト名が指定されていなければ。

                    if (0 < uctLst.Items.Count)
                    {
                        // 先頭の要素を選択します。
                        uctLst.ControlCommon.BAutomaticinputting = true;
                        uctLst.SelectedIndex = 0;
                        uctLst.ControlCommon.BAutomaticinputting = false;
                    }
                    else
                    {
                        // 非選択にします。
                        uctLst.ControlCommon.BAutomaticinputting = true;
                        uctLst.SelectedIndex = -1;
                        uctLst.ControlCommon.BAutomaticinputting = false;
                    }
                }
                else
                {
                    // 選択プロジェクト名が指定されていれば。

                    int selectedIndex = uctLst.Items.IndexOf(moAatoolxmlDialog.Name_SelectedEditor);

                    uctLst.ControlCommon.BAutomaticinputting = true;
                    uctLst.SelectedIndex = selectedIndex;
                    uctLst.ControlCommon.BAutomaticinputting = false;
                }
            }

            sb.Append("[◆コマンドライン引数]");
            sb.Append(Environment.NewLine);

            // コマンドライン引数を取得します。
            string[] args = System.Environment.GetCommandLineArgs();

            //コマンドライン引数の表示
            int n = 1;

            foreach (string sArg in args)
            {
                sb.Append("【");
                sb.Append(n);
                sb.Append("】");
                sb.Append(sArg);
                sb.Append(Environment.NewLine);
            }

            this.pctxtInformation.Text = sb.ToString();

            Expression_Node_String parent_Expression_Null = null;

            //  ■
            //■  ■ 「変数書出ボタン」のイベント設定
            //  ■
            {
                Expression_Node_Function expr_Func = Collection_Function.NewFunction2(Expression_Node_Function45Impl.NAME_FUNCTION,
                                                                                      parent_Expression_Null, parent_Conf, this.Owner_MemoryApplication, pg_Logging);
                expr_Func.SetAttribute(Expression_Node_Function28Impl.PM_MESSAGE, new Expression_Leaf_StringImpl("変数出力試し", null, parent_Conf), pg_Logging);
            }

            //  ■
            //■  ■ 「フォームCSV書出ボタン」のイベント設定
            //  ■
            {
                Expression_Node_Function expr_Func = Collection_Function.NewFunction2(Expression_Node_Function46Impl.NAME_FUNCTION,
                                                                                      parent_Expression_Null, parent_Conf, this.Owner_MemoryApplication, pg_Logging);
                expr_Func.SetAttribute(Expression_Node_Function28Impl.PM_MESSAGE, new Expression_Leaf_StringImpl("フォームCSV出力試し", null, parent_Conf), pg_Logging);

                this.uctButton2.UsercontroleventhandlerClick += new EventHandler(expr_Func.Execute4_OnOEa);
            }

            goto gt_EndMethod;
            //
            //
gt_EndMethod:
            pg_Method.EndMethod(pg_Logging);
        }
Esempio n. 11
0
 public ListboxWrapperImpl(UsercontrolListbox uctLst)
 {
     this.usercontrolListbox1 = uctLst;
 }
Esempio n. 12
0
        //────────────────────────────────────────

        protected override void Parse_ChildNodes(
            XmlElement cur_X,
            Configurationtree_Node cur_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, "Parse_ChildNodes", log_Reports);
            //

            XmlElement err_XADisplay = null;

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

            if (log_Reports.Successful)
            {
                if (uct is UsercontrolListbox)
                {
                    //
                    // リストボックスなら。
                    UsercontrolListbox uctLst = (UsercontrolListbox)uct;

                    //
                    // <a-select-record>、<a-display>要素
                    //
                    XmlNodeList child_XNl = cur_X.ChildNodes;

                    foreach (XmlNode x_childNode in child_XNl)
                    {
                        if (XmlNodeType.Element == x_childNode.NodeType)
                        {
                            XmlElement xChild = (XmlElement)x_childNode;
                            err_XADisplay = xChild;

                            string child_SName_Fnc = xChild.GetAttribute(PmNames.S_NAME.Name_Attribute);

                            //
                            //
                            if (NamesFnc.S_VLD_DISPLAY == child_SName_Fnc)//【変更 2012-07-19】
                            {
                                XmlToConfigurationtree_C15_Elm to = XmlToConfigurationtree_Collection.GetTranslatorByFncName(child_SName_Fnc, log_Reports);
                                to.XmlToConfigurationtree(
                                    xChild,
                                    cur_Cf,
                                    memoryApplication,
                                    log_Reports
                                    );
                            }
                            else if (NamesFnc.S_VLD_SELECT_RECORD == child_SName_Fnc)
                            {
                                // Sf:Vld-SelectRecord;

                                XmlToConfigurationtree_C15_Elm to = XmlToConfigurationtree_Collection.GetTranslatorByFncName(child_SName_Fnc, log_Reports);
                                to.XmlToConfigurationtree(
                                    xChild,
                                    cur_Cf,
                                    memoryApplication,
                                    log_Reports
                                    );
                            }
                            else
                            {
                                //
                                // エラー。
                                goto gt_Error_UndefinedChild11;
                            }
                        }
                    }
                }
            }

            goto gt_EndMethod;
            //
            #region 異常系
            //────────────────────────────────────────
gt_Error_UndefinedChild11:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー385!", log_Method);

                StringBuilder s = new StringBuilder();
                s.Append("<f-list-box-validation>要素に、<a-display><a-select-record>要素以外の要素");
                s.Append(Environment.NewLine);
                s.Append("[");
                s.Append(err_XADisplay.Name);
                s.Append("]が含まれていました。");
                s.Append(Environment.NewLine);
                s.Append(Environment.NewLine);

                // ヒント

                r.Message = s.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
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);
        }