Пример #1
0
 public WelcomeButton(string name, string text, Action func)
 {
     Name = name;
     Text = text;
     Func = func;
     Icon = null;
 }
Пример #2
0
 public WelcomeButton(Image icon, string text, Action func)
 {
     Icon = icon;
     Text = text;
     Func = func;
     Name = null;
 }
        void Update()
        {
            MediaFileVM file = ViewModel.FileSet.FirstOrDefault();

            if (ViewModel.HomeTeamShield != null)
            {
                homeShield    = ViewModel.HomeTeamShield.Scale(Constants.SHIELD_IMAGE_SIZE, Constants.SHIELD_IMAGE_SIZE);
                homeMaskColor = null;
            }
            else
            {
                homeShield    = App.Current.ResourcesLocator.LoadIcon("vas-default-shield", Constants.SHIELD_IMAGE_SIZE);
                homeMaskColor = Colors.DefaultShield;
            }
            if (ViewModel.AwayTeamShield != null)
            {
                awayShield    = ViewModel.AwayTeamShield.Scale(Constants.SHIELD_IMAGE_SIZE, Constants.SHIELD_IMAGE_SIZE);
                awayMaskColor = null;
            }
            else
            {
                awayShield    = App.Current.ResourcesLocator.LoadIcon("vas-default-shield", Constants.SHIELD_IMAGE_SIZE);
                awayMaskColor = Colors.DefaultShield;
            }
            description = FormatDesc();
        }
Пример #4
0
 public ButtonBinding(Button button, Func <IViewModel, Command> commandFunc,
                      object param = null, Image image = null, string text = null) : base(commandFunc, param)
 {
     this.button = button;
     this.image  = image;
     this.text   = text;
 }
Пример #5
0
        void DrawTeamShield(Image shield)
        {
            var point = new Point(pos.X, pos.Y + ((cellArea.Height - shield.Height) / 2));

            tk.DrawImage(point, shield.Width, shield.Height, shield, ScaleMode.AspectFit);
            pos             = new Point(pos.X + shield.Width, pos.Y);
            remainingWidth -= shield.Width;
        }
        void DrawTeamShield(Image shield, Color maskColor)
        {
            var point = new Point(pos.X, pos.Y + ((cellArea.Height - shield.Height) / 2));

            tk.FillColor = maskColor;
            tk.DrawImage(point, shield.Width, shield.Height, shield, ScaleMode.AspectFit, maskColor != null);
            pos             = new Point(pos.X + shield.Width, pos.Y);
            remainingWidth -= shield.Width;
        }
Пример #7
0
 void AddImage(IPlaylistElement element, bool prepend)
 {
     Pixbuf pix = Helpers.Misc.OpenImage (widget);
     if (pix != null) {
         var image = new Image (pix);
         PlaylistImage plimage = new PlaylistImage (image, new Time (5000));
         int index = playlist.Elements.IndexOf (element);
         if (!prepend) {
             index++;
         }
         playlist.Elements.Insert (index, plimage);
     }
 }
Пример #8
0
        void AddImage(IPlaylistElement element, bool prepend)
        {
            Image image = Helpers.Misc.OpenImage(widget);

            if (image != null)
            {
                PlaylistImage plimage = new PlaylistImage(image, new Time(5000));
                int           index   = playlist.Elements.IndexOf(element);
                if (!prepend)
                {
                    index++;
                }
                playlist.Elements.Insert(index, plimage);
            }
        }
Пример #9
0
        void Create()
        {
            // Check if some additional tools are available that should be added to our buttons list
            Populate();

            sizegroup = new SizeGroup(SizeGroupMode.Horizontal);

            // Our logo
            logoImage = new ImageView();

            Image text = App.Current.ResourcesLocator.LoadImage("images/logo/lm-text.svg");

            textImage = new ImageView(text);

            logoBox = new HBox();
            logoBox.Add(logoImage);
            logoBox.Add(textImage);

            //Adding the title
            vbox2.Add(logoBox);

            //Create necessary Hboxes for all icons
            List <HBox> hboxList = new List <HBox> ();

            for (int i = 0; i < NRows; i++)
            {
                Alignment al = new Alignment(0.5F, 0.5F, 0, 0);
                hboxList.Add(new HBox(true, Sizes.WelcomeIconsHSpacing));
                al.Add(hboxList [i]);
                vbox2.Add(al);
            }

            int hboxRow = 0;

            for (uint i = 0; i < buttons.Count; i++)
            {
                Widget b;
                if (i >= Sizes.WelcomeIconsFirstRow && hboxRow == 0)
                {
                    hboxRow++;
                }
                b = CreateButton(buttons [(int)i]);
                hboxList [hboxRow].Add(b);
            }

            ShowAll();
        }
 protected virtual void Update(int actual, int total, Image frame)
 {
     if (actual <= total) {
         progressbar.Text = Catalog.GetString ("Capturing frame: ") + actual + "/" + total;
         progressbar.Fraction = (double)actual / (double)total;
         if (frame != null) {
             if (image.Pixbuf != null)
                 image.Pixbuf.Dispose ();
             image.Pixbuf = frame.Value;
         }
     }
     if (actual == total) {
         progressbar.Text = Catalog.GetString ("Done");
         cancelbutton.Visible = false;
         okbutton.Visible = true;
     }
 }
 protected virtual void Update(int actual, int total, Image frame)
 {
     if (actual <= total)
     {
         progressbar.Text     = Catalog.GetString("Capturing frame: ") + actual + "/" + total;
         progressbar.Fraction = (double)actual / (double)total;
         if (frame != null)
         {
             if (image.Image != null)
             {
                 image.Image.Dispose();
             }
             image.Image = frame;
         }
     }
     if (actual == total)
     {
         progressbar.Text     = Catalog.GetString("Done");
         cancelbutton.Visible = false;
         okbutton.Visible     = true;
     }
 }
Пример #12
0
 /// <summary>
 /// Adds the specified panel.
 /// </summary>
 /// <param name="desc">Desc.</param>
 /// <param name="icon">Icon.</param>
 /// <param name="pane">Pane.</param>
 void AddPanel(string desc, Image icon, Widget pane)
 {
     prefsStore.AppendValues(icon, desc, pane);
 }
Пример #13
0
 public CellRendererImage(Image image)
 {
     Image = image;
 }