Esempio n. 1
0
        //────────────────────────────────────────
        /// <summary>
        /// コンストラクター。
        /// </summary>
        public ControlCommonImpl()
        {
            Log_Method log_Method = new Log_MethodImpl();
            Log_Reports log_Reports_ThisMethod = new Log_ReportsImpl(log_Method);
            log_Method.BeginMethod(Info_Controls.Name_Library, this, "ControlCommonImpl", log_Reports_ThisMethod);

            // コントロールを作った時に、必ずnameプロパティを設定してください。
            // ただし、直接 Visual Studio のビジュアルエディターで配置した場合は設定できません。
            Configurationtree_Node cur_Cf = new Configurationtree_NodeImpl(log_Method.Fullname+"<init>", null);

            this.configurationtree_Control = new Configurationtree_NodeImpl(NamesNode.S_CONTROL1, cur_Cf);//ダミーのデフォルト・オブジェクト?
            this.expression_Name_Control = new Expression_Node_StringImpl(null, cur_Cf);

            log_Method.EndMethod(log_Reports_ThisMethod);
            log_Reports_ThisMethod.EndLogging(log_Method);
        }
Esempio n. 2
0
        //────────────────────────────────────────

        /// <summary>
        /// 警告が出ていれば、そのテキスト。
        /// </summary>
        /// <returns></returns>
        public string ToText(string sGroupTag)
        {
            Log_Method  log_Method             = new Log_MethodImpl(0);
            Log_Reports log_Reports_ThisMethod = new Log_ReportsImpl(log_Method);

            log_Method.BeginMethod(Info_Syntax.Name_Library, this, "ToText", log_Reports_ThisMethod);

            Log_TextIndented s = new Log_TextIndentedImpl();



            s.Append("ログ出力:");
            s.Newline();

            int nErrorCount = 0;


            List <Log_RecordReports> listCopy = new List <Log_RecordReports>(this.list_Record);

            foreach (Log_RecordReports log_RecordReport in listCopy)//todo:bug:ここで リストが変更されているときに例外を出してしまう。
            {
                // グループ・タグが指定されていれば、
                // グループ・タグが一致するメッセージだけを出力します。

                if (log_RecordReport.EnumReport == EnumReport.Error)
                {
                    if ("" == sGroupTag || sGroupTag == log_RecordReport.Tag_Group)
                    {
                        s.Append("(No.");
                        s.Append(nErrorCount);
                        s.Append(") ");

                        // タイトル
                        s.Append(log_RecordReport.ErrorSymbol);

                        if ("" != log_RecordReport.Tag_Group)
                        {
                            // グループ・タグ
                            s.Append(log_RecordReport.Tag_Group);
                        }

                        s.Newline();
                        s.Newline();

                        if ("" != log_RecordReport.Logstack)
                        {
                            s.Append("エラー発生元データの推測ヒント:");
                            s.Append(log_RecordReport.Logstack);
                            s.Newline();
                            s.Newline();
                        }

                        s.Append(log_RecordReport.GetMessage(this));
                        s.Newline();
                        s.Newline();

                        if ("" != log_RecordReport.Logstack)
                        {
                            s.Append("プログラム実行経路推測ヒント:");
                            s.Append(this.Log_Callstack.ToString());
                            s.Newline();
                            s.Newline();
                        }

                        s.Newline();
                        s.Newline();

                        // エラーが発生したメソッド。
                        s.Append(log_RecordReport.FullnameMethod);

                        s.Newline();
                    }

                    // カウンターは、読み飛ばしたエラーもきちんとカウント。
                    nErrorCount++;
                }
            }

            {
                s.Append(Log_RecordReportsImpl.ToText_Separator());
            }

            {
                if ("" != this.Comment_EventCreationMe)
                {
                    s.Append("ロガーの作成に関するコメント:");
                    s.Append(this.Comment_EventCreationMe);
                    s.Newline();
                }
            }

            {
                if (null != this.log_Method_CreationMe)
                {
                    s.Append("ロガー生成場所:");
                    s.Append(this.Log_Method_CreationMe.Fullname);
                    s.Newline();
                }
                else
                {
                    s.Append("ロガー生成場所:ヌル");
                    s.Newline();
                }
            }

            {
                s.Append("このエラーメッセージを作っているロガー:");
                s.Append(log_Method.Fullname);
                s.Newline();
            }

            if (!Log_ReportsImpl.BDebugmode_Static)
            {
                s.Newline();
                s.Newline();
                s.Append("このデバッグ情報は、DebugModeフラグが立っていない状態でのものです。");
                s.Newline();
                s.Append("DDebuggerImpl.DebugModeフラグを立てると、今より詳細な情報が出力されるかもしれません。");
                s.Newline();
            }


            log_Method.EndMethod(log_Reports_ThisMethod);
            log_Reports_ThisMethod.EndLogging(log_Method);
            return(s.ToString());
        }
Esempio n. 3
0
        //────────────────────────────────────────
        public override void Execute4_OnOEa(
            object sender, EventArgs e
            )
        {
            Log_Method pg_Method = new Log_MethodImpl(0);
            Log_Reports log_Reports_ThisMethod = new Log_ReportsImpl(pg_Method);
            pg_Method.BeginMethod(Info_Controls.Name_Library, this, "Execute4_OnOEa",log_Reports_ThisMethod);
            //
            //

            Customcontrol cct = null;

            string sName_Usercontrol;
            if (sender is Customcontrol)
            {
                cct = (Customcontrol)sender;

                sName_Usercontrol = cct.ControlCommon.Expression_Name_Control.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports_ThisMethod);

                log_Reports_ThisMethod.Comment_EventCreationMe = "[" + sName_Usercontrol + "]コントロールでOEaアクションが実行されました。";
            }
            else
            {
                sName_Usercontrol = "";
                log_Reports_ThisMethod.Comment_EventCreationMe = "OEaアクションが実行されました。";
            }

            if (log_Reports_ThisMethod.CanStopwatch)
            {
                string sEventName;
                this.Configurationtree_Event.Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sEventName, true, log_Reports_ThisMethod);

                pg_Method.Log_Stopwatch.Message = Utility_Format.Format(
                    sName_Usercontrol,
                    sEventName
                    );
                pg_Method.Log_Stopwatch.Begin();
            }

            //
            //
            //
            //
            //ystem.Console.WriteLine(Info_Forms.LibraryName + ":" + this.GetType().Name + "#Perform_OEa: 何回呼び出される?(A)");

            //EnumEventhandler err_Eh;
            //
            // 「登録アクション設定」を元に、「アクション」を作成し、実行順に実行。
            //
            Configurationtree_Event.List_Child.ForEach(delegate(Configurationtree_Node systemFunction_Conf, ref bool bBreak)
            {
                Expression_Node_Function expr_Func = cct.ControlCommon.Owner_MemoryApplication.MemoryForms.ConfigurationtreeToFunction.Translate(
                    systemFunction_Conf, true, log_Reports_ThisMethod);

                if (log_Reports_ThisMethod.Successful)
                {
                    expr_Func.Execute4_OnOEa(sender, e);
                }

                goto gt_EndMethod2;
            //
            gt_EndMethod2:
                ;
            });

            goto gt_EndMethod;
            //
            gt_EndMethod:
            pg_Method.EndMethod(log_Reports_ThisMethod);
            log_Reports_ThisMethod.EndLogging(pg_Method);
        }
        //────────────────────────────────────────
        /// <summary>
        /// テキストが変更されたというイベント・ハンドラー。
        /// 
        /// このイベント・ハンドラーは、このカスタム コントロールに必ず登録されます。
        /// </summary>
        /// <param nFcName="sender"></param>
        /// <param nFcName="e"></param>
        private void this_TextChanged(object sender, EventArgs e)
        {
            Log_Method pg_Method = new Log_MethodImpl(0);
            Log_Reports log_Reports_ThisMethod = new Log_ReportsImpl(pg_Method);
            pg_Method.BeginMethod(Info_Controls.Name_Library, this, "this_TextChanged",log_Reports_ThisMethod);
            //
            //

            string sName_Usercontrol = this.ControlCommon.Expression_Name_Control.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports_ThisMethod);

            log_Reports_ThisMethod.Comment_EventCreationMe = "[" + sName_Usercontrol + "]コントロール(数値上下ボックス)のテキストが変更されました。";

            CustomcontrolNumericUpDown ccNumericUpDown = (CustomcontrolNumericUpDown)sender;

            if (this.ControlCommon.BAutomaticinputting)
            {
                // コンピューターにより自動入力されたとき。
                //essageBox.Show("コンピュータによって自動入力されました。 コントロールID=[" + this.FormObjectId + "]", "デバッグ");
            }
            else
            {
                // 手入力による更新。

                MessageBox.Show(
                    "ユーザーによって直接入力されました。this.ControlCommon.Name=[" + sName_Usercontrol + "]",
                    "▲デバッグ(" + Info_Controls.Name_Library + ")" + this.GetType().Name + "#this_TextChanged:");

                this.UsercontrolToMemory(
                    log_Reports_ThisMethod
                    );
            }

            //
            //
            //
            //
            pg_Method.EndMethod(log_Reports_ThisMethod);
            log_Reports_ThisMethod.EndLogging(pg_Method);
        }
