Пример #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;

            {
                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;


                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);
        }
Пример #2
0
        //────────────────────────────────────────
        /// <summary>
        /// 「レイアウト_テーブル」のテーブルタイプが「Form」専用。
        /// </summary>
        /// <param name="fo_Record"></param>
        /// <param name="dataRow"></param>
        /// <param name="o_Table_Form"></param>
        /// <param name="ol_Config2"></param>
        /// <param name="pg_Logging"></param>
        /// <returns>0:正常終了、2:continue。</returns>
        private int Read_Form(
            RecordUserformconfig fo_Record,
            DataRow dataRow,
            Table_Humaninput o_Table_Form,
            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, "Read_Layout",pg_Logging);
            //
            //

            int nResult = 0;

            int nIntValue;// = 0;
            string sValue;// = "";
            bool bValue;// = false;

            //
            // TREE (特殊判定)
            //
            {
                //必須フィールドです。
                string sFieldName = NamesFld.S_TREE;

                // フィールドが無ければ、その時点でエラー。
                o_Table_Form.ContainsField(sFieldName, true, pg_Logging);
                if (pg_Logging.Successful)
                {
                    //フィールド有り

                    if (dataRow[sFieldName] is DBNull)// この連想配列は大文字・小文字を区別しないのが欠点。
                    {
                        // フィールドは有るが、未記入の時。

                        // TREEフィールドが未記入の場合は、空行と判断して、無視します。
                        nResult = 2;
                        goto gt_EndMethod;
                    }

                    //フィールドが有り、記入もあるとき。

                    pg_Logging.Log_Callstack.Push(pg_Method, "③");
                    bool bParsedSuccessful = Int_HumaninputImpl.TryParse(
                        dataRow[sFieldName],
                        out nIntValue,
                        EnumOperationIfErrorvalue.Spaces_To_Alt_Value, // 「値が空(-1)」は、空行としてよく使います。
                        -1,
                        pg_Logging
                        );
                    pg_Logging.Log_Callstack.Pop(pg_Method, "③");

                    if (!pg_Logging.Successful)
                    {
                        // エラー
                        goto gt_EndMethod;
                    }

                    if (bParsedSuccessful)
                    {
                        fo_Record.Set(NamesFld.S_TREE, EnumTypedb.Int, nIntValue, pg_Logging);
                        //fo_Record.NTree = nIntValue;
                    }
                    else
                    {
                        // エラー時
                    }
                }

            }

            //
            // NO
            //
            {
                //必須フィールドではありません。
                string sFieldName = NamesFld.S_NO;

                bool bContained = o_Table_Form.ContainsField(sFieldName, false, pg_Logging);
                if (pg_Logging.Successful)
                {
                    if (bContained)
                    {
                        pg_Logging.Log_Callstack.Push(pg_Method, "④");
                        bool bParsedSuccessful = Int_HumaninputImpl.TryParse(
                            dataRow[sFieldName],
                            out nIntValue,
                            EnumOperationIfErrorvalue.Spaces_To_Alt_Value, // 空行追加時のエラー抑制のため。
                            -1,
                            pg_Logging
                            );
                        pg_Logging.Log_Callstack.Pop(pg_Method, "④");

                        if (!pg_Logging.Successful)
                        {
                            // エラー
                            goto gt_EndMethod;
                        }

                        if (bParsedSuccessful)
                        {
                            fo_Record.Set(NamesFld.S_NO, EnumTypedb.Int, nIntValue, pg_Logging);
                            //fo_Record.NNo = nIntValue;
                        }
                        else
                        {
                            fo_Record.Set(NamesFld.S_NO, EnumTypedb.Int, 0, pg_Logging);
                            //fo_Record.NNo = 0;
                        }
                    }
                    else
                    {
                        fo_Record.Set(NamesFld.S_NO, EnumTypedb.Int, 0, pg_Logging);
                        //fo_Record.NNo = 0;
                    }

                }
            }

            //
            // NAME
            //
            {
                //必須フィールドです。
                string sFieldName = NamesFld.S_NAME;

                // フィールドが無ければ、その時点でエラー。
                o_Table_Form.ContainsField(sFieldName, true, pg_Logging);
                if (pg_Logging.Successful)
                {

                    pg_Logging.Log_Callstack.Push(pg_Method, "⑤");
                    bool bBool = String_HumaninputImpl.TryParse(
                        dataRow[sFieldName],
                        out sValue,
                        o_Table_Form.Name,
                        sFieldName,
                        pg_Method,
                        pg_Logging);
                    pg_Logging.Log_Callstack.Pop(pg_Method, "⑤");

                    if (bBool)
                    {
                        // コントロール名。
                        fo_Record.Set( NamesFld.S_NAME, EnumTypedb.String, sValue, pg_Logging);
                        //fo_Record.Name = sValue;
                    }
                    else
                    {
                        //
                        // NAME がエラー?
                        //

                        // コントロール名。
                        fo_Record.Set(NamesFld.S_NAME, EnumTypedb.String, "<エラー>", pg_Logging);
                        //fo_Record.Name = "<エラー>";
                    }

                    if (!pg_Logging.Successful)
                    {
                        // エラー
                        goto gt_EndMethod;
                    }

                }
            }

            //
            // int型のTREEフィールドが-1の場合は、空行と判断します。
            //
            int nCurTree;
            fo_Record.TryGetInt(out nCurTree, NamesFld.S_TREE, true, -1, memoryApplication, pg_Logging);
            if (-1 == nCurTree)
            {
                nResult = 2;
                goto gt_EndMethod;
            }

            //
            // TYPE
            //
            {
                //必須フィールドです。
                string sFieldName = NamesFld.S_TYPE;

                // フィールドが無ければ、その時点でエラー。
                o_Table_Form.ContainsField(sFieldName, true, pg_Logging);
                if (pg_Logging.Successful)
                {

                    pg_Logging.Log_Callstack.Push(pg_Method, "⑦");
                    bool bBool = String_HumaninputImpl.TryParse(
                        dataRow[sFieldName],
                        out sValue,
                        o_Table_Form.Name,
                        sFieldName,
                        pg_Method,
                        pg_Logging);
                    pg_Logging.Log_Callstack.Pop(pg_Method, "⑦");

                    if (bBool)
                    {
                        fo_Record.Set(NamesFld.S_TYPE, EnumTypedb.String, sValue, pg_Logging);
                        //fo_Record.SType = sValue;
                    }
                    else
                    {
                        fo_Record.Set(NamesFld.S_TYPE, EnumTypedb.String, "", pg_Logging);
                        //fo_Record.SType = "";
                    }

                    if (!pg_Logging.Successful)
                    {
                        // エラー
                        goto gt_EndMethod;
                    }
                }
            }

            //
            // TEXT
            //
            {
                //必須フィールドです。
                string sFieldName = NamesFld.S_TEXT;

                // フィールドが無ければ、その時点でエラー。
                o_Table_Form.ContainsField(sFieldName, true, pg_Logging);
                if (pg_Logging.Successful)
                {

                    pg_Logging.Log_Callstack.Push(pg_Method, "⑧");
                    bool bBool = String_HumaninputImpl.TryParse(
                        dataRow[sFieldName],
                        out sValue,
                        o_Table_Form.Name,
                        sFieldName,
                        pg_Method,
                        pg_Logging);
                    pg_Logging.Log_Callstack.Pop(pg_Method, "⑧");

                    if (bBool)
                    {
                        fo_Record.Set(NamesFld.S_TEXT, EnumTypedb.String, sValue, pg_Logging);
                        //fo_Record.SText = sValue;
                    }
                    else
                    {
                        fo_Record.Set(NamesFld.S_TEXT, EnumTypedb.String, "", pg_Logging);
                        //fo_Record.SText = "";
                    }

                    if (!pg_Logging.Successful)
                    {
                        // エラー
                        goto gt_EndMethod;
                    }

                }
            }

            //
            // FILE
            //
            {
                //必須フィールドです。
                string sFieldName = NamesFld.S_FILE;

                // フィールドが無ければ、その時点でエラー。
                o_Table_Form.ContainsField(sFieldName, true, pg_Logging);
                if (pg_Logging.Successful)
                {
                    pg_Logging.Log_Callstack.Push(pg_Method, "⑨");
                    bool bBool = String_HumaninputImpl.TryParse(
                        dataRow[sFieldName],
                        out sValue,
                        o_Table_Form.Name,
                        sFieldName,
                        pg_Method,
                        pg_Logging);
                    pg_Logging.Log_Callstack.Pop(pg_Method, "⑨");

                    if (bBool)
                    {
                        Configurationtree_NodeFilepath cf_Fpath_Control = new Configurationtree_NodeFilepathImpl("ファイルパス出典未指定L10_1", o_Table_Form);
                        cf_Fpath_Control.InitPath(sValue, pg_Logging);
                        if (pg_Logging.Successful)
                        {
                            fo_Record.Set(NamesFld.S_FILE, EnumTypedb.ConfFilepath, cf_Fpath_Control, pg_Logging);
                            //fo_Record.Cf_File = cf_Fpath_Control;
                        }
                    }
                    else
                    {
                        Configurationtree_NodeFilepath cf_Fpath_Control = new Configurationtree_NodeFilepathImpl("ファイルパス出典未指定L10_2", o_Table_Form);
                        cf_Fpath_Control.InitPath("", pg_Logging);
                        if (pg_Logging.Successful)
                        {
                            fo_Record.Set(NamesFld.S_FILE, EnumTypedb.ConfFilepath, cf_Fpath_Control, pg_Logging);
                            //fo_Record.Cf_File = cf_Fpath;
                        }
                    }

                    if (!pg_Logging.Successful)
                    {
                        // エラー
                        goto gt_EndMethod;
                    }

                }
            }

            //
            // ENABLED
            //
            {
                //必須フィールドです。
                string sFieldName = NamesFld.S_ENABLED;

                // フィールドが無ければ、その時点でエラー。
                o_Table_Form.ContainsField(sFieldName, true, pg_Logging);
                if (pg_Logging.Successful)
                {

                    pg_Logging.Log_Callstack.Push(pg_Method, "⑩");
                    bool bParseSuccessful = Bool_HumaninputImpl.TryParse(
                        dataRow[sFieldName],
                        out bValue,
                        EnumOperationIfErrorvalue.Spaces_To_Alt_Value, // 空行追加時のエラー抑制のため。
                        false,
                        pg_Logging
                        );
                    pg_Logging.Log_Callstack.Pop(pg_Method, "⑩");

                    if (!pg_Logging.Successful)
                    {
                        // エラー
                        goto gt_EndMethod;
                    }

                    if (bParseSuccessful)
                    {
                        fo_Record.Set( NamesFld.S_ENABLED, EnumTypedb.Bool, bValue, pg_Logging);
                        //fo_Record.BEnabled = bValue;
                    }
                    else
                    {
                        fo_Record.Set(NamesFld.S_ENABLED, EnumTypedb.Bool, false, pg_Logging);
                        //fo_Record.BEnabled = false;
                    }
                }
            }

            //
            // VISIBLE
            //
            {
                //必須フィールドではありません。
                string sFieldName = NamesFld.S_VISIBLE;

                bool bContained = o_Table_Form.ContainsField(sFieldName, false, pg_Logging);
                if (bContained)
                {
                    pg_Logging.Log_Callstack.Push(pg_Method, "⑪");
                    bool bParsedSuccessful = Bool_HumaninputImpl.TryParse(
                        dataRow[sFieldName],
                        out bValue,
                        EnumOperationIfErrorvalue.Spaces_To_Alt_Value, // 空行追加時のエラー抑制のため。
                        false,
                        pg_Logging
                        );
                    pg_Logging.Log_Callstack.Pop(pg_Method, "⑪");

                    if (!pg_Logging.Successful)
                    {
                        // エラー
                        goto gt_EndMethod;
                    }

                    if (bParsedSuccessful)
                    {
                        fo_Record.Set(NamesFld.S_VISIBLE, EnumTypedb.Bool, bValue, pg_Logging);
                        //fo_Record.BVisible = bValue;
                    }
                    else
                    {
                        fo_Record.Set(NamesFld.S_VISIBLE, EnumTypedb.Bool, false, pg_Logging);
                        //fo_Record.BVisible = false;
                    }
                }
                else
                {
                    //
                    // VISIBLEフィールドがない場合、常に可視とします。
                    //

                    fo_Record.Set(NamesFld.S_VISIBLE, EnumTypedb.Bool, true, pg_Logging);
                    //fo_Record.BVisible = true;
                }
            }

            //
            // READ_ONLY
            //
            {
                //必須フィールドです。
                string sFieldName = NamesFld.S_READ_ONLY;

                // フィールドが無ければ、その時点でエラー。
                o_Table_Form.ContainsField(sFieldName, true, pg_Logging);
                if (pg_Logging.Successful)
                {
                    pg_Logging.Log_Callstack.Push(pg_Method, "⑫");
                    bool bParsedSuccessful = Bool_HumaninputImpl.TryParse(
                        dataRow[sFieldName],
                        out bValue,
                        EnumOperationIfErrorvalue.Spaces_To_Alt_Value, // 空行追加時のエラー抑制のため。
                        false,
                        pg_Logging
                        );
                    pg_Logging.Log_Callstack.Pop(pg_Method, "⑫");

                    if (!pg_Logging.Successful)
                    {
                        // エラー
                        goto gt_EndMethod;
                    }

                    if (bParsedSuccessful)
                    {
                        fo_Record.Set(NamesFld.S_READ_ONLY, EnumTypedb.Bool, bValue, pg_Logging);
                        //fo_Record.BReadOnly = bValue;
                    }
                    else
                    {
                        fo_Record.Set(NamesFld.S_READ_ONLY, EnumTypedb.Bool, false, pg_Logging);
                        //fo_Record.BReadOnly = false;
                    }
                }
            }

            //
            // WORD_WRAP
            //
            {
                //必須フィールドです。
                string sFieldName = NamesFld.S_WORD_WRAP;

                // フィールドが無ければ、その時点でエラー。
                o_Table_Form.ContainsField(sFieldName, true, pg_Logging);
                if (pg_Logging.Successful)
                {
                    pg_Logging.Log_Callstack.Push(pg_Method, "⑬");
                    bool bParsedSuccessful = Bool_HumaninputImpl.TryParse(
                        dataRow[sFieldName],
                        out bValue,
                        EnumOperationIfErrorvalue.Spaces_To_Alt_Value, // 空行追加時のエラー抑制のため。
                        false,
                        pg_Logging
                        );
                    pg_Logging.Log_Callstack.Pop(pg_Method, "⑬");

                    if (!pg_Logging.Successful)
                    {
                        // エラー
                        goto gt_EndMethod;
                    }

                    if (bParsedSuccessful)
                    {
                        fo_Record.Set(NamesFld.S_WORD_WRAP, EnumTypedb.Bool, bValue, pg_Logging);
                        //fo_Record.BWordWrap = bValue;
                    }
                    else
                    {
                        fo_Record.Set(NamesFld.S_WORD_WRAP, EnumTypedb.Bool, false, pg_Logging);
                        //fo_Record.BWordWrap = false;
                    }
                }
            }

            //
            // NEW_LINE
            //
            {
                //必須フィールドではありません。
                string sFieldName = NamesFld.S_NEW_LINE;

                bool bContained = o_Table_Form.ContainsField(sFieldName, false, pg_Logging);
                if (bContained)
                {
                    pg_Logging.Log_Callstack.Push(pg_Method, "⑭");
                    bool bBool = String_HumaninputImpl.TryParse(
                        dataRow[sFieldName],
                        out sValue,
                        o_Table_Form.Name,
                        sFieldName,
                        pg_Method,
                        pg_Logging);
                    pg_Logging.Log_Callstack.Pop(pg_Method, "⑭");

                    if (bBool)
                    {
                        fo_Record.Set(NamesFld.S_NEW_LINE, EnumTypedb.String, sValue, pg_Logging);
                        //fo_Record.SNewLine = sValue;
                    }
                    else
                    {
                        fo_Record.Set(NamesFld.S_NEW_LINE, EnumTypedb.String, "", pg_Logging);
                        //fo_Record.SNewLine = "";
                    }

                    if (!pg_Logging.Successful)
                    {
                        // エラー
                        goto gt_EndMethod;
                    }

                }
                else
                {
                    //
                    // VISIBLEフィールドがない場合、指定なしとします。
                    //

                    fo_Record.Set(NamesFld.S_NEW_LINE, EnumTypedb.String, "", pg_Logging);
                    //fo_Record.SNewLine = "";
                }
            }

            //
            // SCROLL_BARS
            //
            {
                //必須フィールドです。
                string sFieldName = NamesFld.S_SCROLL_BARS;

                // フィールドが無ければ、その時点でエラー。
                o_Table_Form.ContainsField(sFieldName, true, pg_Logging);
                if (pg_Logging.Successful)
                {
                    pg_Logging.Log_Callstack.Push(pg_Method, "⑮");
                    bool bBool = String_HumaninputImpl.TryParse(
                        dataRow[sFieldName],
                        out sValue,
                        o_Table_Form.Name,
                        sFieldName,
                        pg_Method,
                        pg_Logging);
                    pg_Logging.Log_Callstack.Pop(pg_Method, "⑮");

                    if (bBool)
                    {
                        fo_Record.Set(NamesFld.S_SCROLL_BARS, EnumTypedb.String, sValue, pg_Logging);
                        //fo_Record.SScrollBars = sValue;
                    }
                    else
                    {
                        fo_Record.Set(NamesFld.S_SCROLL_BARS, EnumTypedb.String, "", pg_Logging);
                        //fo_Record.SScrollBars = "";
                    }

                    if (!pg_Logging.Successful)
                    {
                        // エラー
                        goto gt_EndMethod;
                    }
                }
            }

            //
            // CHK_VALUE_TYPE
            //
            {
                //必須フィールドです。
                string sFieldName = NamesFld.S_CHK_VALUE_TYPE;

                // フィールドが無ければ、その時点でエラー。
                o_Table_Form.ContainsField(sFieldName, true, pg_Logging);
                if (pg_Logging.Successful)
                {
                    pg_Logging.Log_Callstack.Push(pg_Method, "⑯");
                    bool bBool = String_HumaninputImpl.TryParse(
                        dataRow[sFieldName],
                        out sValue,
                        o_Table_Form.Name,
                        sFieldName,
                        pg_Method,
                        pg_Logging);
                    pg_Logging.Log_Callstack.Pop(pg_Method, "⑯");

                    if (bBool)
                    {
                        fo_Record.Set(NamesFld.S_CHK_VALUE_TYPE, EnumTypedb.String, sValue, pg_Logging);
                        //fo_Record.SChkValueType = sValue;
                    }
                    else
                    {
                        fo_Record.Set(NamesFld.S_CHK_VALUE_TYPE, EnumTypedb.String, "", pg_Logging);
                        //fo_Record.SChkValueType = "";
                    }

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

            //
            // FONT_SIZE_PT
            //
            {
                //必須フィールドです。
                string sFieldName = NamesFld.S_FONT_SIZE_PT;

                // フィールドが無ければ、その時点でエラー。
                o_Table_Form.ContainsField(sFieldName, true, pg_Logging);
                if (pg_Logging.Successful)
                {
                    pg_Logging.Log_Callstack.Push(pg_Method, "⑰");
                    bool bBool = String_HumaninputImpl.TryParse(
                        dataRow[sFieldName],
                        out sValue,
                        o_Table_Form.Name,
                        sFieldName,
                        pg_Method,
                        pg_Logging);
                    pg_Logging.Log_Callstack.Pop(pg_Method, "⑰");

                    if (bBool)
                    {
                        fo_Record.Set(NamesFld.S_FONT_SIZE_PT, EnumTypedb.String, sValue, pg_Logging);
                        //fo_Record.SFontSizePt = sValue;
                    }
                    else
                    {
                        fo_Record.Set(NamesFld.S_FONT_SIZE_PT, EnumTypedb.String, "", pg_Logging);
                        //fo_Record.SFontSizePt = "";
                    }

                    if (!pg_Logging.Successful)
                    {
                        // エラー
                        goto gt_EndMethod;
                    }
                }
            }

            //
            // PIC_ZOOM
            //
            {
                //必須フィールドではありません。
                string sFieldName = NamesFld.S_PIC_ZOOM;

                bool bContained = o_Table_Form.ContainsField(sFieldName, false, pg_Logging);
                if (bContained)
                {
                    pg_Logging.Log_Callstack.Push(pg_Method, "⑱");
                    bool bParsedSuccessful = Int_HumaninputImpl.TryParse(
                        dataRow[sFieldName],
                        out nIntValue,
                        EnumOperationIfErrorvalue.Spaces_To_Alt_Value, // 空行追加時のエラー抑制のため。
                        1000,// 等倍サイズ。千分率なので1000。
                        pg_Logging
                        );
                    pg_Logging.Log_Callstack.Pop(pg_Method, "⑱");

                    if (!pg_Logging.Successful)
                    {
                        // エラー
                        goto gt_EndMethod;
                    }

                    if (bParsedSuccessful)
                    {
                        fo_Record.Set(NamesFld.S_PIC_ZOOM, EnumTypedb.Int, nIntValue, pg_Logging);
                        //fo_Record.NPicZoom = nIntValue;
                    }
                }
                else
                {
                    //
                    // フィールドが無かった場合。
                    //
                    fo_Record.Set(NamesFld.S_PIC_ZOOM, EnumTypedb.Int, 1000, pg_Logging);
                    //fo_Record.NPicZoom = 1000;// 等倍サイズ。千分率なので1000。
                }
            }

            //
            // X_LT
            //
            {
                //必須フィールドです。
                string sFieldName = NamesFld.S_X_LT;

                // フィールドが無ければ、その時点でエラー。
                o_Table_Form.ContainsField(sFieldName, true, pg_Logging);
                if (pg_Logging.Successful)
                {
                    pg_Logging.Log_Callstack.Push(pg_Method, "⑲");
                    bool bParsedSuccessful = Int_HumaninputImpl.TryParse(
                        dataRow[sFieldName],
                        out nIntValue,
                        EnumOperationIfErrorvalue.Spaces_To_Alt_Value, // 空行追加時のエラー抑制のため。
                        -1,
                        pg_Logging
                        );
                    pg_Logging.Log_Callstack.Pop(pg_Method, "⑲");

                    if (!pg_Logging.Successful)
                    {
                        // エラー
                        goto gt_EndMethod;
                    }

                    if (bParsedSuccessful)
                    {
                        fo_Record.Set(NamesFld.S_X_LT, EnumTypedb.Int, nIntValue, pg_Logging);
                        //fo_Record.NAbsXLt = nIntValue;
                    }
                }
            }

            //
            // Y_LT
            //
            {
                //必須フィールドです。
                string sFieldName = NamesFld.S_Y_LT;

                // フィールドが無ければ、その時点でエラー。
                o_Table_Form.ContainsField(sFieldName, true, pg_Logging);
                if (pg_Logging.Successful)
                {
                    pg_Logging.Log_Callstack.Push(pg_Method, "⑳");
                    bool bParsedSuccessful = Int_HumaninputImpl.TryParse(
                        dataRow[sFieldName],
                        out nIntValue,
                        EnumOperationIfErrorvalue.Spaces_To_Alt_Value, // 空行追加時のエラー抑制のため。
                        -1,
                        pg_Logging
                        );
                    pg_Logging.Log_Callstack.Pop(pg_Method, "⑳");

                    if (!pg_Logging.Successful)
                    {
                        // エラー
                        goto gt_EndMethod;
                    }

                    if (bParsedSuccessful)
                    {
                        fo_Record.Set(NamesFld.S_Y_LT, EnumTypedb.Int, nIntValue, pg_Logging);
                        //fo_Record.NAbsYLt = nIntValue;
                    }
                }
            }

            //
            // WIDTH
            //
            {
                //必須フィールドです。
                string sFieldName = NamesFld.S_WIDTH;

                // フィールドが無ければ、その時点でエラー。
                o_Table_Form.ContainsField(sFieldName, true, pg_Logging);
                if (pg_Logging.Successful)
                {
                    pg_Logging.Log_Callstack.Push(pg_Method, "(21)");
                    bool bParsedSuccessful = Int_HumaninputImpl.TryParse(
                        dataRow[sFieldName],
                        out nIntValue,
                        EnumOperationIfErrorvalue.Spaces_To_Alt_Value, // 空行追加時のエラー抑制のため。
                        -1,
                        pg_Logging
                        );
                    pg_Logging.Log_Callstack.Pop(pg_Method, "(21)");

                    if (!pg_Logging.Successful)
                    {
                        // エラー
                        goto gt_EndMethod;
                    }

                    if (bParsedSuccessful)
                    {
                        fo_Record.Set(NamesFld.S_WIDTH, EnumTypedb.Int, nIntValue, pg_Logging);
                        //fo_Record.NWidth = nIntValue;
                    }
                }
            }

            //
            // HEIGHT
            //
            {
                //必須フィールドです。
                string sFieldName = NamesFld.S_HEIGHT;

                // フィールドが無ければ、その時点でエラー。
                o_Table_Form.ContainsField(sFieldName, true, pg_Logging);
                if (pg_Logging.Successful)
                {
                    pg_Logging.Log_Callstack.Push(pg_Method, "(22)");
                    bool bParsedSuccessful = Int_HumaninputImpl.TryParse(
                        dataRow[sFieldName],
                        out nIntValue,
                        EnumOperationIfErrorvalue.Spaces_To_Alt_Value, // 空行追加時のエラー抑制のため。
                        -1,
                        pg_Logging
                        );
                    pg_Logging.Log_Callstack.Pop(pg_Method, "(22)");

                    if (!pg_Logging.Successful)
                    {
                        // エラー
                        goto gt_EndMethod;
                    }

                    if (bParsedSuccessful)
                    {
                        fo_Record.Set(NamesFld.S_HEIGHT, EnumTypedb.Int, nIntValue, pg_Logging);
                        //fo_Record.NHeight = nIntValue;
                    }
                }
            }

            //
            // TAB_INDEX
            //
            {
                //必須フィールドです。
                string sFieldName = NamesFld.S_TAB_INDEX;

                // フィールドが無ければ、その時点でエラー。
                o_Table_Form.ContainsField(sFieldName, true, pg_Logging);
                if (pg_Logging.Successful)
                {
                    pg_Logging.Log_Callstack.Push(pg_Method, "(23)");
                    bool bParsedSuccessful = Int_HumaninputImpl.TryParse(
                        dataRow[sFieldName],
                        out nIntValue,
                        EnumOperationIfErrorvalue.Spaces_To_Alt_Value,//大したデータではないので、省略すると-1にする。
                        -1,
                        pg_Logging
                        );
                    pg_Logging.Log_Callstack.Pop(pg_Method, "(23)");

                    if (!pg_Logging.Successful)
                    {
                        // エラー
                        goto gt_EndMethod;
                    }

                    if (bParsedSuccessful)
                    {
                        fo_Record.Set(NamesFld.S_TAB_INDEX, EnumTypedb.Int, nIntValue, pg_Logging);
                        //fo_Record.NTabIndex = nIntValue;
                    }
                }
            }

            //
            // BACK_COLOR
            //
            {
                //必須フィールドではありません。
                string sFieldName = NamesFld.S_BACK_COLOR;

                bool bContained = o_Table_Form.ContainsField(sFieldName, false, pg_Logging);
                if (bContained)
                {
                    pg_Logging.Log_Callstack.Push(pg_Method, "(24)");
                    bool bBool = String_HumaninputImpl.TryParse(
                        dataRow[sFieldName],
                        out sValue,
                        o_Table_Form.Name,
                        sFieldName,
                        pg_Method,
                        pg_Logging);
                    pg_Logging.Log_Callstack.Pop(pg_Method, "(24)");

                    if (bBool)
                    {
                        fo_Record.Set(NamesFld.S_BACK_COLOR, EnumTypedb.String, sValue, pg_Logging);
                        //fo_Record.SBackColor = sValue;
                    }
                    else
                    {
                        fo_Record.Set(NamesFld.S_BACK_COLOR, EnumTypedb.String, "", pg_Logging);
                        //fo_Record.SBackColor = "";
                    }

                    if (!pg_Logging.Successful)
                    {
                        // エラー
                        goto gt_EndMethod;
                    }

                }
                else
                {
                    fo_Record.Set(NamesFld.S_BACK_COLOR, EnumTypedb.String, "", pg_Logging);
                    //fo_Record.SBackColor = "";
                }
            }

            this.Read_FormLst(
                false,
                fo_Record,
                dataRow,
                o_Table_Form,
                pg_Logging
                );

            //
            //
            //
            //
            gt_EndMethod:
            pg_Method.EndMethod(pg_Logging);
            return nResult;
        }
Пример #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;

            // リストボックスの 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);
        }
