コード例 #1
0
ファイル: LaunchAppScanner.cs プロジェクト: zezo010/acat
 /// <summary>
 /// Key press event handler.  Process the ESC
 /// key and quit if it is pressed
 /// </summary>
 /// <param name="sender">event sender</param>
 /// <param name="e">event args</param>
 private void _keyboardActuator_EvtKeyPress(object sender, KeyPressEventArgs e)
 {
     if (EvtQuit != null)
     {
         int c = (int)e.KeyChar;
         if (c == 27)
         {
             EvtQuit.BeginInvoke(this, null, null, null);
         }
     }
 }
コード例 #2
0
ファイル: LaunchAppScanner.cs プロジェクト: zezo010/acat
 /// <summary>
 /// Confirm and close the scanner
 /// </summary>
 private void close()
 {
     if (EvtQuit != null)
     {
         EvtQuit.BeginInvoke(this, null, null, null);
     }
     else
     {
         if (DialogUtils.ConfirmScanner(PanelManager.Instance.GetCurrentForm(), R.GetString("CloseQ")))
         {
             Windows.CloseForm(this);
         }
     }
 }
コード例 #3
0
        /// <summary>
        /// Handle the selection - navigate, launch app etc
        /// </summary>
        /// <param name="itemTag">item tag of selected item</param>
        private void handleWidgetSelection(Widget widget, ref bool handled)
        {
            if (widget.UserData is AppInfo)
            {
                handleAppSelect((AppInfo)widget.UserData);
                handled = true;
            }
            else
            {
                handled = true;
                switch (widget.Value)
                {
                case "@Quit":
                    if (EvtQuit != null)
                    {
                        EvtQuit.BeginInvoke(null, null, null, null);
                    }
                    break;

                case "@AppListSort":
                    switchSortOrder();
                    break;

                case "@AppListNextPage":
                    gotoNextPage();
                    break;

                case "@AppListPrevPage":
                    gotoPreviousPage();
                    break;

                case "@AppListSearch":
                    if (EvtShowScanner != null)
                    {
                        EvtShowScanner.BeginInvoke(null, null, null, null);
                    }
                    break;

                case "@AppListClearFilter":
                    ClearFilter();
                    break;

                default:
                    handled = false;
                    break;
                }
            }
        }