Esempio n. 5
0
        //────────────────────────────────────────
        /// <summary>
        /// [選択]ボタンを押したとき。
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void On_ChangingBtn_FoClick(object sender, EventArgs e)
        {
            //
            //
            //
            //()メソッド開始
            //
            //
            //
            Log_Method pg_Method = new Log_MethodImpl(0);
            Log_Reports d_Logging_Click = new Log_ReportsImpl(pg_Method);
            pg_Method.BeginMethod(Info_Toolwindow.Name_Library, this, "On_ChangingBtn_FoClick",d_Logging_Click);

            //
            //
            //
            //
            //
            //
            //

            // 選択プロジェクトXml要素。
            MemoryAatoolxml_Editor moAatoolxml_SelectedEditor;
            //プロジェクトへのファイルパス。
            string sFpatha_Project;
            {
                //選択したプロジェクトの名前。
                string sName_SelectedProject = (string)((UsercontrolListbox)this.UctlstNameProject).SelectedItem;

                if (this.Owner_MemoryApplication.MemoryForms.MemoryAatoolxmlDialog.MemoryAatoolxml.Dictionary_Editor.Dictionary_Item.ContainsKey(sName_SelectedProject))
                {
                    // 指定のプロジェクト要素が存在した場合
                    moAatoolxml_SelectedEditor = this.Owner_MemoryApplication.MemoryForms.MemoryAatoolxmlDialog.MemoryAatoolxml.Dictionary_Editor.Dictionary_Item[sName_SelectedProject];
                    sFpatha_Project = this.GetFilepathabsolute_Editor(
                        moAatoolxml_SelectedEditor,
                        d_Logging_Click
                        );
                }
                else
                {
                    // 指定のプロジェクト要素が存在しなかった場合

                    moAatoolxml_SelectedEditor = null;
                    sFpatha_Project = "";
                }
            }

            // エディター設定ファイルの読み込みの成功判定
            bool bLoaded_ProjectConfig;

            if ("" == sFpatha_Project)
            {
                // エディター設定ファイルへのパスが読み込めなかった場合
                bLoaded_ProjectConfig = false;
            }
            else
            {
                if (d_Logging_Click.Successful)
                {
                    // 正常時

                    System.Xml.XmlDocument doc = new System.Xml.XmlDocument();

                    try
                    {

                        doc.Load(sFpatha_Project);

                        // 読み込むだけで終わり。
                        bLoaded_ProjectConfig = true;
                    }
                    catch (System.IO.IOException ex)
                    {
                        // 読み込みに失敗した場合。
                        bLoaded_ProjectConfig = false;

                        //#エラー扱いとはしません。
                        StringBuilder sb = new StringBuilder();

                        sb.Append("プロジェクト ファイルとして指定されたファイルは、利用できませんでした。");
                        sb.Append(Environment.NewLine);
                        sb.Append(Environment.NewLine);

                        sb.Append("指定されたプロジェクト ファイル=[");
                        sb.Append(sFpatha_Project);
                        sb.Append("]");
                        sb.Append(Environment.NewLine);
                        sb.Append(Environment.NewLine);

                        sb.Append("エラーメッセージ=[");
                        sb.Append(ex.Message);
                        sb.Append("]");
                        sb.Append(Environment.NewLine);
                        sb.Append(Environment.NewLine);

                        this.pctxtInformation.Text = sb.ToString();
                    }
                }
                else
                {
                    bLoaded_ProjectConfig = false;
                }
            }

            //
            // プロジェクト ファイルの読み込みの有無に関わらず、
            // 外部の処理を挟み込めます。
            //
            this.onEditorSelected(
                sender,
                moAatoolxml_SelectedEditor,
                bLoaded_ProjectConfig,
                d_Logging_Click
                );

            goto gt_EndMethod;
            //
            //
            gt_EndMethod:
            pg_Method.EndMethod(d_Logging_Click);
            d_Logging_Click.EndLogging(pg_Method);
        }
Esempio n. 6
0
        /// <summary>
        /// クリアーします。
        /// </summary>
        public void Clear(MemoryApplication owner_MemoryApplication)
        {
            Log_Method log_Method = new Log_MethodImpl(1, Log_ReportsImpl.BDebugmode_Static);
            Log_Reports log_Reports_ThisMethod = new Log_ReportsImpl(log_Method);
            log_Method.BeginMethod(Info_MiddleImpl.Name_Library, this, "Clear",log_Reports_ThisMethod);
            //

            this.owner_MemoryApplication = owner_MemoryApplication;

            if (null == this.DictionaryExpression_Item)
            {
                this.dictionaryExpression_Item = new Dictionary<string, Expression_Node_String>();
            }
            else
            {
                if (log_Method.CanDebug(1))
                {
                    log_Method.WriteDebug_ToConsole("次の変数を消します。");
                    log_Method.WriteDebug_ToConsole("────────────────────");
                    foreach (KeyValuePair<string, Expression_Node_String> kvp in this.DictionaryExpression_Item)
                    {
                        log_Method.WriteDebug_ToConsole("  " + kvp.Key + "=" + kvp.Value.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports_ThisMethod));
                    }
                    log_Method.WriteDebug_ToConsole("────────────────────");
                }

                this.DictionaryExpression_Item.Clear();
            }

            this.parent_Variablesconfig_Configurationtree = null;

            goto gt_EndMethod;
            //
            gt_EndMethod:
            log_Method.EndMethod(log_Reports_ThisMethod);
            log_Reports_ThisMethod.EndLogging(log_Method);
        }
Esempio n. 7
0
        //────────────────────────────────────────
        /// <summary>
        /// デバッグ出力。
        /// </summary>
        public void WriteDebug_ToConsole()
        {
            Log_Method log_Method = new Log_MethodImpl(0);
            Log_Reports d_Logging_Dammy = new Log_ReportsImpl(log_Method);
            log_Method.BeginMethod(Info_MiddleImpl.Name_Library, this, "WriteDebug_ToConsole",d_Logging_Dammy);
            //
            //

            if (log_Method.CanInfo())
            {
                log_Method.WriteInfo_ToConsole("要素数=[" + this.dictionaryExpression_Item.Count + "]");

                // 項目(キーと値)の列挙
                foreach (KeyValuePair<string, Expression_Node_String> kvp in this.dictionaryExpression_Item)
                {
                    if (null == kvp.Value)
                    {
                        log_Method.WriteInfo_ToConsole(" [" + kvp.Key + "]=空っぽ");
                    }
                    else
                    {
                        if (kvp.Value is Expression_Node_Filepath)
                        {
                            // ファイルパス型。
                            // bug: 絶対パスでない場合、空白になるので、SHumanInput で取得することになるはず。
                            log_Method.WriteInfo_ToConsole(" [" + kvp.Key + "]=P型[" + kvp.Value.Execute4_OnExpressionString(EnumHitcount.Unconstraint, d_Logging_Dammy) + "] / SHumanInput=[" + ((Expression_Node_Filepath)kvp.Value).Humaninput + "]");
                        }
                        else
                        {
                            log_Method.WriteInfo_ToConsole(" [" + kvp.Key + "]=[" + kvp.Value.Execute4_OnExpressionString(EnumHitcount.Unconstraint, d_Logging_Dammy) + "]");
                        }
                    }

                }
            }

            //
            //
            log_Method.EndMethod(d_Logging_Dammy);
            d_Logging_Dammy.EndLogging(log_Method);
            if (!d_Logging_Dammy.Successful)
            {
                log_Method.WriteDebug_ToConsole(d_Logging_Dammy.ToText());
            }
        }
        //────────────────────────────────────────
        /// <summary>
        /// ドラッグ&ドロップ アクション実行。
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public override void Execute4_OnDnD(
            object prm_Sender,
            GiveFeedbackEventArgs prm_E
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);
            Log_Reports log_Reports_Master = new Log_ReportsImpl(log_Method);
            log_Method.BeginMethod(Info_Expr.Name_Library, this, "Execute4_OnDnD", log_Reports_Master);
            //

            // イベントハンドラー引数の設定
            this.Set_OnDnD(
                this,
                prm_Sender, prm_E);

            this.Execute5_Main(log_Reports_Master);

            //
            log_Method.EndMethod(log_Reports_Master);
            log_Reports_Master.EndLogging(log_Method);
        }
