コード例 #1
0
ファイル: AddIn.cs プロジェクト: zhn137/OneMore
        // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

        /* Shutdown functions are called in this order:
         *
         * 1. OnBeginShutdown
         * 2. OnDisconnection
         */

        public void OnBeginShutdown(ref Array custom)
        {
            int count = custom == null ? 0 : custom.Length;

            logger.WriteLine($"OnBeginShutdown({count})");

            try
            {
                logger.WriteLine("Shutting down UI");

                HotkeyManager.Unregister();

                UIHelper.Shutdown();
            }
            catch (Exception exc)
            {
                logger.WriteLine(exc);
            }
        }
コード例 #2
0
        // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

        // Shutdown functions are called in this order:
        //
        // 1. OnBeginShutdown
        // 2. OnDisconnection

        public void OnBeginShutdown(ref Array custom)
        {
            var cude = DescribeCustom(custom);

            logger.Start($"OnBeginShutdown(custom[{cude}])");

            try
            {
                logger.WriteLine("shutting down UI");

                HotkeyManager.Unregister();

                UIHelper.Shutdown();
            }
            catch (Exception exc)
            {
                logger.WriteLine("error shutting down UI", exc);
            }
        }