public void InitPlugin(TabPage pluginScreenSpace, Label pluginStatusText) { try { // DI log writer Globals.WriteLogImpl = (str) => { ActGlobals.oFormActMain.WriteInfoLog(String.Format("act_timeline: {0}", str)); }; ScreenSpace = pluginScreenSpace; StatusText = pluginStatusText; StatusText.Text = "Loading Sprache.dll"; #if DEBUG // Sprache.dll is already injected by libZ in Release builds. Assembly.LoadFrom("Sprache.dll"); #endif 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(); Settings = new PluginSettings(this); Settings.AddStringSetting("TimelineTxtFilePath"); Settings.AddStringSetting("FontString"); Settings.AddIntSetting("TextWidth"); Settings.AddIntSetting("BarWidth"); Settings.AddIntSetting("OpacityPercentage"); ActGlobals.oFormActMain.OnCombatEnd += CombatEnd; SetupTab(); InjectButton(); Settings.Load(); SetupUpdateChecker(); StatusText.Text = "Plugin Started (^^)!"; } catch (Exception e) { if (StatusText != null) { StatusText.Text = "Plugin Init Failed: " + e.Message; } } }
void checkBoxShowView_CheckedChanged(object sender, EventArgs e) { if (checkBoxShowView.Checked) { TimelineView.Show(); } else { TimelineView.Hide(); } }
public void InitPlugin(TabPage pluginScreenSpace, Label pluginStatusText) { try { // DI log writer Globals.WriteLogImpl = (str) => { ActGlobals.oFormActMain.WriteInfoLog(String.Format("act_timeline: {0}", str)); }; ScreenSpace = pluginScreenSpace; StatusText = pluginStatusText; StatusText.Text = "Loading Sprache.dll"; #if DEBUG // Sprache.dll is already injected by libZ in Release builds. Assembly.LoadFrom("Sprache.dll"); #endif 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; Settings = new PluginSettings(this); Settings.AddStringSetting("TimelineTxtFilePath"); Settings.AddStringSetting("FontString"); Settings.AddIntSetting("TextWidth"); Settings.AddIntSetting("BarWidth"); Settings.AddIntSetting("OpacityPercentage"); SetupTab(); InjectButton(); Settings.Load(); SetupUpdateChecker(); StatusText.Text = "Plugin Started (^^)!"; } catch(Exception e) { if (StatusText != null) StatusText.Text = "Plugin Init Failed: "+e.Message; } }