Esempio n. 9
0
        //────────────────────────────────────────
        public void XTo(
            out KeyconfigImpl out_Keycnf,
            Log_Reports log_Reports
            )
        {
            Log_Method pg_Method = new Log_MethodImpl(0);
            Log_Reports log_Reports_Load = new Log_ReportsImpl(pg_Method);
            pg_Method.BeginMethod(Info_Operating.Name_Library, this, "XToO",log_Reports_Load);
            //
            //

            out_Keycnf = new KeyconfigImpl();

            CsvTo_Table_HumaninputImpl csvTo = new CsvTo_Table_HumaninputImpl();
            Request_ReadsTable oRequest_TableReads = new Request_ReadsTableImpl();
            {
                Configurationtree_NodeImpl cf_ConfigStack = new Configurationtree_NodeImpl(Info_Operating.Name_Library + ":" + this.GetType().Name + "#<init>:",null);
                Configurationtree_NodeFilepath cf_Fpath = new Configurationtree_NodeFilepathImpl("ファイルパス出典未指定L03_1", cf_ConfigStack);

                cf_Fpath.InitPath(
                    "Editor-config/GAME_PAD/Key-config.csv",
                    log_Reports
                    );
                Expression_Node_Filepath ec_Fpath = new Expression_Node_FilepathImpl(cf_Fpath);
                oRequest_TableReads.Expression_Filepath = ec_Fpath;

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

            Format_Table_Humaninput o_TableFormat = new Format_Table_HumaninputImpl();
            out_Keycnf.O_Table_Keycnf = csvTo.Read(
                oRequest_TableReads,
                o_TableFormat,
                true,
                log_Reports
                );

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

            //
            // テーブルを上から1行ずつ読んでいきます。
            //
            foreach (DataRow dataRow in out_Keycnf.O_Table_Keycnf.DataTable.Rows)
            {
                //NO	ID	Expl	PLAYER	BEFORE	AFTER

                // プレイヤー番号
                int nPlayer;
                {
                    Int_HumaninputImpl o_Player = (Int_HumaninputImpl)dataRow["PLAYER"];
                    if (Int_HumaninputImpl.TryParse(
                        o_Player,
                        out nPlayer,
                        EnumOperationIfErrorvalue.Error,
                        0,
                        log_Reports
                        ))
                    {
                    }

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

                // BEFORE
                EnumGamepadkeyIx enumGmkeyArray;
                {
                    string sBefore;
                    string sDebug1 = "";
                    string sDebug2 = "";
                    String_HumaninputImpl o_Before = (String_HumaninputImpl)dataRow["BEFORE"];

                    if (String_HumaninputImpl.TryParse(
                        o_Before,
                        out sBefore,
                        sDebug1,
                        sDebug2,
                        pg_Method,
                        log_Reports
                        ))
                    {
                    }

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

                    switch (sBefore)
                    {
                        case "Up":
                            enumGmkeyArray = EnumGamepadkeyIx.Up;
                            break;
                        case "Right":
                            enumGmkeyArray = EnumGamepadkeyIx.Right;
                            break;
                        case "Down":
                            enumGmkeyArray = EnumGamepadkeyIx.Down;
                            break;
                        case "Left":
                            enumGmkeyArray = EnumGamepadkeyIx.Left;
                            break;
                        case "0":
                            enumGmkeyArray = EnumGamepadkeyIx.B0;
                            break;
                        case "1":
                            enumGmkeyArray = EnumGamepadkeyIx.B1;
                            break;
                        case "2":
                            enumGmkeyArray = EnumGamepadkeyIx.B2;
                            break;
                        case "3":
                            enumGmkeyArray = EnumGamepadkeyIx.B3;
                            break;
                        case "4":
                            enumGmkeyArray = EnumGamepadkeyIx.B4;
                            break;
                        case "5":
                            enumGmkeyArray = EnumGamepadkeyIx.B5;
                            break;
                        case "6":
                            enumGmkeyArray = EnumGamepadkeyIx.B6;
                            break;
                        case "7":
                            enumGmkeyArray = EnumGamepadkeyIx.B7;
                            break;
                        default:
                            // エラー
                            enumGmkeyArray = EnumGamepadkeyIx.B0;
                            break;
                    }
                }

                // AFTER
                EnumGamepadkeyBit gmkeyPushEnum;
                {
                    string sAfter;
                    string sDebug1 = "";
                    string sDebug2 = "";
                    String_HumaninputImpl o_Before = (String_HumaninputImpl)dataRow["AFTER"];

                    if (String_HumaninputImpl.TryParse(
                        o_Before,
                        out sAfter,
                        sDebug1,
                        sDebug2,
                        pg_Method,
                        log_Reports
                        ))
                    {
                    }

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

                    switch (sAfter)
                    {
                        case "Up":
                            gmkeyPushEnum = EnumGamepadkeyBit.Up;
                            break;
                        case "Right":
                            gmkeyPushEnum = EnumGamepadkeyBit.Right;
                            break;
                        case "Down":
                            gmkeyPushEnum = EnumGamepadkeyBit.Down;
                            break;
                        case "Left":
                            gmkeyPushEnum = EnumGamepadkeyBit.Left;
                            break;
                        case "A":
                            gmkeyPushEnum = EnumGamepadkeyBit.A;
                            break;
                        case "B":
                            gmkeyPushEnum = EnumGamepadkeyBit.B;
                            break;
                        case "X":
                            gmkeyPushEnum = EnumGamepadkeyBit.X;
                            break;
                        case "Y":
                            gmkeyPushEnum = EnumGamepadkeyBit.Y;
                            break;
                        case "L":
                            gmkeyPushEnum = EnumGamepadkeyBit.L;
                            break;
                        case "R":
                            gmkeyPushEnum = EnumGamepadkeyBit.R;
                            break;
                        case "Select":
                            gmkeyPushEnum = EnumGamepadkeyBit.Select;
                            break;
                        case "Start":
                            gmkeyPushEnum = EnumGamepadkeyBit.Start;
                            break;
                        default:
                            // エラー
                            gmkeyPushEnum = EnumGamepadkeyBit.A;
                            break;
                    }
                }

                //
                // 記憶
                //
                KeyconfigPadImpl keycnfPad;
                if (out_Keycnf.Dic_KeyCnf.ContainsKey(nPlayer))
                {
                    keycnfPad = out_Keycnf.Dic_KeyCnf[nPlayer];
                }
                else
                {
                    keycnfPad = new KeyconfigPadImpl();
                }

                keycnfPad.KeyconfigArray[(int)enumGmkeyArray] = gmkeyPushEnum;

                out_Keycnf.Dic_KeyCnf[nPlayer] = keycnfPad;
            }

            goto gt_EndMethod;
            //
            //
            gt_EndMethod:
            pg_Method.EndMethod(log_Reports_Load);
            log_Reports_Load.EndLogging(pg_Method);
            return;
        }
Esempio n. 10
0
        //────────────────────────────────────────
        /// <summary>
        /// コンストラクター。
        /// </summary>
        /// <param name="sName_Pm"></param>
        /// <param name="log_Reports"></param>
        public PmNameImpl_(string sName_Pm)
        {
            Log_Method pg_Method = new Log_MethodImpl(0);
            Log_Reports log_Reports_ThisMethod = new Log_ReportsImpl(pg_Method);
            pg_Method.BeginMethod(Info_Middle.Name_Library, this, "PmNameImpl_",log_Reports_ThisMethod);

            if (sName_Pm.StartsWith(PmNames.S_PM) && sName_Pm.EndsWith(PmNames.S_SEMICOLON))
            {
                // "Pm:"で始まり、";"で終わる。

                this.name_Pm = sName_Pm;
                this.name_Attribute = sName_Pm.Substring(3, sName_Pm.Length - 4);

                if(""==this.name_Attribute)
                {
                    // エラー。
                    goto gt_Error_Format;
                }
            }
            else
            {
                // エラー。
                goto gt_Error_Format;
            }

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

                Log_TextIndented s = new Log_TextIndentedImpl();
                s.Append("pm引数フォーマットエラー 入力=[");
                s.Append(sName_Pm);
                s.Append("] Attr部=[");
                s.Append(this.Name_Attribute);
                s.Append("] pm部=[");
                s.Append(this.Name_Pm);
                s.Append("]");
                s.Newline();
                s.Append("["+PmNames.S_PM+"]で始まり、「;」で終わらなければなりません。また、名前は空文字列であってはいけません。");
                s.Newline();
                s.Newline();

                r.Message = s.ToString();
                log_Reports_ThisMethod.EndCreateReport();
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
            gt_EndMethod:
            pg_Method.EndMethod(log_Reports_ThisMethod);
            log_Reports_ThisMethod.EndLogging(pg_Method);
        }
Esempio n. 11
0
        //────────────────────────────────────────
        /// <summary>
        /// クリアー
        /// </summary>
        public void Clear(MemoryApplication owner_MemoryApplication)
        {
            Log_Method log_Method = new Log_MethodImpl(1, Log_ReportsImpl.BDebugmode_Static);
            Log_Reports log_Reports_ThisMethod = new Log_ReportsImpl(log_Method);
            log_Method.BeginMethod(Info_MiddleImpl.Name_Library, this, "Clear", log_Reports_ThisMethod);
            //

            this.owner_MemoryApplication = owner_MemoryApplication;

            this.cur_Configurationtree = new Configurationtree_NodeImpl("<clear>", null);
            if (null == this.memoryAaeditorxml_Editor)
            {
                this.memoryAaeditorxml_Editor = new MemoryAaeditorxml_EditorImpl(null);
            }
            else
            {
                if (log_Method.CanDebug(1))
                {
                    log_Method.WriteDebug_ToConsole("「エディター設定ファイル・モデル」をクリアーします。");
                }

                this.memoryAaeditorxml_Editor.Clear();
            }

            goto gt_EndMethod;
            //
            gt_EndMethod:
            log_Method.EndMethod(log_Reports_ThisMethod);
            log_Reports_ThisMethod.EndLogging(log_Method);
        }
Esempio n. 12
0
        //────────────────────────────────────────
        static Collection_Function()
        {
            Log_Method log_Method = new Log_MethodImpl(1);
            Log_Reports log_Reports_ThisMethod = new Log_ReportsImpl(log_Method);
            log_Method.BeginMethod(Info_Functions.Name_Library, "Collection_Function", "static Collection_Function",log_Reports_ThisMethod);
            //

            dictionary_Interlibrary = new Dictionary<string, Expression_Node_Function>();

            ConfigurationtreeToFunction_Item transUnknown = new ConfigurationtreeToFunction00_ItemImpl();//暫定
            ConfigurationtreeToFunction_Item trans00 = new ConfigurationtreeToFunction00_ItemImpl();
            ConfigurationtreeToFunction_Item trans20 = new ConfigurationtreeToFunction20_ItemImpl();

            //関数名未設定のインスタンスを、ディクショナリーに追加します。#NewInstance 実行時に関数名を付けます。
            {
                List<string> list_Param = new List<string>();
                list_Param.Add(Expression_Node_Function04Impl.PM_NAME_TABLE);
                list_Param.Add(Expression_Node_Function04Impl.PM_POPUP);
                list_Param.Add(Expression_Node_Function04Impl.PM_FLOWSKIP);
                Collection_Function.SetFunction(Expression_Node_Function04Impl.NAME_FUNCTION, new Expression_Node_Function04Impl(EnumEventhandler.O_Ea, list_Param,trans00), log_Reports_ThisMethod);
            }
            {
                List<string> list_Param = new List<string>();
                list_Param.Add(Expression_Node_Function05Impl.PM_NAME_TABLE_SOURCE);
                list_Param.Add(Expression_Node_Function05Impl.PM_NAME_TABLE_DESTINATION);
                Collection_Function.SetFunction(Expression_Node_Function05Impl.NAME_FUNCTION, new Expression_Node_Function05Impl(EnumEventhandler.O_Ea, list_Param, trans00), log_Reports_ThisMethod);
            }
            {
                List<string> list_Param = new List<string>();
                list_Param.Add(Expression_Node_Function06Impl.PM_NAME_TABLE_SOURCE);
                list_Param.Add(Expression_Node_Function06Impl.PM_FILEPATH_EXTERNALAPPLICATION);
                Collection_Function.SetFunction(Expression_Node_Function06Impl.NAME_FUNCTION, new Expression_Node_Function06Impl(EnumEventhandler.O_Ea, list_Param, trans00), log_Reports_ThisMethod);
            }
            {
                List<string> list_Param = new List<string>();
                // arg 不明
                Collection_Function.SetFunction(Expression_Node_Function11Impl.NAME_FUNCTION, new Expression_Node_Function11Impl(EnumEventhandler.O_Lr, list_Param, transUnknown), log_Reports_ThisMethod);
            }
            {
                //dic_E_Sf.Add(E_Sf17Impl_OLD.NAME_FUNCTION, new E_Sf17Impl_OLD(null, cf_Node));//todo:
            }
            {
                List<string> list_Param = new List<string>();
                // arg 不明
                Collection_Function.SetFunction(Expression_Node_Function19Impl.NAME_FUNCTION, new Expression_Node_Function19Impl(EnumEventhandler.O_Lr, list_Param, transUnknown), log_Reports_ThisMethod);
            }
            {
                List<string> list_Param = new List<string>();
                list_Param.Add(Expression_Node_Function20Impl.PM_NAME_TABLE);
                list_Param.Add(Expression_Node_Function20Impl.PM_NAME_CONTROL_LISTBOX);
                Collection_Function.SetFunction(Expression_Node_Function20Impl.NAME_FUNCTION, new Expression_Node_Function20Impl(EnumEventhandler.O_Lr, list_Param, trans20), log_Reports_ThisMethod);
            }
            {
                List<string> list_Param = new List<string>();
                // arg 不明
                Collection_Function.SetFunction(Expression_Node_Function21Impl.NAME_FUNCTION, new Expression_Node_Function21Impl(EnumEventhandler.O_Kea, list_Param, transUnknown), log_Reports_ThisMethod);
            }
            {
                List<string> list_Param = new List<string>();
                // arg 不明
                Collection_Function.SetFunction(Expression_Node_Function22Impl.NAME_FUNCTION, new Expression_Node_Function22Impl(EnumEventhandler.O_Lr, list_Param, transUnknown), log_Reports_ThisMethod);
            }
            {
                List<string> list_Param = new List<string>();
                list_Param.Add(Expression_Node_Function25Impl.PM_NAME_FIELD);
                list_Param.Add(Expression_Node_Function25Impl.PM_NAME_VAR_DESTINATION);
                Collection_Function.SetFunction(Expression_Node_Function25Impl.NAME_FUNCTION, new Expression_Node_Function25Impl(EnumEventhandler.O_Ea, list_Param, trans00), log_Reports_ThisMethod);
            }
            {
                List<string> list_Param = new List<string>();
                list_Param.Add(Expression_Node_Function27Impl.PM_NAME_TOGETHER);
                Collection_Function.SetFunction(Expression_Node_Function27Impl.NAME_FUNCTION, new Expression_Node_Function27Impl(EnumEventhandler.O_Lr, list_Param, trans00), log_Reports_ThisMethod);
            }
            {
                List<string> list_Param = new List<string>();
                list_Param.Add(Expression_Node_Function28Impl.PM_MESSAGE);
                Collection_Function.SetFunction(Expression_Node_Function28Impl.NAME_FUNCTION, new Expression_Node_Function28Impl(EnumEventhandler.O_Lr, list_Param, trans00), log_Reports_ThisMethod);
            }
            {
                List<string> list_Param = new List<string>();
                list_Param.Add(Expression_Node_Function29Impl.PM_NAME_CONTROL);
                Collection_Function.SetFunction(Expression_Node_Function29Impl.NAME_FUNCTION, new Expression_Node_Function29Impl(EnumEventhandler.O_Lr, list_Param, trans00), log_Reports_ThisMethod);
            }
            {
                List<string> list_Param = new List<string>();
                list_Param.Add(Expression_Node_Function30Impl.PM_NAME_TOGETHER);
                list_Param.Add(Expression_Node_Function30Impl.PM_NAME_FORM);
                Collection_Function.SetFunction(Expression_Node_Function30Impl.NAME_FUNCTION, new Expression_Node_Function30Impl(EnumEventhandler.O_Lr, list_Param, trans00), log_Reports_ThisMethod);
            }
            {
                List<string> list_Param = new List<string>();
                list_Param.Add(Expression_Node_Function31Impl.PM_NAME_CONTROL);
                Collection_Function.SetFunction(Expression_Node_Function31Impl.NAME_FUNCTION, new Expression_Node_Function31Impl(EnumEventhandler.O_Lr, list_Param, trans00), log_Reports_ThisMethod);
            }
            {
                List<string> list_Param = new List<string>();
                list_Param.Add(Expression_Node_Function32Impl.PM_NAME_TABLE);
                list_Param.Add(Expression_Node_Function32Impl.PM_NAME_FIELD);
                list_Param.Add(Expression_Node_Function32Impl.PM_NAME_CONTROL_DESTINATION);
                Collection_Function.SetFunction(Expression_Node_Function32Impl.NAME_FUNCTION, new Expression_Node_Function32Impl(EnumEventhandler.O_Ea, list_Param, trans00), log_Reports_ThisMethod);
            }
            {
                List<string> list_Param = new List<string>();
                list_Param.Add(Expression_Node_Function33Impl.PM_NAME_CONTROL);
                list_Param.Add(Expression_Node_Function33Impl.PM_NAME_FIELD_KEY);
                list_Param.Add(Expression_Node_Function33Impl.PM_VALUE_EXPECTED);
                list_Param.Add(Expression_Node_Function33Impl.PM_VALUE_EXPECTED2);
                list_Param.Add(Expression_Node_Function33Impl.PM_VALUE_EMPTY);
                Collection_Function.SetFunction(Expression_Node_Function33Impl.NAME_FUNCTION, new Expression_Node_Function33Impl(EnumEventhandler.O_Lr, list_Param, trans00), log_Reports_ThisMethod);
            }
            {
                List<string> list_Param = new List<string>();
                list_Param.Add(Expression_Node_Function34Impl.PM_NAME_VAR);
                list_Param.Add(Expression_Node_Function34Impl.PM_VALUE);
                list_Param.Add(Expression_Node_Function34Impl.PM_FLOWSKIP);
                Collection_Function.SetFunction(Expression_Node_Function34Impl.NAME_FUNCTION, new Expression_Node_Function34Impl(EnumEventhandler.O_Lr, list_Param, trans00), log_Reports_ThisMethod);
            }
            {
                List<string> list_Param = new List<string>();
                // arg 無し
                Collection_Function.SetFunction(Expression_Node_Function35Impl.NAME_FUNCTION, new Expression_Node_Function35Impl(EnumEventhandler.O_Lr, list_Param, trans00), log_Reports_ThisMethod);
            }
            {
                List<string> list_Param = new List<string>();
                list_Param.Add(Expression_Node_Function36Impl.PM_CONTROL_NAME);
                Collection_Function.SetFunction(Expression_Node_Function36Impl.NAME_FUNCTION, new Expression_Node_Function36Impl(EnumEventhandler.O_Lr, list_Param, trans00), log_Reports_ThisMethod);
            }
            {
                List<string> list_Param = new List<string>();
                list_Param.Add(Expression_Node_Function37Impl.PM_FROM);
                list_Param.Add(Expression_Node_Function37Impl.PM_TO);
                Collection_Function.SetFunction(Expression_Node_Function37Impl.NAME_FUNCTION, new Expression_Node_Function37Impl(EnumEventhandler.O_Lr, list_Param, trans00), log_Reports_ThisMethod);
            }
            {
                List<string> list_Param = new List<string>();
                list_Param.Add(Expression_Node_Function38Impl.PM_FROM);
                list_Param.Add(Expression_Node_Function38Impl.PM_TO);
                Collection_Function.SetFunction(Expression_Node_Function38Impl.NAME_FUNCTION, new Expression_Node_Function38Impl(EnumEventhandler.O_Lr, list_Param, trans00), log_Reports_ThisMethod);
            }
            {
                List<string> list_Param = new List<string>();
                list_Param.Add(Expression_Node_Function39Impl.PM_NAME_CONTROL);
                list_Param.Add(Expression_Node_Function39Impl.PM_VALUE_ENABLED);
                Collection_Function.SetFunction(Expression_Node_Function39Impl.NAME_FUNCTION, new Expression_Node_Function39Impl(EnumEventhandler.O_Lr, list_Param, trans00), log_Reports_ThisMethod);
            }
            {
                List<string> list_Param = new List<string>();
                list_Param.Add(Expression_Node_Function40Impl.PM_NAME_CONTROL);
                list_Param.Add(Expression_Node_Function40Impl.PM_VALUE_VISIBLED);
                Collection_Function.SetFunction(Expression_Node_Function40Impl.NAME_FUNCTION, new Expression_Node_Function40Impl(EnumEventhandler.O_Lr, list_Param, trans00), log_Reports_ThisMethod);
            }
            {
                List<string> list_Param = new List<string>();
                list_Param.Add(Expression_Node_Function42Impl.PM_EXECUTE);
                list_Param.Add(Expression_Node_Function42Impl.PM_FLOWSKIP);
                Collection_Function.SetFunction(Expression_Node_Function42Impl.NAME_FUNCTION, new Expression_Node_Function42Impl(EnumEventhandler.O_Ea, list_Param, trans00), log_Reports_ThisMethod);
            }
            {
                List<string> list_Param = new List<string>();
                list_Param.Add(Expression_Node_Function43Impl.PM_NAME_VAR);
                list_Param.Add(Expression_Node_Function43Impl.PM_NAME_CONTROL);
                Collection_Function.SetFunction(Expression_Node_Function43Impl.NAME_FUNCTION, new Expression_Node_Function43Impl(EnumEventhandler.O_Lr, list_Param, trans00), log_Reports_ThisMethod);
            }
            {
                List<string> list_Param = new List<string>();
                // arg 不明
                Collection_Function.SetFunction(Expression_Node_Function44Impl.NAME_FUNCTION, new Expression_Node_Function44Impl(EnumEventhandler.O_Lr, list_Param, transUnknown), log_Reports_ThisMethod);
            }
            {
                List<string> list_Param = new List<string>();
                // arg 不明
                Collection_Function.SetFunction(Expression_Node_Function45Impl.NAME_FUNCTION, new Expression_Node_Function45Impl(EnumEventhandler.O_Ea, list_Param, transUnknown), log_Reports_ThisMethod);
            }
            {
                List<string> list_Param = new List<string>();
                // arg 不明
                Collection_Function.SetFunction(Expression_Node_Function46Impl.NAME_FUNCTION, new Expression_Node_Function46Impl(EnumEventhandler.O_Ea, list_Param, transUnknown), log_Reports_ThisMethod);
            }
            {
                List<string> list_Param = new List<string>();
                // arg 不明
                Collection_Function.SetFunction(Expression_Node_Function_BootCsvEditorImpl.NAME_FUNCTION, new Expression_Node_Function_BootCsvEditorImpl(EnumEventhandler.O_Ea, list_Param, transUnknown), log_Reports_ThisMethod);
            }
            {
                List<string> list_Param = new List<string>();
                // arg 不明
                Collection_Function.SetFunction(Expression_Node_Function_OnEditorSelected_Impl.NAME_FUNCTION, new Expression_Node_Function_OnEditorSelected_Impl(EnumEventhandler.Editor_B_Lr, list_Param, transUnknown), log_Reports_ThisMethod);
            }
            {
                List<string> list_Param = new List<string>();
                list_Param.Add(Expression_Node_Function47Impl.PM_FOLDER_SOURCE);
                list_Param.Add(Expression_Node_Function47Impl.PM_FILE_EXPORT);
                list_Param.Add(Expression_Node_Function47Impl.PM_FIELD_EXPORT);
                list_Param.Add(Expression_Node_Function47Impl.PM_FILTER);
                list_Param.Add(Expression_Node_Function47Impl.PM_IS_SEARCH_SUBFOLDER);
                list_Param.Add(Expression_Node_Function47Impl.PM_POPUP);
                Collection_Function.SetFunction(Expression_Node_Function47Impl.NAME_FUNCTION, new Expression_Node_Function47Impl(EnumEventhandler.O_Lr, list_Param, trans00), log_Reports_ThisMethod);
            }
            {
                List<string> list_Param = new List<string>();
                list_Param.Add(Expression_Node_Function48Impl.PM_FILE_IMPORT_LISTFILE);
                list_Param.Add(Expression_Node_Function48Impl.PM_FIELDSOURCE_IMPORTLISTFILE);
                list_Param.Add(Expression_Node_Function48Impl.PM_FIELDDESTINATION_IMPORTLISTFILE);
                list_Param.Add(Expression_Node_Function48Impl.PM_ENCODING_FILEIMPORT);
                list_Param.Add(Expression_Node_Function48Impl.PM_ENCODING_FILEEXPORT);
                Collection_Function.SetFunction(Expression_Node_Function48Impl.NAME_FUNCTION, new Expression_Node_Function48Impl(EnumEventhandler.O_Lr, list_Param, trans00), log_Reports_ThisMethod);
            }
            {
                List<string> list_Param = new List<string>();
                list_Param.Add(Expression_Node_Function49Impl.PM_FILE_IMPORT_LISTFILE);
                list_Param.Add(Expression_Node_Function49Impl.PM_FIELD_IMPORT_LISTFILE);
                list_Param.Add(Expression_Node_Function49Impl.PM_FILTER_EXTENSION_IMPORT);

                list_Param.Add(Expression_Node_Function49Impl.PM_FILE_EXPORT_LISTFILE);
                list_Param.Add(Expression_Node_Function49Impl.PM_FIELD_EXPORT_LISTFILE);
                list_Param.Add(Expression_Node_Function49Impl.PM_TYPEFIELD_EXPORT_LISTFILE);
                list_Param.Add(Expression_Node_Function49Impl.PM_COMMENTFIELD_EXPORT_LISTFILE);

                list_Param.Add(Expression_Node_Function49Impl.PM_REGULAREXPRESSION_REPLACEBEFORE_NAMEFILEEXPORT);
                list_Param.Add(Expression_Node_Function49Impl.PM_REGULAREXPRESSION_REPLACEAFTER_NAMEFILEEXPORT);
                list_Param.Add(Expression_Node_Function49Impl.PM_FOLDER_SOURCE);
                list_Param.Add(Expression_Node_Function49Impl.PM_FOLDER_DESTINATION);
                list_Param.Add(Expression_Node_Function49Impl.PM_POPUP);
                Collection_Function.SetFunction(Expression_Node_Function49Impl.NAME_FUNCTION, new Expression_Node_Function49Impl(EnumEventhandler.O_Lr, list_Param, trans00), log_Reports_ThisMethod);
            }

            //
            log_Method.EndMethod(log_Reports_ThisMethod);
            log_Reports_ThisMethod.EndLogging(log_Method);
        }
Esempio n. 13
0
        //────────────────────────────────────────
        /// <summary>
        /// 警告が出ていれば、そのテキスト。
        /// </summary>
        /// <returns></returns>
        public string ToText(string sGroupTag)
        {
            Log_Method log_Method = new Log_MethodImpl(0);
            Log_Reports log_Reports_ThisMethod = new Log_ReportsImpl(log_Method);
            log_Method.BeginMethod(Info_Syntax.Name_Library, this, "ToText", log_Reports_ThisMethod);

            Log_TextIndented s = new Log_TextIndentedImpl();

            s.Append("ログ出力:");
            s.Newline();

            int nErrorCount = 0;

            List<Log_RecordReports> listCopy = new List<Log_RecordReports>(this.list_Record);
            foreach (Log_RecordReports log_RecordReport in listCopy)//todo:bug:ここで リストが変更されているときに例外を出してしまう。
            {
                // グループ・タグが指定されていれば、
                // グループ・タグが一致するメッセージだけを出力します。

                if (log_RecordReport.EnumReport == EnumReport.Error)
                {
                    if ("" == sGroupTag || sGroupTag == log_RecordReport.Tag_Group)
                    {
                        s.Append("(No.");
                        s.Append(nErrorCount);
                        s.Append(") ");

                        // タイトル
                        s.Append(log_RecordReport.ErrorSymbol);

                        if ("" != log_RecordReport.Tag_Group)
                        {
                            // グループ・タグ
                            s.Append(log_RecordReport.Tag_Group);
                        }

                        s.Newline();
                        s.Newline();

                        if ("" != log_RecordReport.Logstack)
                        {
                            s.Append("エラー発生元データの推測ヒント:");
                            s.Append(log_RecordReport.Logstack);
                            s.Newline();
                            s.Newline();
                        }

                        s.Append(log_RecordReport.GetMessage(this));
                        s.Newline();
                        s.Newline();

                        if ("" != log_RecordReport.Logstack)
                        {
                            s.Append("プログラム実行経路推測ヒント:");
                            s.Append(this.Log_Callstack.ToString());
                            s.Newline();
                            s.Newline();
                        }

                        s.Newline();
                        s.Newline();

                        // エラーが発生したメソッド。
                        s.Append(log_RecordReport.FullnameMethod);

                        s.Newline();
                    }

                    // カウンターは、読み飛ばしたエラーもきちんとカウント。
                    nErrorCount++;
                }
            }

            {
                s.Append(Log_RecordReportsImpl.ToText_Separator());
            }

            {
                if ("" != this.Comment_EventCreationMe)
                {
                    s.Append("ロガーの作成に関するコメント:");
                    s.Append(this.Comment_EventCreationMe);
                    s.Newline();
                }
            }

            {
                if (null != this.log_Method_CreationMe)
                {
                    s.Append("ロガー生成場所:");
                    s.Append(this.Log_Method_CreationMe.Fullname);
                    s.Newline();
                }
                else
                {
                    s.Append("ロガー生成場所:ヌル");
                    s.Newline();
                }
            }

            {
                s.Append("このエラーメッセージを作っているロガー:");
                s.Append(log_Method.Fullname);
                s.Newline();
            }

            if (!Log_ReportsImpl.BDebugmode_Static)
            {
                s.Newline();
                s.Newline();
                s.Append("このデバッグ情報は、DebugModeフラグが立っていない状態でのものです。");
                s.Newline();
                s.Append("DDebuggerImpl.DebugModeフラグを立てると、今より詳細な情報が出力されるかもしれません。");
                s.Newline();
            }

            log_Method.EndMethod(log_Reports_ThisMethod);
            log_Reports_ThisMethod.EndLogging(log_Method);
            return s.ToString();
        }
Esempio n. 14
0
        //────────────────────────────────────────
        /// <summary>
        /// チェックが変更されたというイベント・ハンドラー。
        /// 
        /// このイベント・ハンドラーは、HCheckBoxに必ず登録されます。
        /// </summary>
        /// <param nFcName="sender"></param>
        /// <param nFcName="e"></param>
        private void this_CheckChanged(object sender, EventArgs e)
        {
            Log_Method pg_Method = new Log_MethodImpl(0);
            Log_Reports log_Reports_ThisMethod = new Log_ReportsImpl(pg_Method);
            pg_Method.BeginMethod(Info_Controls.Name_Library, this, "this_CheckChanged",log_Reports_ThisMethod);
            //
            //

            //bug:Expression_Name_Controlがnull→コンストラクタでダミーを入れた
            string sName_Usercontrol = this.ControlCommon.Expression_Name_Control.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports_ThisMethod);

            log_Reports_ThisMethod.Comment_EventCreationMe = "[" + sName_Usercontrol + "]コントロール(チェックボックス)のチェックが変更されました。";

            CustomcontrolCheckbox ccCheckBox = (CustomcontrolCheckbox)sender;

            if (this.ControlCommon.BAutomaticinputting)
            {
                // コンピューターにより自動入力されたとき。
                //essageBox.Show("コンピュータによって自動入力されました。 コントロールID=[" + this.FormObjectId + "]", "▲デバッグ");
            }
            else
            {
                // 手入力による更新。
                //essageBox.Show(
                //"ユーザーによって直接入力されました。hNumericUpDown=[" + hNumericUpDown + "] コントロールID=["+this.FormObjectId+"]",
                //"▲デバッグ(" + Info_Forms .LibraryName+ ")"+this.GetType().NFcName+"#this_CheckChanged:");

                this.UsercontrolToMemory(
                    log_Reports_ThisMethod
                    );
            }

            //
            //
            pg_Method.EndMethod(log_Reports_ThisMethod);
            log_Reports_ThisMethod.EndLogging(pg_Method);
        }
Esempio n. 15
0
        //────────────────────────────────────────
        /// <summary>
        /// ドラッグ&ドロップ用アクション実行。
        /// </summary>
        /// <param nFcName="sender"></param>
        /// <param nFcName="e"></param>
        public override void Execute4_OnQueryContinueDragEventArgs(
            object sender,
            QueryContinueDragEventArgs e
            )
        {
            this.Execute4_OnQueryContinueDragEventArgs(
                sender,
                e
            );

            Log_Method pg_Method = new Log_MethodImpl(0);
            Log_Reports log_Reports_ThisMethod = new Log_ReportsImpl(pg_Method);
            pg_Method.BeginMethod(Info_Controls.Name_Library, this, "Execute4_OnQueryContinueDragEventArgs", log_Reports_ThisMethod);
            //
            //
            Customcontrol cct = null;

            //
            // コントロール名。
            //
            string sName_Usercontrol;
            if (sender is Customcontrol)
            {
                cct = (Customcontrol)sender;

                sName_Usercontrol = cct.ControlCommon.Expression_Name_Control.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports_ThisMethod);

                log_Reports_ThisMethod.Comment_EventCreationMe = "[" + sName_Usercontrol + "]コントロールでQueryContinueDragEventArgsアクションが実行されました。";

                // ステータスバーに、コントロール名を表示。
                //cct.ControlCommon.MoControlMediator.AddStatus_ActionFcName(sName_Usercontrol, d_Logging_Dammy);
            }
            else
            {
                sName_Usercontrol = "";
                log_Reports_ThisMethod.Comment_EventCreationMe = "QueryContinueDragEventArgsアクションが実行されました。";
            }

            //
            // ストップウォッチ。
            //
            if (log_Reports_ThisMethod.CanStopwatch)
            {
                pg_Method.Log_Stopwatch.Message = Utility_Format.Format(
                    sName_Usercontrol,
                    this.ConfigurationtreeToExpression_Event.Name
                    );
                pg_Method.Log_Stopwatch.Begin();
            }

            //
            // 「登録アクション設定」を元に、「アクション」を作成し、実行順に実行。
            //
            if (!this.ConfigurationtreeToExpression_Event.IsTranslated_ConfigurationtreeToExpression)
            {
                this.ConfigurationtreeToExpression_Event.Translate(cct.ControlCommon.Owner_MemoryApplication, log_Reports_ThisMethod);
            }

            //EnumEventhandler err_Eh;
            if (log_Reports_ThisMethod.Successful)
            {
                foreach (Expression_Node_Function expr_Func in this.List_Item)
                {
                    //
                    // 登録アクション作成・実行ループ。
                    //
                    expr_Func.Execute4_OnQueryContinueDragEventArgs(sender, e);
                }
            }

            goto gt_EndMethod;
            //
            gt_EndMethod:
            pg_Method.EndMethod(log_Reports_ThisMethod);
            log_Reports_ThisMethod.EndLogging(pg_Method);
        }
