/*--- Method: Initialization ----------------------------------------------------------------------------------------------------------------------------------*/ /// <summary> コアの初期化を実行します。 /// </summary> /// <returns> 正常終了時 True </returns> private bool initCore() { try { // ロガー生成 Globals.CreateLogger(); // DI log writer Globals.WriteLogImpl = (str) => { ActGlobals.oFormActMain.WriteInfoLog(String.Format("act_timeline: {0}", str)); }; //this.StatusText.Text = "Loading Sprache.dll"; #if DEBUG // Sprache.dll is already injected by libZ in Release builds. //Assembly.LoadFrom("Sprache.dll"); #endif //this.StatusText.Text = "Sprache.dll Load Success!"; #if DEBUG // See Issue #1 // Control.CheckForIllegalCrossThreadCalls = true; #endif //Controller = new TimelineController(); //TimelineView = new TimelineView(Controller); //TimelineView.Show(); //TimelineView.DoubleClick += TimelineView_DoubleClick; //TimelineAutoLoader = new TimelineAutoLoader(this); //TimelineAutoLoader.Start(); this.SetupTab(); this.pluginApplicationViewModel = tabPageControl.PluginApplicationView.DataContext as PluginApplicationViewModel; this.pluginApplicationViewModel.ApplicationSetup(); this.CreateInjectButton(this.pluginApplicationViewModel.CommonComponent); //SetupUpdateChecker(); StatusText.Text = "Plugin Started."; Globals.SysLogger.WriteSystemLog.NonState.DEBUG.Write("Plugin Load End.", Globals.ProjectName); } catch (Exception e) { if (StatusText != null) { StatusText.Text = "Plugin Init Failed: " + e.Message; } Globals.ErrLogger.WriteStackTrace(e); return(false); } return(true); }
public Form1() { InitializeComponent(); var view = this.elementHost1.Child as PluginApplicationView; this.vm = view.DataContext as PluginApplicationViewModel; vm.ApplicationSetup(); this.FormClosing += Form1_FormClosing; }