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

        /// <summary>
        /// レイアウト_レコードを元に、コントロールのスタイルを設定します。
        /// </summary>
        /// <param nFcName="fo_Record"></param>
        /// <param nFcName="log_Reports"></param>
        public void SetupStyle(
            RecordUserformconfig fo_Record,
            Log_Reports log_Reports
            )
        {
            Log_Method pg_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

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

            // 自動入力ここから
            this.ControlCommon.BAutomaticinputting = true;

            // リストボックスの Text プロパティーは無視。

            bool bEnabled;

            fo_Record.TryGetBool(out bEnabled, NamesFld.S_ENABLED, this.ControlCommon.Owner_MemoryApplication, log_Reports);
            this.UsercontrolEnabled = bEnabled;

            bool bVisible;

            fo_Record.TryGetBool(out bVisible, NamesFld.S_VISIBLE, this.ControlCommon.Owner_MemoryApplication, log_Reports);
            this.UsercontrolVisible = bVisible;

            // 【特殊】チェックボックスの値の型
            string sChkValueType;
            {
                fo_Record.TryGetString(out sChkValueType, NamesFld.S_CHK_VALUE_TYPE, false, "", this.ControlCommon.Owner_MemoryApplication, log_Reports);
                this.sUsercontrolChkvaluetype = sChkValueType.Trim();
                if (ValuesAttr.S_EMPTY == this.sUsercontrolChkvaluetype)
                {
                    this.EnumCheckboxValuetype = EnumCheckboxValuetype.Bool;
                }
                else if (ValuesAttr.S_ZERO_ONE == this.sUsercontrolChkvaluetype)
                {
                    this.EnumCheckboxValuetype = EnumCheckboxValuetype.Zero_One;
                }
                else if (ValuesAttr.S_BOOL == this.sUsercontrolChkvaluetype)
                {
                    this.EnumCheckboxValuetype = EnumCheckboxValuetype.Bool;
                }
                else
                {
                    //エラー
                    goto gt_Error_NotSupportedValue;
                }
            }


            // フォントの設定
            {
                // フォント・サイズの設定
                float nFontSizePt = Utility_Usercontrol.ParseFontSize(fo_Record, this.ControlCommon.Owner_MemoryApplication, log_Reports);
                this.Font = new System.Drawing.Font("MS UI Gothic", nFontSizePt, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
            }

            // タブ・インデックス
            int nTabIndex;

            fo_Record.TryGetInt(out nTabIndex, NamesFld.S_TAB_INDEX, false, -1, this.ControlCommon.Owner_MemoryApplication, log_Reports);
            if (nTabIndex < 0)
            {
                // 未指定の場合は変更しません。
            }
            else
            {
                this.UsercontrolTabindex = nTabIndex;
            }



            int nAbsXLt;

            fo_Record.TryGetInt(out nAbsXLt, NamesFld.S_X_LT, false, -1, this.ControlCommon.Owner_MemoryApplication, log_Reports);

            int nAbsYLt;

            fo_Record.TryGetInt(out nAbsYLt, NamesFld.S_Y_LT, false, -1, this.ControlCommon.Owner_MemoryApplication, log_Reports);

            this.Location = new System.Drawing.Point(nAbsXLt, nAbsYLt);


            int nWidth;

            fo_Record.TryGetInt(out nWidth, NamesFld.S_WIDTH, false, 1, this.ControlCommon.Owner_MemoryApplication, log_Reports);

            int nHeight;

            fo_Record.TryGetInt(out nHeight, NamesFld.S_HEIGHT, false, 1, this.ControlCommon.Owner_MemoryApplication, log_Reports);

            this.Size = new System.Drawing.Size(nWidth, nHeight);


            // 背景色の設定
            string sBackColor;

            fo_Record.TryGetString(out sBackColor, NamesFld.S_BACK_COLOR, false, "", this.ControlCommon.Owner_MemoryApplication, log_Reports);
            this.UsercontrolBackcolor = sBackColor;

            // コントロールは不可視にする。
            this.customcontrolCheckbox1.Visible = false;

            this.ControlCommon.BAutomaticinputting = false;
            // 自動入力ここまで

            goto gt_EndMethod;
            //
            //
            #region 異常系
            //────────────────────────────────────────
gt_Error_NotSupportedValue:
            {
                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, sChkValueType, log_Reports);                                                                                                  //CHK_VALUE_TYPEフィールド値
                tmpl.SetParameter(3, Log_RecordReportsImpl.ToText_Configuration(fo_Record.Parent_TableUserformconfig.Cur_Configurationtree), log_Reports);         //設定位置パンくずリスト

                this.ControlCommon.Owner_MemoryApplication.CreateErrorReport("Er:519;", tmpl, log_Reports);
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
gt_EndMethod:
            pg_Method.EndMethod(log_Reports);
        }
Esempio n. 2
0
        //────────────────────────────────────────

        /// <summary>
        /// レイアウト_レコードを元に、コントロールのスタイルを設定します。
        /// </summary>
        /// <param nFcName="fo_Record"></param>
        /// <param nFcName="log_Reports"></param>
        public void SetupStyle(
            RecordUserformconfig fo_Record,
            Log_Reports log_Reports
            )
        {
            Log_Method pg_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

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


            // 自動入力ここから
            this.ControlCommon.BAutomaticinputting = true;

            // リストボックスの Text プロパティーは無視。

            bool bEnabled;

            fo_Record.TryGetBool(out bEnabled, NamesFld.S_ENABLED, this.ControlCommon.Owner_MemoryApplication, log_Reports);
            this.UsercontrolEnabled = bEnabled;

            bool bVisible;

            fo_Record.TryGetBool(out bVisible, NamesFld.S_VISIBLE, this.ControlCommon.Owner_MemoryApplication, log_Reports);
            this.UsercontrolVisible = bVisible;

            // フォントの設定
            {
                // フォント・サイズの設定
                float nFontSizePt = Utility_Usercontrol.ParseFontSize(fo_Record, this.ControlCommon.Owner_MemoryApplication, log_Reports);
                this.Font = new System.Drawing.Font("MS UI Gothic", nFontSizePt, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
            }

            // タブ・インデックス
            int nTabIndex;

            fo_Record.TryGetInt(out nTabIndex, NamesFld.S_TAB_INDEX, false, -1, this.ControlCommon.Owner_MemoryApplication, log_Reports);
            if (nTabIndex < 0)
            {
                // 未指定の場合は変更しません。
            }
            else
            {
                this.UsercontrolTabindex = nTabIndex;
            }

            int nAbsXLt;

            fo_Record.TryGetInt(out nAbsXLt, NamesFld.S_X_LT, false, -1, this.ControlCommon.Owner_MemoryApplication, log_Reports);

            int nAbsYLt;

            fo_Record.TryGetInt(out nAbsYLt, NamesFld.S_Y_LT, false, -1, this.ControlCommon.Owner_MemoryApplication, log_Reports);

            this.Location = new System.Drawing.Point(nAbsXLt, nAbsYLt);


            int nWidth;

            fo_Record.TryGetInt(out nWidth, NamesFld.S_WIDTH, false, 1, this.ControlCommon.Owner_MemoryApplication, log_Reports);

            int nHeight;

            fo_Record.TryGetInt(out nHeight, NamesFld.S_HEIGHT, false, 1, this.ControlCommon.Owner_MemoryApplication, log_Reports);

            this.Size = new System.Drawing.Size(nWidth, nHeight);

            // 背景色の設定
            string sBackColor;

            fo_Record.TryGetString(out sBackColor, NamesFld.S_BACK_COLOR, false, "", this.ControlCommon.Owner_MemoryApplication, log_Reports);
            this.UsercontrolBackcolor = sBackColor;

            this.ControlCommon.BAutomaticinputting = false;
            // 自動入力ここまで

            goto gt_EndMethod;
            //
gt_EndMethod:
            pg_Method.EndMethod(log_Reports);
        }
Esempio n. 3
0
        //────────────────────────────────────────

        /// <summary>
        /// レイアウト_レコードを元に、コントロールのスタイルを設定します。
        /// </summary>
        /// <param nFcName="fo_Record"></param>
        /// <param nFcName="log_Reports"></param>
        public void SetupStyle(
            RecordUserformconfig fo_Record,
            Log_Reports log_Reports
            )
        {
            Log_Method pg_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

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


            // 自動入力ここから
            this.ControlCommon.BAutomaticinputting = true;

            {
                string sText;
                fo_Record.TryGetString(out sText, NamesFld.S_TEXT, false, "", this.ControlCommon.Owner_MemoryApplication, log_Reports);
                this.UsercontrolText = sText;

                bool bEnabled;
                fo_Record.TryGetBool(out bEnabled, NamesFld.S_ENABLED, this.ControlCommon.Owner_MemoryApplication, log_Reports);
                this.UsercontrolEnabled = bEnabled;

                bool bVisible;
                fo_Record.TryGetBool(out bVisible, NamesFld.S_VISIBLE, this.ControlCommon.Owner_MemoryApplication, log_Reports);
                this.UsercontrolVisible = bVisible;

                // フォントの設定
                {
                    // フォント・サイズの設定
                    float nFontSizePt = Utility_Usercontrol.ParseFontSize(fo_Record, this.ControlCommon.Owner_MemoryApplication, log_Reports);
                    this.Font = new System.Drawing.Font("MS UI Gothic", nFontSizePt, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
                }

                // 【特殊】ウィンドウは、X,Y設定を無視する。
                //this.ccWindow.Location = new System.Drawing.Point(sl_record.AbsXLt, sl_record.AbsYLt);


                int nWidth;
                fo_Record.TryGetInt(out nWidth, NamesFld.S_WIDTH, false, 1, this.ControlCommon.Owner_MemoryApplication, log_Reports);

                int nHeight;
                fo_Record.TryGetInt(out nHeight, NamesFld.S_HEIGHT, false, 1, this.ControlCommon.Owner_MemoryApplication, log_Reports);

                // 【特殊】ユーザーコントロールではなく、持っているウィンドウに対して変更。
                this.customcontrolWindow1.Size = new System.Drawing.Size(nWidth, nHeight);
            }

            // 背景色の設定
            string sBackColor;

            fo_Record.TryGetString(out sBackColor, NamesFld.S_BACK_COLOR, false, "", this.ControlCommon.Owner_MemoryApplication, log_Reports);
            this.UsercontrolBackcolor = sBackColor;

            this.ControlCommon.BAutomaticinputting = false;
            // 自動入力ここまで

            goto gt_EndMethod;
            //
gt_EndMethod:
            pg_Method.EndMethod(log_Reports);
        }
Esempio n. 4
0
        //────────────────────────────────────────

        /// <summary>
        /// レイアウト_レコードを元に、コントロールのスタイルを設定します。
        /// </summary>
        /// <param nFcName="fo_Record"></param>
        /// <param nFcName="log_Reports"></param>
        public void SetupStyle(
            RecordUserformconfig fo_Record,
            Log_Reports log_Reports
            )
        {
            Log_Method pg_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);

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


            // 自動入力ここから
            this.ControlCommon.BAutomaticinputting = true;

            {
                string sText;
                fo_Record.TryGetString(out sText, NamesFld.S_TEXT, false, "", this.ControlCommon.Owner_MemoryApplication, log_Reports);
                this.UsercontrolText = sText;

                bool bEnabled;
                fo_Record.TryGetBool(out bEnabled, NamesFld.S_ENABLED, this.ControlCommon.Owner_MemoryApplication, log_Reports);
                this.UsercontrolEnabled = bEnabled;

                bool bVisible;
                fo_Record.TryGetBool(out bVisible, NamesFld.S_VISIBLE, this.ControlCommon.Owner_MemoryApplication, log_Reports);
                this.UsercontrolVisible = bVisible;

                // 【特殊】
                bool bReadonly;
                fo_Record.TryGetBool(out bReadonly, NamesFld.S_READ_ONLY, this.ControlCommon.Owner_MemoryApplication, log_Reports);
                this.UsercontrolReadonly = bReadonly;

                // 【特殊】
                bool bWordwrap;
                fo_Record.TryGetBool(out bWordwrap, NamesFld.S_WORD_WRAP, this.ControlCommon.Owner_MemoryApplication, log_Reports);
                this.UsercontrolWordwrap = bWordwrap;

                // 【特殊】
                string sNewline;
                fo_Record.TryGetString(out sNewline, NamesFld.S_NEW_LINE, false, "", this.ControlCommon.Owner_MemoryApplication, log_Reports);
                this.UsercontrolNewline = sNewline;

                // 【特殊】
                string sScrollbars;
                fo_Record.TryGetString(out sScrollbars, NamesFld.S_SCROLL_BARS, false, "", this.ControlCommon.Owner_MemoryApplication, log_Reports);
                switch (sScrollbars.ToUpper())
                {
                case ValuesAttr.S_BOTH:
                    this.UsercontrolScrollbars = ScrollBars.Both;
                    break;

                case ValuesAttr.S_HORIZONTAL:
                    this.UsercontrolScrollbars = ScrollBars.Horizontal;
                    break;

                case ValuesAttr.S_VERTICAL:
                    this.UsercontrolScrollbars = ScrollBars.Vertical;
                    break;

                default:     //case "NONE":
                    this.UsercontrolScrollbars = ScrollBars.None;
                    break;
                }

                // フォントの設定
                {
                    //
                    // フォント・サイズの設定
                    //
                    float nFontSizePt = Utility_Usercontrol.ParseFontSize(fo_Record, this.ControlCommon.Owner_MemoryApplication, log_Reports);

                    //
                    //
                    //
                    this.Font = new System.Drawing.Font("MS UI Gothic", nFontSizePt, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
                }


                int nAbsXLt;
                fo_Record.TryGetInt(out nAbsXLt, NamesFld.S_X_LT, false, -1, this.ControlCommon.Owner_MemoryApplication, log_Reports);

                int nAbsYLt;
                fo_Record.TryGetInt(out nAbsYLt, NamesFld.S_Y_LT, false, -1, this.ControlCommon.Owner_MemoryApplication, log_Reports);

                this.Location = new System.Drawing.Point(nAbsXLt, nAbsYLt);



                int nWidth;
                fo_Record.TryGetInt(out nWidth, NamesFld.S_WIDTH, false, 1, this.ControlCommon.Owner_MemoryApplication, log_Reports);

                int nHeight;
                fo_Record.TryGetInt(out nHeight, NamesFld.S_HEIGHT, false, 1, this.ControlCommon.Owner_MemoryApplication, log_Reports);

                this.Size = new System.Drawing.Size(nWidth, nHeight);
            }

            // タブ・インデックス
            int nTabIndex;

            fo_Record.TryGetInt(out nTabIndex, NamesFld.S_TAB_INDEX, false, -1, this.ControlCommon.Owner_MemoryApplication, log_Reports);
            if (nTabIndex < 0)
            {
                // 未指定の場合は変更しません。
            }
            else
            {
                this.UsercontrolTabindex = nTabIndex;
            }

            // 背景色の設定
            string sBackColor;

            fo_Record.TryGetString(out sBackColor, NamesFld.S_BACK_COLOR, false, "", this.ControlCommon.Owner_MemoryApplication, log_Reports);
            this.UsercontrolBackcolor = sBackColor;

            // コントロールは不可視にする。
            this.CustomcontrolTextbox1.Visible = false;

            this.ControlCommon.BAutomaticinputting = false;
            // 自動入力ここまで


            goto gt_EndMethod;
            //
gt_EndMethod:
            pg_Method.EndMethod(log_Reports);
        }