Esempio n. 16
0
        //────────────────────────────────────────
        public override void Execute4_OnOEa(
            object sender, EventArgs e
            )
        {
            Log_Method pg_Method = new Log_MethodImpl(0);
            Log_Reports log_Reports_ThisMethod = new Log_ReportsImpl(pg_Method);
            pg_Method.BeginMethod(Info_Controls.Name_Library, this, "Execute4_OnOEa",log_Reports_ThisMethod);
            //
            //

            Customcontrol cct = null;

            string sName_Usercontrol;
            if (sender is Customcontrol)
            {
                cct = (Customcontrol)sender;

                sName_Usercontrol = cct.ControlCommon.Expression_Name_Control.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports_ThisMethod);

                log_Reports_ThisMethod.Comment_EventCreationMe = "[" + sName_Usercontrol + "]コントロールでOEaアクションが実行されました。";
            }
            else
            {
                sName_Usercontrol = "";
                log_Reports_ThisMethod.Comment_EventCreationMe = "OEaアクションが実行されました。";
            }

            if (log_Reports_ThisMethod.CanStopwatch)
            {
                string sEventName;
                this.Configurationtree_Event.Dictionary_Attribute.TryGetValue(PmNames.S_NAME, out sEventName, true, log_Reports_ThisMethod);

                pg_Method.Log_Stopwatch.Message = Utility_Format.Format(
                    sName_Usercontrol,
                    sEventName
                    );
                pg_Method.Log_Stopwatch.Begin();
            }

            //
            //
            //
            //

            // ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
            // ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
            // ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
            {
                CustomcontrolTabcontrol ccTbp = (CustomcontrolTabcontrol)sender;

                //true ||
                if (this.nIndex_PreSelected != ccTbp.SelectedIndex)
                {
                    //essageBox.Show(Info_Forms.LibraryName + ":" + this.GetType().Name + "#Perform_OEa: FC[" + sName_Usercontrol + "]で、イベント(リストボックスの項目選択等)が起こりました。 .SelectedIndex=[" + ccTbp.SelectedIndex + "] preSelectedIndex=["+this.preSelectedIndex+"]");
                }
                else
                {
                    //essageBox.Show(Info_Forms.LibraryName + ":" + this.GetType().Name + "#Perform_OEa: FC[" + sName_Usercontrol + "]で、イベント(リストボックスの項目選択等)が起こっていません。選択項目インデックスが同じです。 .SelectedIndex=[" + ccTbp.SelectedIndex + "] preSelectedIndex=[" + this.preSelectedIndex + "]");

                    //
                    // リストボックスの selectedIndex が変わっていないとき。
                    //
                    // ※ dataSourceのテーブルの行が変わったりすると、ここに来ます。
                    //
                    return;

                }

                this.nIndex_PreSelected = ccTbp.SelectedIndex;
            }

            //
            // 「登録アクション設定」を元に、「アクション」を作成し、実行順に実行。
            //

            Configurationtree_Event.List_Child.ForEach(delegate(Configurationtree_Node systemFunction_Conf, ref bool bBreak)
            {
                Expression_Node_Function expr_Func = cct.ControlCommon.Owner_MemoryApplication.MemoryForms.ConfigurationtreeToFunction.Translate(
                    systemFunction_Conf,
                    true,
                    log_Reports_ThisMethod
                    );

                if (log_Reports_ThisMethod.Successful)
                {
                    //ystem.Console.WriteLine(Info_Forms.LibraryName + ":" + this.GetType().Name + "#Perform_OEa: 何回呼び出される?(B)");
                    expr_Func.Execute4_OnOEa(sender, e);
                }
            });

            goto gt_EndMethod;
            //
            gt_EndMethod:
            pg_Method.EndMethod(log_Reports_ThisMethod);
            log_Reports_ThisMethod.EndLogging(pg_Method);
        }
        //────────────────────────────────────────
        private void ReadKeyconfig(Gamepadmainloop mainloop, int nPlayerPrm, Memory_GameController gc)
        {
            Log_Method pg_Method = new Log_MethodImpl(0);
            Log_Reports log_Reports_ThisMethod = new Log_ReportsImpl(pg_Method);
            pg_Method.BeginMethod(Info_Operating.Name_Library, this, "ReadKeyConfig",log_Reports_ThisMethod);

            // テーブルを、上から下に読んでいく。
            // 列の並び順は NO	ID	Expl	PLAYER	BEFORE	AFTER

            if (null != this.Table_Humaninput_Keyconfig)//テーブルの読取が成功していること。
            {
                DataTable dataTable = this.Table_Humaninput_Keyconfig.DataTable;

                foreach (DataRow dataRow in dataTable.Rows)
                {
                    int nPlayer;
                    Int_HumaninputImpl.TryParse(
                        dataRow.ItemArray[3],
                        out nPlayer,
                        EnumOperationIfErrorvalue.Spaces_To_Alt_Value,
                        0,
                        log_Reports_ThisMethod
                        );

                    if (nPlayerPrm == nPlayer)
                    {
                        string sBefore;
                        string sAfter;

                        String_HumaninputImpl.TryParse(
                            dataRow.ItemArray[4],
                            out sBefore,
                            "",
                            "",
                            pg_Method,
                            log_Reports_ThisMethod
                            );

                        String_HumaninputImpl.TryParse(
                            dataRow.ItemArray[5],
                            out sAfter,
                            "",
                            "",
                            pg_Method,
                            log_Reports_ThisMethod
                            );

                        EnumGamepadkeyIx o_Before;
                        EnumGamepadkeyBit o_After;

                        switch (sBefore)
                        {
                            case "Up":
                                o_Before = EnumGamepadkeyIx.Up;
                                break;
                            case "Right":
                                o_Before = EnumGamepadkeyIx.Right;
                                break;
                            case "Down":
                                o_Before = EnumGamepadkeyIx.Down;
                                break;
                            case "Left":
                                o_Before = EnumGamepadkeyIx.Left;
                                break;
                            case "1":
                                o_Before = EnumGamepadkeyIx.B0;
                                break;
                            case "2":
                                o_Before = EnumGamepadkeyIx.B1;
                                break;
                            case "3":
                                o_Before = EnumGamepadkeyIx.B2;
                                break;
                            case "4":
                                o_Before = EnumGamepadkeyIx.B3;
                                break;
                            case "5":
                                o_Before = EnumGamepadkeyIx.B4;
                                break;
                            case "6":
                                o_Before = EnumGamepadkeyIx.B5;
                                break;
                            case "7":
                                o_Before = EnumGamepadkeyIx.B6;
                                break;
                            case "8":
                                o_Before = EnumGamepadkeyIx.B7;
                                break;
                            default:
                                o_Before = EnumGamepadkeyIx.Up;
                                break;
                        }

                        switch (sAfter)
                        {
                            case "Up":
                                o_After = EnumGamepadkeyBit.Up;
                                break;
                            case "Right":
                                o_After = EnumGamepadkeyBit.Right;
                                break;
                            case "Down":
                                o_After = EnumGamepadkeyBit.Down;
                                break;
                            case "Left":
                                o_After = EnumGamepadkeyBit.Left;
                                break;
                            case "A":
                                o_After = EnumGamepadkeyBit.A;
                                break;
                            case "B":
                                o_After = EnumGamepadkeyBit.B;
                                break;
                            case "X":
                                o_After = EnumGamepadkeyBit.X;
                                break;
                            case "Y":
                                o_After = EnumGamepadkeyBit.Y;
                                break;
                            case "L":
                                o_After = EnumGamepadkeyBit.L;
                                break;
                            case "R":
                                o_After = EnumGamepadkeyBit.R;
                                break;
                            case "Select":
                                o_After = EnumGamepadkeyBit.Select;
                                break;
                            case "Start":
                                o_After = EnumGamepadkeyBit.Start;
                                break;
                            default:
                                o_After = EnumGamepadkeyBit.Up;
                                break;
                        }

                        gc.KeyCnf.KeyconfigArray[(int)o_Before] = o_After;
                    }
                }
            }

            //
            //
            pg_Method.EndMethod(log_Reports_ThisMethod);
            log_Reports_ThisMethod.EndLogging(pg_Method);
        }
        //────────────────────────────────────────
        /// <summary>
        /// アクション実行。
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public override void Execute4_OnOEa(
            object prm_Sender,
            EventArgs prm_E
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0);
            Log_Reports log_Reports_Master = new Log_ReportsImpl(log_Method);
            log_Method.BeginMethod(Info_Expr.Name_Library, this, "Execute4_OnOEa", log_Reports_Master);

            // イベントハンドラー引数の設定
            this.Set_OnOEa(
                this,
                prm_Sender,
                prm_E
            );

            this.Execute5_Main(log_Reports_Master);

            log_Method.EndMethod(log_Reports_Master);
            log_Reports_Master.EndLogging(log_Method);
        }
