Exemple #1
0
        public HelperForm(IController controller)
        {
            this.controller = controller;
            InitializeComponent();

            var bound = Screen.PrimaryScreen.Bounds;

            commonTop     = bound.Height - Height;
            Location      = new Point((bound.Width - Width) / 2, commonTop);
            StartPosition = FormStartPosition.Manual;
            CheckForIllegalCrossThreadCalls = false;
            defaultSize = Size;

            pinned = Settings.Default.fix;
            checkPinBoxImage();

            controller.ToolSelectionChanged += Controller_ToolSelectionChanged;
            controller.SlideShowChanged     += Controller_SlideShowChanged;

            foreach (Control ctr in Controls)
            {
                GestureUtils.AddSlideDownGesture(ctr);
            }
            GestureUtils.AddSlideDownGesture(this);

            controller.Focus();
        }
Exemple #2
0
 private void rightBox_Click(object sender, EventArgs e)
 {
     if (GestureUtils.IsInvolved(sender as Control))
     {
         GestureUtils.Reject(sender as Control);
         return;
     }
     if (!IsUp())
     {
         SlipUp();
         return;
     }
     if (!skipToolShown)
     {
         controller.Next();
         if ((DateTime.Now - lastRightBoxClicked).TotalMilliseconds <= 700)
         {
             countRightBoxClicked++;
         }
         if (countRightBoxClicked >= 3)
         {
             ShowSkipTool();
             countRightBoxClicked = 0;
         }
         lastRightBoxClicked = DateTime.Now;
         controller.Focus();
     }
     else
     {
         HideSkipTool();
         controller.Switch();
     }
 }
Exemple #3
0
 private void pictureBox1_Click(object sender, EventArgs e)
 {
     if (GestureUtils.IsInvolved(sender as Control))
     {
         GestureUtils.Reject(sender as Control);
         return;
     }
     if (!IsUp())
     {
         SlipUp();
         return;
     }
     controller.Exit();
 }
Exemple #4
0
 private void leftBox_Click(object sender, EventArgs e)
 {
     if (GestureUtils.IsInvolved(sender as Control))
     {
         GestureUtils.Reject(sender as Control);
         return;
     }
     if (!IsUp())
     {
         SlipUp();
         return;
     }
     controller.Previous();
     controller.Focus();
 }