//──────────────────────────────────────── #endregion #region アクション //──────────────────────────────────────── 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); }
//──────────────────────────────────────── #endregion #region アクション //──────────────────────────────────────── 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(); } // // // // // ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ // ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ // ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ { CustomcontrolListbox ccLst = (CustomcontrolListbox)sender; //true || if (this.nIndex_PreSelected != ccLst.SelectedIndex) { //essageBox.Show(Info_Forms.LibraryName + ":" + this.GetType().Name + "#Perform_OEa: FC[" + fcNameStr + "]で、イベント(リストボックスの項目選択等)が起こりました。 .SelectedIndex=[" + .SelectedIndex + "] preSelectedIndex=["+this.preSelectedIndex+"]"); } else { // // リストボックスの selectedIndex が変わっていないとき。 // // ※ dataSourceのテーブルの行が変わったりすると、ここに来ます。 // return; //essageBox.Show(Info_Forms.LibraryName + ":" + this.GetType().Name + "#Perform_OEa: FC[" + fcNameStr + "]で、イベント(リストボックスの項目選択等)が起こっていません。選択項目インデックスが同じです。 .SelectedIndex=[" + .SelectedIndex + "] preSelectedIndex=[" + this.preSelectedIndex + "]"); } this.nIndex_PreSelected = ccLst.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); }
//──────────────────────────────────────── #endregion #region イベントハンドラー //──────────────────────────────────────── private void Form1_Load(object sender, EventArgs e) { // // // //(1)デバッグモード ※Log_MethodImpl#BeginMethod(...)をする前に必要。 // // // Log_ReportsImpl.BDebugmode_Static = true; Log_Reports pg_Logging_ThisMethod; // // // //(2)メソッド開始 // // // Log_Method pg_Method = new Log_MethodImpl(0); // デバッグモード静的設定の後で。 pg_Method.BeginMethod(Info_CSVEditorImpl.Name_Library, this, "Form1_Load", out pg_Logging_ThisMethod); // Expression_Node_String parent_Expression_Null = null; Configurationtree_Node cur_Conf = new Configurationtree_NodeImpl(pg_Method.Fullname, null); // // // //(3)CSVエディター・モデル(必要に応じて拡張)用意 // // // this.memoryCsvEditor = new MemoryApplicationImpl(); this.MemoryCsvEditor.InitializeBeforeUse( new Mainwnd_FormWrappingImpl(this), new ConfigurationtreeToFunction_ListImpl(parent_Expression_Null, cur_Conf, this.MemoryCsvEditor, pg_Logging_ThisMethod), new Form_ToolwindowImpl(), new MemoryAatoolxmlDialogImpl(this.MemoryCsvEditor), new UsercontrolStyleSetterImpl(), new UsercontrolCreator1Impl(), new XToMemory_FormImpl() ); Form1.RegisterFunctions(pg_Logging_ThisMethod); // // // //(4)アプリケーション・モデル作成後に E_Sf_BootCsvEditorImpl(必要に応じて拡張)実行。 // // // if (pg_Logging_ThisMethod.Successful) { Expression_Node_Function expr_Func = Collection_Function.NewFunction2( Expression_Node_Function_BootCsvEditorExImpl.NAME_FUNCTION, null, cur_Conf, this.MemoryCsvEditor, pg_Logging_ThisMethod ); //expr_Func.InitializeBeforeUse(this.MoCsvEditor); // 実行 expr_Func.Execute4_OnOEa(sender, e); } // // // //(5)エラーログ出力 // // // if (!pg_Logging_ThisMethod.Successful) { // 異常時 this.MemoryCsvEditor.MemoryLogwriter.WriteErrorLog( this.MemoryCsvEditor, pg_Logging_ThisMethod, pg_Method.Fullname ); } // // // //(6)メソッド、ロギング終了 // // // pg_Method.EndMethod(pg_Logging_ThisMethod); pg_Logging_ThisMethod.EndLogging(pg_Method); }