Camden Dixie O'Brien 9588e88b93 Support more PDUs and create Client class
The Client class provides a nice, high-level async API for
client-server communication.
2025-03-01 10:37:01 +00:00

32 lines
796 B
Vala

namespace StudySystemClient {
public class App : Gtk.Application {
public App() {
Object(application_id: "sh.wip.study-system-client");
}
protected override void activate() {
try {
var css_provider = new Gtk.CssProvider();
css_provider.load_from_resource(
"/sh/wip/studysystemclient/styles.css");
Gtk.StyleContext.add_provider_for_display(
Gdk.Display.get_default(),
css_provider,
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
var client = new Client(Config.CERT_DIR);
var main_window = new MainWindow(this, client);
main_window.present();
} catch (Error e) {
stderr.printf("Failed to initialize: %s\n", e.message);
return;
}
}
}
}
int main(string[] args) {
var app = new StudySystemClient.App();
return app.run(args);
}