Ejemplo n.º 1
0
        private static void OnShutdown(object sender, EventArgs e)
        {
            if (FSBL != null)
            {
                lock (lockObj)
                {
                    // Disable log timer
                    timer.Stop();

                    if (FSBL != null)
                    {
                        try
                        {
                            // Dispose of Finsemble.
                            FSBL.Dispose();
                        }
                        catch { }
                        finally
                        {
                            FSBL = null;
                        }
                    }
                }
            }

            // Release main thread so application can exit.
            autoEvent.Set();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
#if DEBUG
            System.Diagnostics.Debugger.Launch();
#endif

            FSBL               = new Finsemble.Core.Finsemble(args, null);
            FSBL.Connected    += OnConnected;
            FSBL.Disconnected += OnShutdown;
            FSBL.Connect("WindowlessExample.Core", JWK);

            // Block main thread until worker is finished.
            autoEvent.WaitOne();
        }