Ejemplo n.º 1
0
        private void EnableMonitor()
        {
            monitorClipBoard = new frmMonitor(settings);
            monitorClipBoard.ActiveMonitorClipBoard();
            bool alreadyPresent = false;
            if (settings.FowardShortCut != Keys.None || settings.PreviousShortCut != Keys.None || settings.ShowClipBoardRingShortCut != Keys.None)
            {
                // insertShortCutHandle(monitorClipBoard);
                if (settings.FowardShortCut != Keys.None)
                {
                    if (dictNotifyPressKey.ContainsKey(settings.FowardShortCut))
                    {
                        settings.fowardShortCut = Keys.None;
                        alreadyPresent = true;
                    }
                    else
                        dictNotifyPressKey.Add(settings.FowardShortCut, monitorClipBoard);
                }

                if (settings.PreviousShortCut != Keys.None)
                {
                    if (dictNotifyPressKey.ContainsKey(settings.PreviousShortCut))
                    {
                        settings.previousShortCut = Keys.None;
                        alreadyPresent = true;
                    }
                    else
                        dictNotifyPressKey.Add(settings.PreviousShortCut, monitorClipBoard);
                }

                if (settings.ShowClipBoardRingShortCut != Keys.None)
                {
                    if (dictNotifyPressKey.ContainsKey(settings.ShowClipBoardRingShortCut))
                    {
                        settings.showClipBoardRingShortCut = Keys.None;
                        alreadyPresent = true;
                    }
                    else
                        dictNotifyPressKey.Add(settings.ShowClipBoardRingShortCut, monitorClipBoard);
                }

                if (alreadyPresent)
                    MessageBox.Show("Shorcut already in use in QuickGenerator!!\nPlease choose another Shorcut!!");
                ActivateEventKeys();
            }
        }