Exemple #1
0
        public void TestCase()
        {
			UIOHook.StartHook();
			Thread.Sleep(1000);
			UIOHook.StopHook();
			Assert.AreEqual(1, Process.GetCurrentProcess().Threads.Count, "UIOHook did not shut down all threads.");
        }
Exemple #2
0
        public static void Main(string[] args)
        {
            // load emoji into memory
            string            contents = File.ReadAllText("emoji.json");
            IList <EmojiData> emojis   = JsonConvert.DeserializeObject <IList <EmojiData> >(contents).OrderBy(e => e.annotation).ToList();

            UIOHook.DisableDefaultLogFunc();
            // if you put the following line between Application.Init and Application.Run, you'll segfault when you call Window.Show()
            UIOHook.StartHook();
            Application.Init();
            mainDialog = new EntryDialog(emojis);
            mainDialog.Hide();
            new Notification("EmojiBoard", "EmojiBoard is running.").Show();
            Application.Run();
            // The application has quit, shut down the hook thread
            UIOHook.StopHook();
        }