internal override void Process()
        {
            DisplayableMessageArguments dma = new DisplayableMessageArguments(Program.frmMain.messageRendererPresentation1);

            string message = this.getElementValue("presentation");

            presentationStorage.Set(message);
            presentationStorage.Write();

            if (string.IsNullOrEmpty(message)) {
                dma.setArgument("message", MessageRendererPresentation.DEFAULT_PRESENTATION);
            } else {
                dma.setArgument("message", message);
            }

            try {
                dma.setArgument("defaultDelay", this.getElementValue("defaultDelay"));
            } catch (Exception)
            {
            }

            Program.canShoutout = true;
            Program.scheduler.add(dma);
            Program.scheduler.Run();
        }
 public void render(DisplayableMessageArguments args)
 {
     this.Invoke(new MethodInvoker(delegate
     {
         this.SetColors(args);
         this.SetMessage(args);
     }));
 }
        public void renderError(String message)
        {
            DisplayableMessageArguments args = new DisplayableMessageArguments(this);
            args.setArgument("message", "Error: " + message);
            args.setArgument("foreground", "white");
            args.setArgument("background", "red");

            this.render(args);
        }
        public void reset()
        {
            DisplayableMessageArguments dma = new DisplayableMessageArguments(this);
            dma.setArgument("message", "PRESENTATION\nWaiting for first slide.");
            this.slideIndex = 0;

            this.render(dma);
            processLabelTimer.Enabled = false;
        }
        public void render(DisplayableMessageArguments args)
        {
            this.Invoke(new MethodInvoker(delegate{
                this.resizeControls(); // to handle a nice reset();

                this.allocate(args);
                nextSlideTimer.Enabled = true;
                processLabelTimer.Enabled = true;
            }));
        }
Пример #6
0
        internal override void Process()
        {
            string file = this.GetElement("file").getValue();
            FileInfo fi = new FileInfo(file);

            DisplayableMessageArguments dm = new DisplayableMessageArguments(Program.frmMain.messageRendererVideo1);
            dm.setArgument("url", fi.FullName);
            Program.scheduler.add(dm);
            Program.scheduler.Run();

            //SqlCeCommand query = new SqlCeCommand("SELECT * FROM library", Program.conn);
        }
Пример #7
0
        internal MessageRenderer getRenderer(DisplayableMessageArguments msg)
        {
            foreach (MessageRenderer renderer in this.renderers)
            {
                if (renderer == msg.getControl())
                {
                    return renderer;
                }
            }

            Program.frmMain.messageRendererError1.renderError("Could not find renderer, it is not registered with the scheduler.");
            return Program.frmMain.messageRendererError1;
        }
Пример #8
0
        internal override void Process()
        {
            DisplayableMessageArguments dma = new DisplayableMessageArguments(Program.frmMain.messageRendererError1);
            dma.setArgument("message", "Shoutout: " + this.getElementValue("message"));
            dma.setArgument("forecolor", "black");
            dma.setArgument("backcolor", "yellow");
            dma.setArgument("fontsize", "40");
            dma.setTimespan(TimeSpan.FromSeconds(40));

            Program.canShoutout = false;

            Program.scheduler.add(dma);
            Program.scheduler.Run();
        }
        internal override void Process()
        {
            DisplayableMessageArguments dma = new DisplayableMessageArguments(Program.frmMain.messageRendererError1);
            dma.setArgument("message", this.getElementValue("message"));
            dma.setArgument("forecolor", this.getElementValue("forecolor"));
            dma.setArgument("backcolor", this.getElementValue("backcolor"));
            dma.setArgument("fontsize", this.getElementValue("fontsize"));

            int result = 0;
            if (int.TryParse(this.getElementValue("nextMessageTime"), out result)) {
                if (result > 0) {
              		dma.setTimespan(new TimeSpan(0, 0, result));
                }
            }

            Program.scheduler.add(dma);
            Program.scheduler.Run();
        }
        public void SetColors(DisplayableMessageArguments args)
        {
            Color foreground;
            Color background;

            try
            {
                foreground = Color.FromName(args.getArgument("forecolor"));
                background = Color.FromName(args.getArgument("backcolor"));
            }
            catch (Exception)
            {
                foreground = Color.FromName("red");
                background = Color.FromName("white");
            }

            this.ForeColor = foreground;
            this.BackColor = background;
        }
        private void allocate(DisplayableMessageArguments args)
        {
            string message = args.getArgument("message");

            this.slides.Clear();
            StringBuilder sb = new StringBuilder();

            try
            {
                PresentationSlide.defaultSlideDelaySeconds = Int32.Parse(args.getArgument("defaultDelay"));
            }
            catch (Exception)
            {
            }

            foreach (string slideContent in Regex.Split(message, SLIDE_SEPARATOR)) {
                PresentationSlide slide = new PresentationSlide(slideContent);
                slides.Add(slide);
            }
        }
        private void SetMessage(DisplayableMessageArguments args)
        {
            int fontSize = 15;

            try
            {
                fontSize = int.Parse(args.getArgument("fontsize"));
            }
            catch (Exception)
            { }

            this.Font = new Font(this.Font.FontFamily, fontSize);

            if (string.IsNullOrEmpty(args.getArgument("message")))
            {
                this.Text = "<empty message>!";
            }
            else
            {
                this.Text = args.getArgument("message");
            }
        }
Пример #13
0
        private static void ShowInitialMessage(FrmMain frmMain)
        {
            DisplayableMessageArguments dma = new DisplayableMessageArguments(frmMain.messageRendererWebBrowser);
            dma.setArgument("url", "http://localhost:" + HttpServer.port +  "/?servlet=ServletStartup");

            Program.scheduler.add(dma);
            Program.scheduler.Run();
        }
Пример #14
0
 internal void add(DisplayableMessageArguments displayableMessage)
 {
     this.queue.Enqueue(displayableMessage);
 }
Пример #15
0
 public void render(DisplayableMessageArguments msg)
 {
     this.axWindowsMediaPlayer1.URL = msg.getArgument("url");
     this.axWindowsMediaPlayer1.Ctlcontrols.play();
     this.axWindowsMediaPlayer1.uiMode = "none";
 }
 public void render(DisplayableMessageArguments msg)
 {
     string url = msg.getArgument("url");
     //this.Url = new Uri(url);
 }