public MainWindow(DataModel dataModel, Protocol protocol, Settings settings) : base(Gtk.WindowType.Toplevel) { this.Build (); this.dataModel = dataModel; this.protocol = protocol; this.settings = settings; pollTimer = new Timer(2000); pollTimer.Elapsed += OnTimer; pollTimer.Enabled = true; }
public static void Main() { Protocol protocol = new Protocol (); Application.Init (); mhe.Settings settings = new mhe.Settings() { connectionHost = DEFAULT_HOST, connectionPort = DEFAULT_PORT }; MainWindow main = new MainWindow(null, protocol, settings); main.DeleteEvent += OnDelete; main.DestroyEvent += (object o, DestroyEventArgs args) => { Application.Quit(); }; main.Show(); Application.Run(); }