Esempio n. 1
0
 /// <summary>
 /// Handler for the event that is raised to indicate
 /// that a scanner was just shown. Notify subscribers
 /// about this
 /// </summary>
 /// <param name="sender">event sender</param>
 /// <param name="arg">event args</param>
 private void ScannerCommon_EvtScannerShow(object sender, ScannerShowEventArg arg)
 {
     if (EvtScannerShow != null)
     {
         EvtScannerShow(sender, arg);
     }
 }
Esempio n. 2
0
        /// <summary>
        /// Event handler for when a scanner is shown.  Dock it to the dialog form.
        /// The scanner is a companion to the dialog
        /// </summary>
        /// <param name="sender">event sender</param>
        /// <param name="arg">event args</param>
        private void Instance_EvtScannerShow(object sender, ScannerShowEventArg arg)
        {
            if (AutoDockScanner &&
                Windows.GetVisible(_form) &&
                arg.Scanner != _form &&
                Windows.GetOpacity(_form) != 0.0f)
            {
                Windows.WindowPosition position = Context.AppWindowPosition;

                if (position == Windows.WindowPosition.CenterScreen)
                {
                    position = CoreGlobals.AppPreferences.ScannerPosition;
                }

                if (position == Windows.WindowPosition.CenterScreen)
                {
                    position = Windows.WindowPosition.MiddleRight;
                }

                if (((IPanel)arg.Scanner).PanelCommon.DisplayMode != DisplayModeTypes.Popup)
                {
                    Windows.DockWithScanner(_form, arg.Scanner as Form, position, false);
                }

                if (_form.Left < 0)
                {
                    _form.Left = 0;
                }

                Windows.SetTopMost(arg.Scanner as Form);
            }
        }
Esempio n. 3
0
 /// <summary>
 /// Raises an event to notify that the scanner was displayed
 /// </summary>
 private void notifyScannerShow()
 {
     if (ScannerForm.Visible && EvtScannerShow != null)
     {
         var arg = new ScannerShowEventArg(_scannerPanel);
         EvtScannerShow(_scannerPanel, arg);
     }
 }
Esempio n. 4
0
        /// <summary>
        /// Handler for the event that is raised to indicate
        /// that a scanner was just shown. Notify subscribers
        /// about this
        /// </summary>
        /// <param name="sender">event sender</param>
        /// <param name="arg">event args</param>
        private void ScannerCommon_EvtScannerShow(object sender, ScannerShowEventArg arg)
        {
            if (arg.Scanner.PanelClass == "Alphabet")
            {
                Windows.WidestScannerWidth = arg.Scanner.Form.Width;
            }

            if (EvtScannerShow != null)
            {
                EvtScannerShow(sender, arg);
            }
        }
Esempio n. 5
0
        /// <summary>
        /// Event handler for when a scanner is shown.  Dock it to the dialog
        /// form
        /// </summary>
        /// <param name="sender">event sender</param>
        /// <param name="arg">event args</param>
        private void Instance_EvtScannerShow(object sender, ScannerShowEventArg arg)
        {
            if (AutoDockScanner &&
                Windows.GetVisible(_form) &&
                arg.Scanner != _form &&
                Windows.GetOpacity(_form) != 0.0f)
            {
                Windows.WindowPosition position = Context.AppWindowPosition;
                if (position == Windows.WindowPosition.CenterScreen)
                {
                    position = CoreGlobals.AppPreferences.ScannerPosition;
                }
                if (position == Windows.WindowPosition.CenterScreen)
                {
                    position = Windows.WindowPosition.MiddleRight;
                }

                arg.Scanner.ScannerCommon.PositionSizeController.DockScanner(_form.Handle, position);
            }
        }
Esempio n. 6
0
 /// <summary>
 /// Invoked when companian scanner is displayed. Dock to it
 /// </summary>
 /// <param name="sender">event sender</param>
 /// <param name="arg">event args</param>
 private void Instance_EvtScannerShow(object sender, ScannerShowEventArg arg)
 {
     if (arg.Scanner != this)
     {
         _dockedWithForm = arg.Scanner.Form;
         dockToScanner(arg.Scanner.Form);
     }
 }
Esempio n. 7
0
 /// <summary>
 /// Raises an event to notify that the scanner was displayed
 /// </summary>
 private void notifyScannerShow()
 {
     if (ScannerForm.Visible && EvtScannerShow != null)
     {
         var arg = new ScannerShowEventArg(_scannerPanel);
         EvtScannerShow(_scannerPanel, arg);
     }
 }
Esempio n. 8
0
 /// <summary>
 /// Handler for the event that is raised to indicate
 /// that a scanner was just shown. Notify subscribers
 /// about this
 /// </summary>
 /// <param name="sender">event sender</param>
 /// <param name="arg">event args</param>
 private void ScannerCommon_EvtScannerShow(object sender, ScannerShowEventArg arg)
 {
     if (EvtScannerShow != null)
     {
         EvtScannerShow(sender, arg);
     }
 }
Esempio n. 9
0
        /// <summary>
        /// Handler for event raised when a scanner is displayed
        /// </summary>
        /// <param name="sender">event sender</param>
        /// <param name="e">event args</param>
        private void Instance_EvtScannerShow(object sender, ScannerShowEventArg arg)
        {
            SetTalkWindowPosition(arg.Scanner.Form);

            if (_talkWindowForm != null)
            {
                Windows.SetForegroundWindow(_talkWindowForm.Handle);
            }
        }
Esempio n. 10
0
 /// <summary>
 /// Inovked when the companian scanner is displayed.
 /// Dock this form to the scanner
 /// </summary>
 /// <param name="sender">event sender</param>
 /// <param name="e">event args</param>
 private void Instance_EvtScannerShow(object sender, ScannerShowEventArg arg)
 {
     if (arg.Scanner != this)
     {
         positionForm(arg.Scanner.Form);
     }
 }
Esempio n. 11
0
 /// <summary>
 /// Invoked when the companion scanner is shown. Dock
 /// this form to the scanner
 /// </summary>
 /// <param name="sender">sender</param>
 /// <param name="arg">args</param>
 private void AppPanelManager_EvtScannerShow(object sender, ScannerShowEventArg arg)
 {
     if (arg.Scanner != this)
     {
         dockToScanner(arg.Scanner.Form);
     }
 }
Esempio n. 12
0
        /// <summary>
        /// Event handler for when a scanner is shown.  Dock it to the dialog
        /// form
        /// </summary>
        /// <param name="sender">event sender</param>
        /// <param name="arg">event args</param>
        private void Instance_EvtScannerShow(object sender, ScannerShowEventArg arg)
        {
            if (AutoDockScanner &&
                Windows.GetVisible(_form) &&
                arg.Scanner != _form &&
                Windows.GetOpacity(_form) != 0.0f)
            {
                Windows.WindowPosition position = Context.AppWindowPosition;
                if (position == Windows.WindowPosition.CenterScreen)
                {
                    position = CoreGlobals.AppPreferences.ScannerPosition;
                }
                if (position == Windows.WindowPosition.CenterScreen)
                {
                    position = Windows.WindowPosition.MiddleRight;
                }

                arg.Scanner.ScannerCommon.PositionSizeController.DockScanner(_form.Handle, position);
            }
        }