Esempio n. 19
0
        //────────────────────────────────────────
        /// <summary>
        /// [移動を実行]ボタン。
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void recordMovesButton_Click(object sender, EventArgs e)
        {
            Log_Method pg_Method = new Log_MethodImpl(0);
            Log_Reports d_Logging_Event = new Log_ReportsImpl(pg_Method);
            pg_Method.BeginMethod(Info_TablePermutation.SName_Library, this, "recordMovesButton_Click",d_Logging_Event);
            //
            //

            if (null == this.table_Humaninput)
            {
                goto gt_Error_NullTable;
            }

            bool b_OldEnabled_1;
            bool b_OldEnabled_2;
            if (d_Logging_Event.Successful)
            {
                // 正常時

                b_OldEnabled_1 = this.listView1.Enabled;
                this.listView1.Enabled = false;

                b_OldEnabled_2 = this.listView2.Enabled;
                this.listView2.Enabled = false;

                int[] sourceIndices = new int[this.listView1.SelectedIndices.Count];
                this.listView1.SelectedIndices.CopyTo(sourceIndices, 0);

                int nDestinationIndex = -1;
                foreach (int nSelectedIndex in this.listView2.SelectedIndices)
                {
                    nDestinationIndex = nSelectedIndex;

                    break;
                }

                this.table_Humaninput.MoveItemsBefore(sourceIndices, nDestinationIndex);

                // データ・テーブルをもとに、リストビューを準備します。
                this.SetDataSource(this.table_Humaninput, d_Logging_Event);
            }
            else
            {
                // エラー終了処理

                b_OldEnabled_1 = false;
                b_OldEnabled_2 = false;
            }

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

                // リストビューを更新。
                this.listView1.Refresh();
                this.listView2.Refresh();

                this.listView1.Enabled = b_OldEnabled_1;
                this.listView2.Enabled = b_OldEnabled_2;
            }

            goto gt_EndMethod;
            //
            //
            #region 異常系
            //────────────────────────────────────────
            gt_Error_NullTable:
            if (d_Logging_Event.CanCreateReport)
            {
                Log_RecordReports r = d_Logging_Event.BeginCreateReport(EnumReport.Error);
                r.SetTitle("▲エラー204!", pg_Method);
                r.Message = "データソースとなるテーブルが未設定(ヌル)です。";
                d_Logging_Event.EndCreateReport();
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
            gt_EndMethod:
            pg_Method.EndMethod(d_Logging_Event);
            d_Logging_Event.EndLogging(pg_Method);
        }
