Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the class.
 /// </summary>
 /// <param name="scannerCommon">ScannerForm object associated with the form</param>
 internal ScannerPositionSizeController(ScannerCommon scannerCommon)
 {
     AutoPosition = true;
     _prevAutoPositionScannerValue = AutoPosition;
     ScaleFactor            = ScaleFactorInit;
     _scannerCommon         = scannerCommon;
     _form                  = scannerCommon.ScannerForm;
     _form.LocationChanged += FormOnLocationChanged;
 }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the class.
 /// </summary>
 /// <param name="scannerCommon">ScannerForm object associated with the form</param>
 internal ScannerPositionSizeController(ScannerCommon scannerCommon)
 {
     AutoPosition   = true;
     ManualPosition = Context.AppWindowPosition;
     _prevAutoPositionScannerValue = AutoPosition;
     ScaleFactor            = ScaleFactorInit;
     _scannerCommon         = scannerCommon;
     _form                  = scannerCommon.ScannerForm;
     _dock                  = false;
     _form.LocationChanged += FormOnLocationChanged;
     _form.ResizeEnd       += _form_ResizeEnd;
     _form.ResizeBegin     += FormOnResizeBegin;
     _form.Shown           += _form_Shown;
 }
Beispiel #3
0
        /// <summary>
        /// Performs initialization
        /// </summary>
        /// <param name="startupArg">Startup arguments</param>
        /// <returns>true on success</returns>
        public virtual bool Initialize(StartupArg startupArg)
        {
            PanelClass = startupArg.PanelClass;

            _scannerCommon = new ScannerCommon(this)
            {
                PositionSizeController = { AutoPosition = false }
            };

            if (!_scannerCommon.Initialize(startupArg))
            {
                return(false);
            }

            _rootWidget = PanelCommon.RootWidget;

            return(true);
        }
Beispiel #4
0
        /// <summary>
        /// Performs initialization
        /// </summary>
        /// <param name="arg">Startup arguments</param>
        /// <returns>true on success</returns>
        public bool Initialize(StartupArg arg)
        {
            startupArg        = arg;
            PanelClass        = startupArg.PanelClass;
            startupCommandArg = startupArg.Arg;

            scannerCommon = new ScannerCommon(this);

            if (!scannerCommon.Initialize(startupArg))
            {
                Log.Debug("Could not initialize form " + Name);
                return(false);
            }

            rootWidget = scannerCommon.GetRootWidget();
            onInitialize();
            return(true);
        }
Beispiel #5
0
        /// <summary>
        /// Initialzes this class
        /// </summary>
        /// <param name="startupArg">startup args</param>
        /// <returns>true on success</returns>
        public bool Initialize(StartupArg startupArg)
        {
            _scannerCommon = new ScannerCommon(this) { PositionSizeController = { AutoPosition = true } };

            if (!_scannerCommon.Initialize(startupArg))
            {
                Log.Debug("Could not initialize form " + Name);
                return false;
            }

            PanelManager.Instance.EvtScannerShow += Instance_EvtScannerShow;
            PanelManager.Instance.EvtScannerClosed += Instance_EvtScannerClosed;

            return true;
        }
Beispiel #6
0
        /// <summary>
        /// Initialize the class
        /// </summary>
        /// <param name="arg">startup arg</param>
        /// <returns>true on success</returns>
        public bool Initialize(StartupArg arg)
        {
            Log.Debug();

            PanelClass = arg.PanelClass;
            startupCommandArg = arg.Arg;
            startupArg = arg;

            _scannerHelper = new ScannerHelper(this, startupArg);
            scannerCommon = new ScannerCommon(this);

            if (!scannerCommon.Initialize(startupArg))
            {
                Log.Debug("Could not initialize form " + Name);
                return false;
            }

            rootWidget = scannerCommon.GetRootWidget();
            return true;
        }