Пример #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;

                // フォントの設定
                {
                    // フォント・サイズの設定
                    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);
        }
Пример #5
0
        //────────────────────────────────────────
        /// <summary>
        /// 「(Form_lst)補完レイアウト_テーブル」用。
        /// </summary>
        /// <returns>0:正常終了、2:continue。</returns>
        private int Read_FormLst(
            bool bNameRefRequired,
            RecordUserformconfig fo_Record,
            DataRow dataRow,
            Table_Humaninput o_Table_Form,
            Log_Reports pg_Logging
            )
        {
            Log_Method pg_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);
            pg_Method.BeginMethod(Info_LayoutImpl.Name_Library, this, "Read_LayoutLst",pg_Logging);
            //
            //

            int nResult = 0;

            int nIntValue;// = 0;
            string sValue;// = "";
            //bool boolValue;// = false;

            if (bNameRefRequired)
            {
                //
                // NAME_REF が未記入ならスキップ
                string sFieldName = NamesFld.S_NAME_REF;
                if (dataRow.Table.Columns.Contains(sFieldName))
                {
                    if (dataRow[sFieldName] is DBNull)
                    {
                        // この連想配列は大文字・小文字を区別しないのが欠点。

                        // NAME_REFフィールドが未記入の場合は、空行と判断して、無視します。
                        nResult = 2;
                        goto gt_EndMethod;
                    }
                }
                else
                {
                    if (pg_Logging.CanCreateReport)
                    {
                        Log_RecordReports r = pg_Logging.BeginCreateReport(EnumReport.Error);
                        r.SetTitle("▲エラー921!", pg_Method);
                        r.Message = "[" + sFieldName + "]フィールドは、[" + o_Table_Form.Name + "]には存在しませんでした。";
                        pg_Logging.EndCreateReport();
                    }
                }
            }

            //
            // ITEM_HEIGHT_PX
            //
            {
                string sFieldName = NamesFld.S_ITEM_HEIGHT_PX;
                if (dataRow.Table.Columns.Contains(sFieldName))
                {
                    pg_Logging.Log_Callstack.Push(pg_Method, "(25)");
                    bool bBool = !Int_HumaninputImpl.TryParse(
                        dataRow[sFieldName],
                        out nIntValue,
                        EnumOperationIfErrorvalue.Spaces_To_Alt_Value, // 空行追加時のエラー抑制のため。
                        -1,
                        pg_Logging
                        );
                    pg_Logging.Log_Callstack.Pop(pg_Method, "(25)");

                    if (bBool)
                    {
                        // パース失敗時

                        // 無視
                    }
                    else
                    {
                        if (!pg_Logging.Successful)
                        {
                            // エラー
                            goto gt_EndMethod;
                        }

                        if (nIntValue < 1 || 256 <= nIntValue)
                        {
                            // 1未満、または256以上をセットするとエラーになるので無視。
                            // 空欄(-1)
                        }
                        else
                        {
                            fo_Record.Set(NamesFld.S_ITEM_HEIGHT_PX, EnumTypedb.Int, nIntValue, pg_Logging);
                            //fo_Record.NItemHeightPx = nIntValue;
                        }
                    }

                }
                else
                {
                    //
                    // スルーすること。初期化してはいけない。
                    //
                }
            }

            //
            // ITEM_DISPLAY_FORMAT
            //
            {
                string sFieldName = NamesFld.S_ITEM_DISPLAY_FORMAT;
                if (dataRow.Table.Columns.Contains(sFieldName))
                {
                    pg_Logging.Log_Callstack.Push(pg_Method, "(26)");
                    bool bBool = String_HumaninputImpl.TryParse(
                        dataRow[sFieldName],
                        out sValue,
                        o_Table_Form.Name,
                        sFieldName,
                        pg_Method,
                        pg_Logging);
                    pg_Logging.Log_Callstack.Pop(pg_Method, "(26)");

                    if (bBool)
                    {
                        fo_Record.Set(NamesFld.S_ITEM_DISPLAY_FORMAT, EnumTypedb.String, sValue, pg_Logging);
                        //fo_Record.SItemDisplayFormat = sValue;
                    }
                    else
                    {
                        fo_Record.Set(NamesFld.S_ITEM_DISPLAY_FORMAT, EnumTypedb.String, "", pg_Logging);
                        //fo_Record.SItemDisplayFormat = "";
                    }

                    if (!pg_Logging.Successful)
                    {
                        // エラー
                        goto gt_EndMethod;
                    }

                }
                else
                {
                    //
                    // スルーすること。初期化してはいけない。
                    //
                }
            }

            //
            // LIST_VALUE_FIELD
            //
            {
                string sFieldName = NamesFld.S_LIST_VALUE_FIELD;
                if (dataRow.Table.Columns.Contains(sFieldName))
                {
                    pg_Logging.Log_Callstack.Push(pg_Method, "(27)");
                    bool bBool = String_HumaninputImpl.TryParse(
                        dataRow[sFieldName],
                        out sValue,
                        o_Table_Form.Name,
                        sFieldName,
                        pg_Method,
                        pg_Logging);
                    pg_Logging.Log_Callstack.Pop(pg_Method, "(27)");

                    if (bBool)
                    {
                        fo_Record.Set(NamesFld.S_LIST_VALUE_FIELD, EnumTypedb.String, sValue, pg_Logging);
                        //fo_Record.SListValueField = sValue;
                    }
                    else
                    {
                        fo_Record.Set(NamesFld.S_LIST_VALUE_FIELD, EnumTypedb.String, "", pg_Logging);
                        //fo_Record.SListValueField = "";
                    }

                    if (!pg_Logging.Successful)
                    {
                        // エラー
                        goto gt_EndMethod;
                    }

                }
                else
                {
                    //
                    // スルーすること。初期化してはいけない。
                    //
                }
            }

            //
            //
            //
            //
            gt_EndMethod:
            pg_Method.EndMethod(pg_Logging);
            return nResult;
        }