Esempio n. 20
0
        //────────────────────────────────────────
        /// <summary>
        /// ファイルパス一覧。
        /// </summary>
        /// <param name="dlgt_EachEFilePath"></param>
        public void EachVariable(DELEGATE_EachVariable dlgt_EachVariable)
        {
            Log_Method log_Method = new Log_MethodImpl(0);
            Log_Reports d_Logging_Dammy = new Log_ReportsImpl(log_Method);
            log_Method.BeginMethod(Info_MiddleImpl.Name_Library, this, "EachVariable",d_Logging_Dammy);

            //
            //

            bool bBreak = false;
            foreach (KeyValuePair<string, Expression_Node_String> kvp in this.dictionaryExpression_Item)
            {
                dlgt_EachVariable(kvp.Key, kvp.Value, ref bBreak);

                if (bBreak)
                {
                    break;
                }
            }

            //
            //
            log_Method.EndMethod(d_Logging_Dammy);
            d_Logging_Dammy.EndLogging(log_Method);
        }
Esempio n. 21
0
        //────────────────────────────────────────
        /// <summary>
        /// </summary>
        /// <param nFcName="sender"></param>
        /// <param nFcName="e"></param>
        private void ccListbox_DataSourceChanged(object sender, EventArgs e)
        {
            Log_Method pg_Method = new Log_MethodImpl(0);
            Log_Reports log_Reports_ThisMethod = new Log_ReportsImpl(pg_Method);
            pg_Method.BeginMethod(Info_Controls.Name_Library, this, "ccListbox_DataSourceChanged",log_Reports_ThisMethod);
            //
            //
            string sName_Usercontrol = this.ControlCommon.Expression_Name_Control.Execute4_OnExpressionString(EnumHitcount.Unconstraint, log_Reports_ThisMethod);

            log_Reports_ThisMethod.Comment_EventCreationMe  ="[" + sName_Usercontrol + "]コントロール(リストボックス)のデータソースが変更されました。";

            ////
            ////
            ////
            //// 項目選択
            ////
            ////
            ////
            //if (log_Reports.Successful)
            //{
            //    // ローカル変数に落とす。
            //    Request_DefaultListItemImpl receipt_DefaultListItemImpl2 = this.Receipt_DefaultListItemImpl;
            //    if (null != receipt_DefaultListItemImpl2)
            //    {
            ////essageBox.Show("[" + this.ControlCommon.NFcName.Value + "]コントロール(リストボックス)のデータソースが変更されました。\nデフォルト値の要求設定がありました。\n nKeyColumnName=[" + receipt_DefaultListItemImpl2.NKeyFldName.GetString(VolumeConstraintEnu.Unconstraint, log_Reports, "*" + this.GetType().NFcName + "#") + "]\n nExpectedValue=[" + receipt_DefaultListItemImpl2.NExpectedValue.GetString(VolumeConstraintEnu.Unconstraint, log_Reports, "*" + this.GetType().NFcName + "#") + "]", this.GetType().NFcName + "#:(" + Info_Forms .LibraryName+ ") デバッグ");

            //        this.SelectItem(
            //            receipt_DefaultListItemImpl2.NKeyFldName,
            //            receipt_DefaultListItemImpl2.NExpectedValue,
            //            log_Reports,
            //            "*" + this.GetType().NFcName + "#"
            //            );
            //    }
            //}

            //
            //
            pg_Method.EndMethod(log_Reports_ThisMethod);
            log_Reports_ThisMethod.EndLogging(pg_Method);
        }
