예제 #1
0
        private static void OpenGUI()
        {
            var appstate = new Application("org.AmongUsCapture.AmongUsCaptureUtil", GLib.ApplicationFlags.None);

            appstate.Register(GLib.Cancellable.Current);
            Application.Init();
            window = new UserForm(socket);
            appstate.AddWindow(window);
            Settings.form         = window;
            Settings.conInterface = new FormConsole(window);

            window.DeleteEvent += (object o, DeleteEventArgs e) =>
            {
                // Make sure that the IPC adapter has a chance to clean up after itself.
                IPCadapter.getInstance().Cancel().Wait();
                Application.Quit();
            };

            window.ShowAll();

            Application.Run();
            IPCadapter.getInstance().Cancel().Wait();

            Environment.Exit(0);
        }
예제 #2
0
        private void Run()
        {
            Gtk.Application.Init();
            app = new Gtk.Application("", GLib.ApplicationFlags.None);
            app.Register(GLib.Cancellable.Current);

            win = new Gtk.Window("");
            app.AddWindow(win);

            Fill();

            win.ShowAll();
            Gtk.Application.Run();
        }
예제 #3
0
        public static void Main(string[] args)
        {
            Application.Init();
            Application app = new Application("dev.simo-andreev.catabase", ApplicationFlags.None);

            app.Register(Cancellable.Current);

            Window window = new AppWindow("CataBase S");

            app.AddWindow(window);

            window.SetIconFromFile("res/images/C-Sharp.png");

            window.Show();
            Application.Run();
        }
예제 #4
0
파일: Program.cs 프로젝트: Spectere/Threads
        internal static void Main(string[] args)
        {
            Application.Init();

            _app = new Application("net.spectere.Threads.Player", GLib.ApplicationFlags.HandlesCommandLine);
            _app.Register(Cancellable.Current);

            _wnd = new MainWindow();
            _app.AddWindow(_wnd);

            var quitAction = new SimpleAction("quit", null);

            quitAction.Activated += Application_OnQuit;
            _app.AddAction(quitAction);

            _wnd.Destroyed += Application_OnQuit;

            _wnd.ShowAll();
            Application.Run();
        }