private bool disposedValue = false; // To detect redundant calls protected virtual void Dispose(bool disposing) { if (!disposedValue) { if (disposing) { if (hagen != null) { hagen.Dispose(); hagen = null; } } // TODO: free unmanaged resources (unmanaged objects) and override a finalizer below. // TODO: set large fields to null. disposedValue = true; } }
public void RunUserInterface() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); log4net.Config.BasicConfigurator.Configure(); var logViewer = new LogViewer2() { Text = "Log", Threshold = log4net.Core.Level.Info }; logViewer.AddToRoot(); log.Info("Startup"); KillAlreadyRunning(); hagen = new Hagen(); hagen.Context.Choose = _ => ActionChooser.Choose(hagen.Context, _); main = new Main(hagen); foreach (var i in this.pluginAssemblyPaths) { main.LoadPlugin(i); } main.AddPanel(logViewer); if (Popup) { main.Popup(); } Application.Run(main); }
public Context(Hagen hagen) { this.hagen = hagen; lastExecutedStore = hagen.OpenLastExecutedStore(); NotifyAction = x => log.Info(x); }
public Main(Hagen hagen) { this.hagen = hagen; InitUserInterface(); }