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");
            }
        }
Exemplo n.º 4
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);
 }