예제 #1
0
        public override void KeyReleased(KeyPayload payload)
        {
            try
            {
                if ((DateTime.Now - dateTime).TotalSeconds > 2)
                {
                    // It is necessary to "reset" the counter from when new items are counted
                    initialDateOffset = DateTime.Now;

                    // We open the corresponding url
                    System.Diagnostics.Process.Start(watcher.GetUrl());
                }

                UpdateKey(null, null);
            }
            catch (Exception ex)
            {
                Logger.Instance.LogMessage(TracingLevel.ERROR, ex.Message);
                Connection.ShowAlert().Wait();
            }
        }