Esempio n. 22
0
        //────────────────────────────────────────
        private void Form1_Load(object sender, EventArgs e)
        {
            Log_Method pg_Method = new Log_MethodImpl(0);
            Log_Reports d_Logging_Load = new Log_ReportsImpl(pg_Method);
            pg_Method.BeginMethod(Info_Toolwindow.Name_Library, this, "Form1_Load",d_Logging_Load);
            //
            //

            this.Load_Form2_(d_Logging_Load);

            goto gt_EndMethod;
            //
            //
            gt_EndMethod:
            pg_Method.EndMethod(d_Logging_Load);
            d_Logging_Load.EndLogging(pg_Method);
        }
Esempio n. 23
0
        //────────────────────────────────────────

        private void UsercontrolListbox_Paint(object sender, PaintEventArgs e)
        {
            Log_Method pg_Method = new Log_MethodImpl(1, Log_ReportsImpl.BDebugmode_Static);
            Log_Reports log_Reports_Dammy = new Log_ReportsImpl(pg_Method);
            pg_Method.BeginMethod(Info_Controls.Name_Library, this, "UcListbox_Paint",log_Reports_Dammy);


            UsercontrolListbox ucLst = (UsercontrolListbox)sender;

            if (!this.customcontrolListbox1.Visible)
            {
                // コントロールが不可視の場合、絵を描く。

                bool bEnabled = ucLst.customcontrolListbox1.Enabled;

                // 自分の内側に線を引ければよい。
                Rectangle rect = new Rectangle(
                    0,
                    0,
                    ucLst.Width - 1,
                    ucLst.Height - 1
                    );
                if (!bEnabled)
                {
                    // 編集不可能。
                    e.Graphics.FillRectangle(Brushes.LightGray, rect);
                }
                else
                {
                    // 編集可能。
                    e.Graphics.FillRectangle(Brushes.White, rect);
                }
                e.Graphics.DrawRectangle(
                    Pens.Black, rect
                    );


                // 縦スクロールバーの描画。
                bool bVisibleVscrbar = false;
                if (bVisibleVscrbar)
                {
                    Rectangle rect2 = new Rectangle(
                        this.memoryVirticalscrollbar1.Bounds.X,
                        this.memoryVirticalscrollbar1.Bounds.Y,
                        this.memoryVirticalscrollbar1.Bounds.Width - 1,
                        this.memoryVirticalscrollbar1.Bounds.Height - 1
                        );
                    if (!bEnabled)
                    {
                        // 編集不可能。
                        e.Graphics.FillRectangle(Brushes.LightGray, rect2);
                    }
                    else
                    {
                        // 編集可能。
                        e.Graphics.FillRectangle(this.memoryVirticalscrollbar1.BackBrush, rect2);
                    }

                    // 枠線
                    e.Graphics.DrawRectangle(Pens.Black, rect2);

                    // 「▲」ボタン。
                    {
                        MemoryButtonImpl moBtn = this.memoryVirticalscrollbar1.MemoryUpbutton;

                        // 自分の内側に線を引ければよい。
                        Rectangle rect3 = new Rectangle(
                            moBtn.Bounds.X,
                            moBtn.Bounds.Y,
                            moBtn.Bounds.Width - 1,
                           moBtn.Bounds.Height - 1
                            );
                        if (!bEnabled)
                        {
                            // 編集不可能。
                            e.Graphics.FillRectangle(Brushes.LightGray, rect3);
                        }
                        else
                        {
                            // 編集可能。
                            e.Graphics.FillRectangle(moBtn.BackBrush, rect3);
                        }
                        // 枠線
                        e.Graphics.DrawRectangle(Pens.Black, rect3);

                        // 視認で位置調整。
                        rect3.Offset(2, 1);
                        e.Graphics.DrawString("▲", moBtn.Font, moBtn.ForeBrush, rect3);
                    }

                    // 「▼」ボタン。
                    {
                        MemoryButtonImpl moBtn = this.memoryVirticalscrollbar1.MemoryDownbutton;

                        // 自分の内側に線を引ければよい。
                        Rectangle rect3 = new Rectangle(
                            moBtn.Bounds.X,
                            moBtn.Bounds.Y,
                            moBtn.Bounds.Width - 1,
                            moBtn.Bounds.Height - 1
                            );
                        if (!bEnabled)
                        {
                            // 編集不可能。
                            e.Graphics.FillRectangle(Brushes.LightGray, rect3);
                        }
                        else
                        {
                            // 編集可能。
                            e.Graphics.FillRectangle(moBtn.BackBrush, rect3);
                        }
                        // 枠線
                        e.Graphics.DrawRectangle(Pens.Black, rect3);

                        // 視認で位置調整。
                        rect3.Offset(2, 1);
                        e.Graphics.DrawString("▼", moBtn.Font, moBtn.ForeBrush, rect3);
                    }

                }


                // リストのテキストを表示します。
                {
                    // リストボックスの縦幅。
                    int nBoxH = rect.Height;
                    // 行の縦幅。
                    int nLineH = this.customcontrolListbox1.ItemHeight;

                    // テキスト表示領域は、四角の線から1ドット離すように小さくします。
                    Rectangle rect2;
                    if (bVisibleVscrbar)
                    {
                        // 縦スクロールバーを表示する場合。
                        rect2 = new Rectangle(
                            rect.X + 2,
                            rect.Y + 2,
                            rect.Width - N_VSCRBAR_WIDTH - 1,
                            nLineH - 2
                            );
                    }
                    else
                    {
                        rect2 = new Rectangle(
                            rect.X + 2,
                            rect.Y + 2,
                            rect.Width - 2,
                            nLineH - 2
                            );
                    }
                    //rect2=rect;
                    //rect.Inflate(-2, -2);

                    // 表示できる行数。
                    int nVrows = nBoxH / nLineH;

                    // 先頭項目のインデックス
                    int nVFirstIx = this.customcontrolListbox1.IndexFromPoint(1, 1);
                    if (nVFirstIx == -1)
                    {
                        pg_Method.WriteError_ToConsole(
                            "▲L05エラー①! "+
                            pg_Method.Fullname + ":根本的なエラー?"
                            );
                        //essageBox.Show(
                        //    );
                    }
                    else
                    {
                        int nVLastIx = nVFirstIx + nVrows;
                        if (this.customcontrolListbox1.List_SText_Display.Count <= nVLastIx)
                        {
                            nVLastIx = this.customcontrolListbox1.List_SText_Display.Count - 1;
                        }

                        // 選択項目のインデックス
                        int nSelectedIx = this.customcontrolListbox1.SelectedIndex;

                        for (int nLoop = nVFirstIx; nLoop <= nVLastIx; nLoop++)
                        {
                            string sDisplayText = this.customcontrolListbox1.List_SText_Display[nLoop];

                            if (nSelectedIx != nLoop)
                            {
                                // 非選択表示
                                Brush brush = null;

                                if (nLoop < this.customcontrolListbox1.List_ForeBrush.Count)
                                {
                                    brush = this.customcontrolListbox1.List_ForeBrush[nLoop];
                                }

                                if (null == brush)
                                {
                                    brush = Brushes.Black;
                                }

                                e.Graphics.DrawString(sDisplayText, this.customcontrolListbox1.Font, brush, rect2);
                            }
                            else
                            {
                                // 選択表示
                                e.Graphics.FillRectangle(Brushes.Blue, rect2);
                                e.Graphics.DrawString(sDisplayText, this.customcontrolListbox1.Font, Brushes.White, rect2);

                            }
                            rect2.Y += nLineH;
                            //rect2.Offset(0, nLineH);
                        }
                    }

                }


            }

            pg_Method.EndMethod(log_Reports_Dammy);
            log_Reports_Dammy.EndLogging(pg_Method);
        }