Пример #6
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);
        }
Пример #7
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 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.HorizontalScrollbar = true;
                    this.UsercontrolScrollbars = ScrollBars.Both;
                    break;
                case ValuesAttr.S_HORIZONTAL:
                    this.HorizontalScrollbar = true;
                    this.UsercontrolScrollbars = ScrollBars.Horizontal;
                    break;
                case ValuesAttr.S_VERTICAL:
                    this.HorizontalScrollbar = false;
                    this.UsercontrolScrollbars = ScrollBars.Vertical;
                    break;
                default: //case "NONE":
                    this.HorizontalScrollbar = false;
                    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 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 nItemHeightPx;
            fo_Record.TryGetInt(out nItemHeightPx, NamesFld.S_ITEM_HEIGHT_PX, false, UsercontrolListbox.N_DEFAULT_ITEM_HEIGHT_PX, this.ControlCommon.Owner_MemoryApplication, log_Reports);
            if (0 < nItemHeightPx && nItemHeightPx < 256)
            {
                this.ItemHeight = nItemHeightPx;
            }

            // 【特殊】リストボックスの場合
            string sItemDisplayFormat;
            fo_Record.TryGetString(out sItemDisplayFormat, NamesFld.S_ITEM_DISPLAY_FORMAT, false, "", this.ControlCommon.Owner_MemoryApplication, log_Reports);
            this.CustomcontrolListbox1.SItemDisplayFormat = sItemDisplayFormat;

            // 【特殊】リストボックスの場合
            string sListValueField;
            fo_Record.TryGetString(out sListValueField, NamesFld.S_LIST_VALUE_FIELD, false, "", this.ControlCommon.Owner_MemoryApplication, log_Reports);
            this.CustomcontrolListbox1.SListValueField = sListValueField;


            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.customcontrolListbox1.Visible = false;

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

            goto gt_EndMethod;
            //
        gt_EndMethod:
            pg_Method.EndMethod(log_Reports);
        }
