Example #1
0
        public PropertiesControl(CarrouselViewItemManager carrouselViewItemManager, CarrouselPropertiesUserControl uiComponent)
        {
            _uiComponent = uiComponent;
            _carrouselViewItemManager = carrouselViewItemManager;

            XmlNodeList config = Configuration.Instance.GetPluginConfiguration(ServerSideCarrouselDefinition.PluginId, ServerSideCarrouselDefinition.ConfigId);

            if (config != null)
            {
                _uiComponent.FillContent(config, carrouselViewItemManager.SelectedCarrouselId);
            }

            //set up SamplePropertiesControlForm event listeners as last thing, to avoid events during initialization
            _uiComponent.SourceSelectionChangedEvent += new EventHandler(SelectedSourceChangedHandler);
        }
Example #2
0
        /// <summary>
        /// Constructs a CarrouselViewItemUserControl item
        /// </summary>
        public CarrouselViewItemUserControl(CarrouselViewItemManager carrouselViewItemManager)
        {
            InitializeComponent();

            _carrouselViewItemManager = carrouselViewItemManager;
            Assembly assembly = Assembly.GetExecutingAssembly();
            string   name     = assembly.GetName().Name;

            _stringResourceManager           = new System.Resources.ResourceManager(assembly.GetName().Name + ".Resources.Strings", assembly);
            this.copyToolStripMenuItem.Image = new Bitmap(Image.FromStream(assembly.GetManifestResourceStream(name + ".Resources.Copy.png")));

            SetUpApplicationEventListeners();

            InLive = EnvironmentManager.Instance.Mode == Mode.ClientLive;

            _imageViewerControl = ClientControl.Instance.GenerateImageViewerControl();
            _imageViewerControl.EnableBrowseMode                  = false;
            _imageViewerControl.EnableSetupMode                   = false;
            _imageViewerControl.SuppressUpdateOnMotionOnly        = true;
            _imageViewerControl.EnableRecordedImageDisplayedEvent = false;
            _imageViewerControl.EnableSmartSearch                 = false;
            _imageViewerControl.EnableMouseControlledPtz          = false;
            _imageViewerControl.EnableScrollWheel                 = false;
            _imageViewerControl.EnableMiddleButtonClick           = false;

            _imageViewerControl.Dock = DockStyle.Fill;
            _imageViewerControlPanel.Controls.Add(_imageViewerControl);

            _imageViewerControl.Selected = _selected;
            _imageViewerControl.Hidden   = _hidden;

            _imageViewerControl.MouseHoverEvent       += _imageViewerControl_MouseHoverEvent;
            _imageViewerControl.MouseLeaveEvent       += _imageViewerControl_MouseLeaveEvent;
            _imageViewerControl.MouseMoveEvent        += _imageViewerControl_MouseMoveEvent;
            _imageViewerControl.MouseScrollWheelEvent += _imageViewerControl_MouseScrollWheelEvent;

            // init timers
            _loadCameraTimer.Interval = ((CarrouselViewItemManager)carrouselViewItemManager).DefaultTime * 1000;

            // set up timer event listeners
            _loadCameraTimer.Tick += new EventHandler(LoadCameraTimer_Tick);
        }
 public CarrouselPropertiesUserControl(CarrouselViewItemManager carrouselViewItemManager)
 {
     InitializeComponent();
     _carrouselViewItemManager = carrouselViewItemManager;
 }