Beispiel #7
0
        /// <summary>
        /// Call this in the Initialize function of the Alphabet scanner
        /// </summary>
        /// <param name="startupArg">startup arguments</param>
        /// <returns>true on success</returns>
        public bool Initialize(StartupArg startupArg)
        {
            PanelClass = startupArg.PanelClass;

            _scannerCommon = new ScannerCommon(_scannerPanel);
            _scannerHelper = new ScannerHelper(_scannerPanel, startupArg);

            if (!_scannerCommon.Initialize(startupArg))
            {
                Log.Debug("Could not initialize form " + _form.Name);
                return false;
            }

            _rootWidget = _scannerCommon.GetRootWidget();

            return true;
        }
Beispiel #8
0
        /// <summary>
        /// Initialzes the scanner
        /// </summary>
        /// <param name="startupArg">Starting arguments</param>
        /// <returns>true on success</returns>
        public bool Initialize(StartupArg startupArg)
        {
            _scannerCommon = new ScannerCommon(this);
            _scannerHelper = new ScannerHelper(this, startupArg);

            if (!_scannerCommon.Initialize(startupArg))
            {
                Log.Debug("Could not initialize form " + Name);
                return false;
            }

            Context.AppPanelManager.PausePanelChangeRequests();

            return true;
        }
Beispiel #9
0
        /// <summary>
        /// Initializes the class
        /// </summary>
        /// <param name="startupArg">startup parameter</param>
        /// <returns></returns>
        public bool Initialize(StartupArg startupArg)
        {
            Log.Debug();
            PanelClass = startupArg.PanelClass;
            startupCommandArg = startupArg.Arg;
            this.startupArg = startupArg;

            _scannerHelper = new ScannerHelper(this, startupArg);
            scannerCommon = new ScannerCommon(this);

            if (!scannerCommon.Initialize(startupArg))
            {
                return false;
            }

            rootWidget = scannerCommon.GetRootWidget();
            return true;
        }
Beispiel #10
0
        /// <summary>
        /// Initialzes the scanner
        /// </summary>
        /// <param name="startupArg">Starting arguments</param>
        /// <returns>true on success</returns>
        public bool Initialize(StartupArg startupArg)
        {
            _scannerCommon = new ScannerCommon(this);
            _scannerHelper = new ScannerHelper(this, startupArg);

            if (!_scannerCommon.Initialize(startupArg))
            {
                Log.Debug("Could not initialize form " + Name);
                return false;
            }

            _scannerCommon.CreateStatusBar();

            return true;
        }
 /// <summary>
 /// Initializes a new instance of the class.
 /// </summary>
 /// <param name="scannerCommon">ScannerForm object associated with the form</param>
 internal ScannerPositionSizeController(ScannerCommon scannerCommon)
 {
     AutoPosition = true;
     _prevAutoPositionScannerValue = AutoPosition;
     ScaleFactor = ScaleFactorInit;
     _scannerCommon = scannerCommon;
     _form = scannerCommon.ScannerForm;
     _form.LocationChanged += FormOnLocationChanged;
 }
 /// <summary>
 /// Initializes a new instance of the class.
 /// </summary>
 /// <param name="scannerCommon">ScannerForm object associated with the form</param>
 internal ScannerPositionSizeController(ScannerCommon scannerCommon)
 {
     AutoPosition = true;
     ManualPosition = Context.AppWindowPosition;
     _prevAutoPositionScannerValue = AutoPosition;
     ScaleFactor = ScaleFactorInit;
     _scannerCommon = scannerCommon;
     _form = scannerCommon.ScannerForm;
     _dock = false;
     _form.LocationChanged += FormOnLocationChanged;
     _form.ResizeEnd += _form_ResizeEnd;
     _form.ResizeBegin += FormOnResizeBegin;
     _form.Shown += _form_Shown;
 }
        /// <summary>
        /// Initializes the form
        /// </summary>
        /// <param name="startupArg">Startup arg</param>
        /// <returns>true on success</returns>
        public bool Initialize(StartupArg startupArg)
        {
            _scannerCommon = new ScannerCommon(this);

            if (!_scannerCommon.Initialize(startupArg))
            {
                Log.Debug("Could not initialize form " + Name);
                return false;
            }

            return true;
        }