Пример #8
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);
        }
Пример #9
0
        //────────────────────────────────────────
        #endregion



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

        /// <summary>
        /// フォント・サイズを読み取ります。
        /// </summary>
        /// <param nFcName="fo_Record"></param>
        /// <param nFcName="log_Reports"></param>
        /// <returns></returns>
        public static float ParseFontSize(
            RecordUserformconfig fo_Record,
            MemoryApplication memoryApplication,
            Log_Reports log_Reports)
        {
            Log_Method pg_Method = new Log_MethodImpl(0);

            pg_Method.BeginMethod(Info_Controls.Name_Library, "Util_Fo", "ParseFontSize", log_Reports);

            float     nFontSizePt;
            Exception err_Excp;

            {
                // 例:"6.75" や ""(空文字列)。
                string sFontSizePt;
                fo_Record.TryGetString(out sFontSizePt, NamesFld.S_FONT_SIZE_PT, false, "",
                                       memoryApplication,
                                       log_Reports);
                sFontSizePt = sFontSizePt.Trim();

                if ("" == sFontSizePt)
                {
                    //
                    // 未指定時のフォントサイズ
                    //
                    nFontSizePt = N_DEFAULT_FONT_PT;
                }
                else
                {
                    try
                    {
                        nFontSizePt = float.Parse(sFontSizePt);
                    }
                    catch (Exception e2)
                    {
                        //
                        // 例外発生時のフォントサイズ
                        //
                        nFontSizePt = N_DEFAULT_FONT_PT;
                        err_Excp    = e2;

                        goto gt_Error_Exception;
                    }
                }
            }
            goto gt_EndMethod;
            //
            //
            #region 異常系
            //────────────────────────────────────────
gt_Error_Exception:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲設定エラー4041!", pg_Method);
                r.Message = "コントロール設定ファイルの読取エラー:" + err_Excp.Message;
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
gt_EndMethod:
            pg_Method.EndMethod(log_Reports);
            return(nFontSizePt);
        }
