dotnet new console
dotnet add package GtkSharp
dotnet run
using Gtk; class Program { public static void Main() { Application.Init(); new FirstWindow(); Application.Run(); } public static void Quit() { Application.Quit(); } }
using Gtk; class FirstWindow : Window { public FirstWindow() : base("Test") { SetDefaultSize(600, 350); SetPosition(WindowPosition.Center); DeleteEvent += delegate { Program.Quit(); }; VBox vBox = new VBox(); Add(vBox); HBox hBox = new HBox(); vBox.PackStart(hBox, true, false, 0); LevelBar levelBar = new LevelBar(0, 10) { WidthRequest = 500, HeightRequest = 30 }; hBox.PackStart(levelBar, true, false, 10); levelBar.Value = 3; ShowAll(); } }
© accounting.org.ua - 2024