Esempio n. 24
0
        //────────────────────────────────────────
        /// <summary>
        /// @Deprecated 使ってない?
        /// 
        /// リストボックスで、プロジェクト名を変更したとき。
        /// 旧名:projectNameDdl_SelectedIndexChanged
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void On_ProjectNameDdl_SelectedIndexChanged(object sender, EventArgs e)
        {
            Log_Method pg_Method = new Log_MethodImpl(0);
            Log_Reports d_Logging_Click = new Log_ReportsImpl(pg_Method);
            pg_Method.BeginMethod(Info_Toolwindow.Name_Library, this, "projectNameDdl_SelectedIndexChanged",d_Logging_Click);
            //
            //

            // 選択プロジェクト名:取得
            string sSelectedProjectName = (string)((UsercontrolListbox)this.UctlstNameProject).SelectedItem;

            // 選択プロジェクト名:セット
            this.Owner_MemoryApplication.MemoryForms.MemoryAatoolxmlDialog.Name_SelectedEditor = sSelectedProjectName;

            // エディター設定ファイルへのパス
            this.PctxtFpathProjectcnf.Text = "";

            // 内容をデバッグ出力
            //this.MemoryAatoolxmlDialog.MoToolConfig.Projects.DebugWrite();

            MemoryAatoolxml_Editor moAatoolxml_SelectedEditor;

            if (this.Owner_MemoryApplication.MemoryForms.MemoryAatoolxmlDialog.MemoryAatoolxml.Dictionary_Editor.Dictionary_Item.ContainsKey(sSelectedProjectName))
            {
                moAatoolxml_SelectedEditor = this.Owner_MemoryApplication.MemoryForms.MemoryAatoolxmlDialog.MemoryAatoolxml.Dictionary_Editor.GetEditorByName(
                    sSelectedProjectName,true,d_Logging_Click);
                if (!d_Logging_Click.Successful)
                {
                    // 既エラー。
                    goto gt_EndMethod;
                }

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

                    moAatoolxml_SelectedEditor.Dictionary_Fsetvar_Configurationtree.List_Child.ForEach(delegate(Configurationtree_Node s_Fsetvar, ref bool bBreak)
                    {
                        string sNamevar;
                        s_Fsetvar.Dictionary_Attribute.TryGetValue(PmNames.S_NAME_VAR, out sNamevar, true, d_Logging_Click);

                        string sValue;
                        s_Fsetvar.Dictionary_Attribute.TryGetValue(PmNames.S_VALUE, out sValue, true, d_Logging_Click);

                        if (sNamevar == NamesVar.S_SP_EDITOR)
                        {
                            UsercontrolTextbox uctTxt = (UsercontrolTextbox)this.PctxtFpathProjectcnf;
                            uctTxt.ControlCommon.BAutomaticinputting = true;
                            uctTxt.Text = sValue + System.IO.Path.DirectorySeparatorChar + NamesFile.S_AA_EDITOR_XML;
                            uctTxt.ControlCommon.BAutomaticinputting = false;
                        }
                    });
                }

            }
            else
            {
                // 異常時
                goto gt_Error_NotFoundProjectname;
            }
            //.WriteLine(this.GetType().Name + "#projectNameComboBoxUc_SelectedIndexChanged: selectedProjectName=[" + selectedProjectName + "] this.ProjectConfigFilePathTextBoxUc.Text=[" + this.ProjectConfigFilePathTxt.Text + "]");

            //// 更新を確定します。
            //bool commit = true;

            //// 内容をデバッグ出力
            //.WriteLine(this.GetType().Name + "#projectConfigFilePathTxt_FoTextChanged: (1)");
            //this.MemoryAatoolxmlDialog.MoToolConfig.Projects.DebugWrite();

            //
            // 『project-config』ファイルの存在の有無を確認したい。
            //

            //// 内容をデバッグ出力
            //.WriteLine(this.GetType().Name + "#projectConfigFilePathTxt_FoTextChanged: (2)");
            //this.MemoryAatoolxmlDialog.MoToolConfig.Projects.DebugWrite();

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

            //    if (commit)
            //    {
            //        // 『project-config.xml』ファイルの存在の有無を確認したい。
            //        Flow0010 flow0010 = new Flow0010();
            //        string projectConfigXmlAbsFilePath = flow0010.GetFileAbsPath(
            //            this.ProjectConfigFilePathTxt.Text,
            //            false,//取得できなくてもエラーとしない。
            //            pg_Logging,
            //            "*projectConfigFilePathTextBoxUc_FoTextChanged(3)"
            //            );

            //        if ("" == projectConfigXmlAbsFilePath)
            //        {
            //            // 『project-config』の絶対ファイルパスを取得できなかったとき。

            //            WarningReport dReport = new WarningReportImpl();
            //            dReport.Title = "▲エラー21!(Toolwindow)";

            //            StringBuilder txt = new StringBuilder();
            //            txt.Append("(1)『project-config』ファイルへのパスがテキストボックスに入力されていませんでした。");
            //            txt.Append(Environment.NewLine);
            //            txt.Append("  ツール設定ファイルの プロジェクト要素の内容を確かめてみてください。");
            //            txt.Append(Environment.NewLine);
            //            txt.Append(Environment.NewLine);
            //            txt.Append(this.GetType().Name);
            //            txt.Append("#projectConfigFilePathTextBoxUc_FoTextChanged:");
            //            txt.Append(Environment.NewLine);
            //            txt.Append(" テキストボックス値=[" + this.ProjectConfigFilePathTxt.Text + "]");
            //            dReport.Message = txt.ToString();

            //            pg_Logging.Add(dReport);
            //            //.WriteLine( txt.ToString() );

            //        }
            //        else
            //        {
            //            // 『project-config』の絶対ファイルパスを取得できたとき。

            //            // ツール設定ファイルの存在の有無を確認したい。
            //            string toolConfigXmlAbsFilePath = flow0010.GetFileAbsPath(
            //                ModelOfToolConfigImpl.TOOL_CONFIG_REL_FILE_PATH,
            //                false,//取得できなくてもエラーとしない。
            //                pg_Logging,
            //                "*projectConfigFilePathTextBoxUc_FoTextChanged(4)"
            //                );

            //            if ("" == toolConfigXmlAbsFilePath)
            //            {
            //                // ツール設定ファイルの絶対ファイルパスを取得できなかったとき。

            //                //.WriteLine(this.GetType().Name + "#projectConfigFilePathTextBoxUc_FoTextChanged: (2)ツール設定ファイルへのパスが取得できなかったので、変更をツール設定ファイルに保存しません。");
            //            }
            //            else
            //            {
            //                // ツール設定ファイルの絶対ファイルパスを取得できたとき。

            //                // TODO ツール設定ファイルに、『project-config.xml』の絶対パスを保存したい。

            //                //
            //                // 外部ファイルに変更を保存します。
            //                //
            //                //if (!this.ProjectConfigFilePathTxt.ControlCommon.BAutomaticinputting)
            //                //{
            //                //    // 自動入力でない場合。

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

            //                //        // 『SRSグローバルリスト マージツール設定』の保存
            //                //        WriterOfToolConfig writer1 = new WriterOfToolConfig();
            //                //        writer1.Write(
            //                //            toolConfigXmlAbsFilePath,//ここは『ツール設定ファイル』が正しい。
            //                //            this.MemoryAatoolxmlDialog.ApplicationName,
            //                //            this.MemoryAatoolxmlDialog.MoToolConfig.Projects,
            //                //            pg_Logging,
            //                //            "*projectConfigFilePathTextBoxUc_FoTextChanged(5)"
            //                //            );

            //                //        // 現在のフォーム入力値は保存データと一致します。
            //                //        //TODO modelOfFormOfTcd.InvalidInput = false;
            //                //    }
            //                //}
            //            }

            //        }

            //    }
            //    else
            //    {
            //        // 現在のフォーム入力値は保存データと一致しない可能性があります。
            //        //this.MemoryAatoolxmlDialog.InvalidInput = true;
            //    }
            //}

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

                StringBuilder t = new StringBuilder();
                t.Append("プロジェクト名[" + sSelectedProjectName + "]を選択しましたが、");
                t.Append(Environment.NewLine);
                t.Append("そのプロジェクト名は 登録されていないものでした。");
                r.Message = t.ToString();
                d_Logging_Click.EndCreateReport();
            }
            goto gt_EndMethod;
            //────────────────────────────────────────
            #endregion
            //
            //
            gt_EndMethod:
            pg_Method.EndMethod(d_Logging_Click);
            d_Logging_Click.EndLogging(pg_Method);
        }
Esempio n. 25
0
        //────────────────────────────────────────
        /// <summary>
        /// フォームのロード時。
        /// </summary>
        public void Load()
        {
            Log_Method pg_Method = new Log_MethodImpl(0);
            Log_Reports log_Reports_Load = new Log_ReportsImpl(pg_Method);
            pg_Method.BeginMethod(Info_Operating.Name_Library, this, "Load",log_Reports_Load);
            //
            //

            // タイトル
            {
                StringBuilder s = new StringBuilder();

                s.Append("GamePad v");
                s.Append(Application.ProductVersion);
                s.Append(" - Xenon Tools");

                this.Form1.Text = s.ToString();
            }

            // キー設定
            {
                KeyconfigImpl keycnf;

                // キーコンフィグ読取
                {
                    XTo_KeyconfigImpl xToO = new XTo_KeyconfigImpl();
                    xToO.XTo(
                        out keycnf,
                        log_Reports_Load
                        );

                    this.Input.Table_Humaninput_Keyconfig = keycnf.O_Table_Keycnf;
                }

                // キー設定(1P)
                if (keycnf.Dic_KeyCnf.ContainsKey(1))
                {
                    KeyconfigPadImpl keycnfPad = keycnf.Dic_KeyCnf[1];

                    {
                        string sErrorMsg;
                        this.Form1.UsercontrolPage2.Open(1, keycnfPad, out sErrorMsg);
                        if ("" != sErrorMsg)
                        {
                            // エラー
                            if (log_Reports_Load.CanCreateReport)
                            {
                                Log_RecordReports r = log_Reports_Load.BeginCreateReport(EnumReport.Error);
                                r.SetTitle("▲エラー111!", pg_Method);
                                r.Message = sErrorMsg;
                                log_Reports_Load.EndCreateReport();
                            }
                            goto gt_EndMethod;
                        }
                    }

                    {
                        string sErrorMsg;
                        this.Form1.UsercontrolPage3.Open(1, keycnfPad, out sErrorMsg);
                        if ("" != sErrorMsg)
                        {
                            // エラー
                            if (log_Reports_Load.CanCreateReport)
                            {
                                Log_RecordReports r = log_Reports_Load.BeginCreateReport(EnumReport.Error);
                                r.SetTitle("▲エラー112!", pg_Method);
                                r.Message = sErrorMsg;
                                log_Reports_Load.EndCreateReport();
                            }
                            goto gt_EndMethod;
                        }
                    }
                }

            }

            // タイマー開始。
            this.Form1.Pctmr1.Enabled = true;

            goto gt_EndMethod;
            //
            //
            gt_EndMethod:
            pg_Method.EndMethod(log_Reports_Load);
            log_Reports_Load.EndLogging(pg_Method);
        }