Пример #10
0
        //────────────────────────────────────────
        /// <summary>
        /// 『コントロール設定ファイル(F)』を読み取ります。
        /// 
        /// X→S、S→E、S→A。
        /// </summary>
        public void LoadFile(
            RecordUserformconfig record_Uf,
            Expression_Node_Filepath folderpath_Forms_Expr,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);
            log_Method.BeginMethod(Info_MiddleImpl.Name_Library, this, "LoadFile",log_Reports);
            //
            //

            // 手入力の Fcnf ファイルパス
            Configurationtree_NodeFilepath filepath_Control_Conf;
            record_Uf.TryGetFilepath_Configurationtree(out filepath_Control_Conf, NamesFld.S_FILE, false, this.Owner_MemoryApplication, log_Reports);
            string filepathHi_Uf = filepath_Control_Conf.GetHumaninput();

            string name_Control;
            record_Uf.TryGetString(out name_Control, NamesFld.S_NAME, true, "", this.Owner_MemoryApplication, log_Reports);

            // FILE フィールド(ファイルパス)が未指定なら、処理せず。
            if (log_Reports.Successful)
            {
                if ("" == filepathHi_Uf)
                {
                    goto gt_EndMethod;
                }
            }

            // (F) 絶対ファイルパス
            string filepathabs_Uf;
            {
                Utility_XmlToConfigurationtree_Usercontrolconfig to = new Utility_XmlToConfigurationtree_Usercontrolconfig();

                Expression_Node_FilepathImpl fpath_Expr = new Expression_Node_FilepathImpl(filepath_Control_Conf);

                filepathabs_Uf = to.GetSFilepath_UsercontrolconfigAbsolute(
                    fpath_Expr,//sl_record.Cf_File,
                    folderpath_Forms_Expr,
                    log_Reports
                    );
            }

            //
            // Fcnf ファイルパス
            Expression_Node_Filepath filepath_Uf_Expr;
            {
                Configurationtree_Node parent_Conf = new Configurationtree_NodeImpl(log_Method.Fullname + ".LoadFcnfFile record[" + filepath_Control_Conf.GetHumaninput() + "]", null);

                Configurationtree_NodeFilepath filepath_Conf = new Configurationtree_NodeFilepathImpl("ファイルパス出典未指定L09Mid_3", parent_Conf);
                filepath_Conf.InitPath(filepathHi_Uf, filepathabs_Uf, log_Reports);
                if (!log_Reports.Successful)
                {
                    // 既エラー。
                    goto gt_EndMethod;
                }

                filepath_Uf_Expr = new Expression_Node_FilepathImpl(filepath_Conf);
            }

            if ("" == filepathabs_Uf)
            {
                // コンポーネント設定ファイルへのパスが指定されていなければ、処理しません。
                goto gt_Error_Fpath;
            }

            Configurationtree_Node Usercontrolconfig_Conf = new Configurationtree_NodeImpl(NamesNode.S_CODEFILE_CONTROLS, filepath_Uf_Expr.Cur_Configuration);

            //
            // X → S
            if (log_Reports.Successful)
            {
                XmlToConfigurationtree_C11_Config to = new XmlToConfigurationtree_C11_ConfigImpl();
                to.XmlToConfigurationtree(
                    name_Control,
                    filepathHi_Uf,
                    filepathabs_Uf,
                    Usercontrolconfig_Conf,
                    folderpath_Forms_Expr,
                    owner_MemoryApplication,
                    log_Reports
                    );
            }

            //
            // (F) X → E
            this.XToEc_Usercontrolconfig(
                Usercontrolconfig_Conf,
                record_Uf,
                folderpath_Forms_Expr,
                log_Reports
                );

            goto gt_EndMethod;
            //
            //
            #region 異常系
            //────────────────────────────────────────
            gt_Error_Fpath:
            if (log_Reports.CanCreateReport)
            {
                Log_RecordReports r = log_Reports.BeginCreateReport(EnumReport.Error);
                r.SetTitle("△情報53!", log_Method);

                Log_TextIndented s = new Log_TextIndentedImpl();
                s.Append("コンポーネント設定ファイルへのパスが指定されていないので、");
                s.Newline();
                s.Newline();
                s.Append("処理しません。");
                s.Newline();
                s.Newline();

                // ヒント

                r.Message = s.ToString();
                log_Reports.EndCreateReport();
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
            gt_EndMethod:
            log_Method.EndMethod(log_Reports);
        }
