Exemplo n.º 1
0
        public AppletMediaJukebox(MediaJukeboxAutomation mj, MainInterface ui)
        {
            MJ = mj;
            UI = ui;
            LgLcdLib = new Lglcd();

            LglcdApplet = new Applet()
            {
                SupportedDevices = SupportedDevices.QVGA,
                Title = "Media Jukebox"
            };
            QvgaDevice = new Device<QvgaImageUpdater>()
            {
                Applet = LglcdApplet
            };

            LglcdApplet.DeviceArrival += new EventHandler<DeviceEventArgs>(LglcdApplet_DeviceArrival);
            LglcdApplet.DeviceRemoval += new EventHandler<DeviceEventArgs>(LglcdApplet_DeviceRemoval);

            m_RaisePriorityUntil = DateTime.Now.Add(Properties.Settings.Default.RaisedPriorityTimeout);

            /*try
            {
                Initialize();
                InitializeLcdForm();
                UpdateValues();
                UpdateGraphics();
            }
            catch (Exception e)
            {
                System.Windows.Forms.MessageBox.Show("A Fatal error has occured while creating plugin:-" + e.Message +
                        "\n The Failure Occured" +
                        "\n In Class Object " + e.Source +
                        "\n when calling Method " + e.TargetSite +
                        "\n \n The following Inner Exception was caused" + e.InnerException +
                        "\n \n The Stack Trace Follows: \n\n" + e.StackTrace);
            }*/

            TrackChange += new EventHandler<MediaJukeboxEventArgs>(AppletMediaJukebox_TrackChange);
            PlayerStateChange += new EventHandler<MediaJukeboxEventArgs>(AppletMediaJukebox_PlayerStateChange);

            InitializeLcdForm();

            m_InitializationTimer = new Timer(new TimerCallback(TimerHandler), null, TimeSpan.Zero, TimeSpan.FromSeconds(1.0));
        }
Exemplo n.º 2
0
        public AppletMediaJukebox(MediaJukeboxAutomation mj, MainInterface ui)
        {
            MJ       = mj;
            UI       = ui;
            LgLcdLib = new Lglcd();

            LglcdApplet = new Applet()
            {
                SupportedDevices = SupportedDevices.QVGA,
                Title            = "Media Jukebox"
            };
            QvgaDevice = new Device <QvgaImageUpdater>()
            {
                Applet = LglcdApplet
            };

            LglcdApplet.DeviceArrival += new EventHandler <DeviceEventArgs>(LglcdApplet_DeviceArrival);
            LglcdApplet.DeviceRemoval += new EventHandler <DeviceEventArgs>(LglcdApplet_DeviceRemoval);

            m_RaisePriorityUntil = DateTime.Now.Add(Properties.Settings.Default.RaisedPriorityTimeout);

            /*try
             * {
             *  Initialize();
             *  InitializeLcdForm();
             *  UpdateValues();
             *  UpdateGraphics();
             * }
             * catch (Exception e)
             * {
             *  System.Windows.Forms.MessageBox.Show("A Fatal error has occured while creating plugin:-" + e.Message +
             *          "\n The Failure Occured" +
             *          "\n In Class Object " + e.Source +
             *          "\n when calling Method " + e.TargetSite +
             *          "\n \n The following Inner Exception was caused" + e.InnerException +
             *          "\n \n The Stack Trace Follows: \n\n" + e.StackTrace);
             * }*/

            TrackChange       += new EventHandler <MediaJukeboxEventArgs>(AppletMediaJukebox_TrackChange);
            PlayerStateChange += new EventHandler <MediaJukeboxEventArgs>(AppletMediaJukebox_PlayerStateChange);

            InitializeLcdForm();

            m_InitializationTimer = new Timer(new TimerCallback(TimerHandler), null, TimeSpan.Zero, TimeSpan.FromSeconds(1.0));
        }