Пример #11
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);
        }
Пример #12
0
        //────────────────────────────────────────
        /// <summary>
        /// 『コントロール設定ファイル(Fcnf)』を読み取ります。
        /// 
        /// X→S、S→E、X→A。
        /// </summary>
        public void XToEc_Usercontrolconfig(
            Configurationtree_Node cf_FcConfig,
            RecordUserformconfig fo_Record,
            Expression_Node_Filepath ec_Fopath_Forms,
            Log_Reports log_Reports
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0);
            log_Method.BeginMethod(Info_MiddleImpl.Name_Library, this, "XToEc_Usercontrolcnf",log_Reports);

            //
            //

            //
            // 手入力の (Fcnf) ファイルパス
            Configurationtree_NodeFilepath cf_Fpath_Control;
            fo_Record.TryGetFilepath_Configurationtree(out cf_Fpath_Control, NamesFld.S_FILE, false, this.Owner_MemoryApplication, log_Reports);
            string sFpath_f = cf_Fpath_Control.GetHumaninput();

            //
            // コントロール名。
            string sName_Control;
            fo_Record.TryGetString(out sName_Control, NamesFld.S_NAME, true, "", this.Owner_MemoryApplication, log_Reports);

            //
            // (Fcnf) 絶対ファイルパス
            string sFpatha_f;
            {
                Utility_XmlToConfigurationtree_Usercontrolconfig to = new Utility_XmlToConfigurationtree_Usercontrolconfig();

                Expression_Node_FilepathImpl e_Fpath = new Expression_Node_FilepathImpl(cf_Fpath_Control);

                sFpatha_f = to.GetSFilepath_UsercontrolconfigAbsolute(
                    e_Fpath,//sl_record.Cf_File,
                    ec_Fopath_Forms,
                    log_Reports
                    );
            }

            //
            // X → S (データソース、データターゲットの変換)
            // S → E
            //
            if (log_Reports.Successful)
            {
                Utility_XmlToConfigurationtree_Usercontrolconfig to1 = new Utility_XmlToConfigurationtree_Usercontrolconfig();

                List<string> sList_ControlName = to1.GetList_NameControl(
                    sName_Control,
                    sFpath_f,
                    sFpatha_f,
                    cf_FcConfig,
                    ec_Fopath_Forms,
                    this.Owner_MemoryApplication,
                    log_Reports
                    );

                Log_TextIndented_ConfigurationtreeToExpressionImpl pg_ParsingLog = new Log_TextIndented_ConfigurationtreeToExpressionImpl();
                pg_ParsingLog.BEnabled = false;
                ConfigurationtreeToExpression_F10_ControlList to2 = new ConfigurationtreeToExpression_F10_ControlListImpl();
                to2.Translate(
                    sList_ControlName,
                    cf_FcConfig,
                    this.Owner_MemoryApplication,
                    pg_ParsingLog,
                    log_Reports
                    );
                if (Log_ReportsImpl.BDebugmode_Static && pg_ParsingLog.BEnabled)
                {
                    log_Method.WriteInfo_ToConsole(" parsingLog=" + pg_ParsingLog.ToString());
                }
            }

            //
            // X → A (イベント_アクション_リストを構築します)
            //
            if (log_Reports.Successful)
            {
                //
                // (1)コントロールの名前を指定。
                //
                List<Usercontrol> list_Usercontrol;
                {
                    Expression_Node_StringImpl ec_Str = new Expression_Node_StringImpl(null, fo_Record.Parent_TableUserformconfig.Cur_Configurationtree);
                    ec_Str.AppendTextNode(
                        sName_Control,
                        fo_Record.Parent_TableUserformconfig.Cur_Configurationtree,
                        log_Reports
                        );

                    list_Usercontrol = this.Owner_MemoryApplication.MemoryForms.GetUsercontrolsByName(
                        ec_Str,
                        true,
                        log_Reports
                        );
                }

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

                    if (null != uct.ControlCommon.Configurationtree_Control)
                    {
                        //
                        // 「コントロール設定ファイル」のあったコントロールの
                        // 場合に限る。
                        //

                        List<Configurationtree_Node> cfList_Event = uct.ControlCommon.Configurationtree_Control.GetChildrenByNodename(NamesNode.S_EVENT, false, log_Reports);

                        foreach (Configurationtree_Node cf_Event in cfList_Event)
                        {
                            ConfigurationtreeToExpression_Event sToE_Event = new ConfigurationtreeToExpression_EventImpl();
                            sToE_Event.Configurationtree_Event = cf_Event;
                            Functionlist felist = uct.CreateFunctionlist(
                                sToE_Event,
                                this.Owner_MemoryApplication,
                                log_Reports
                                );
                            sToE_Event.Owner_Functionlist = felist;
                        }

                        //
                        // TODO:「dt」「txa」コントロールの場合、
                        // 値が変わったイベントの時に、「値確定」アクションが必ず起動するように
                        // 自動設定したい。
                        //

                    }
                }

            }

            log_Method.EndMethod(log_Reports);
        }
Пример #13
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);
        }
Пример #14
0
        //────────────────────────────────────────
        /// <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;
        }
Пример #15
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);
        }
Пример #16
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);
        }
Пример #17
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;


                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);
        }
Пример #18
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);
        }