Esempio n. 1
0
                protected override void CreateChildElements()
                {
                    _AHK    ahk               = new _AHK();
                    _Images img               = new _Images();
                    string  HeartImage        = ahk.AppDir() + "\\ico\\heart.png";
                    string  HeartClickedImage = ahk.AppDir() + "\\ico\\heartClicked.png";

                    base.CreateChildElements();
                    likeButton.NotifyParentOnMouseInput = true;
                    likeButton.Image  = HeartImage.ToImage(30, 30);
                    likeButton.Click += likeButton_Click;
                    likeButton.EnableElementShadow = false;
                    likeButton.Margin = new Padding(10, 0, 10, 0);
                    this.Children.Add(likeButton);
                }
Esempio n. 2
0
                public override void Synchronize()
                {
                    _AHK    ahk               = new _AHK();
                    _Images img               = new _Images();
                    string  HeartImage        = ahk.AppDir() + "\\ico\\heart.png";
                    string  HeartClickedImage = ahk.AppDir() + "\\ico\\heartClicked.png";


                    base.Synchronize();
                    if (this.Data.Tag != null && (bool)this.Data.Tag == true)
                    {
                        this.likeButton.Image = HeartClickedImage.ToImage(30, 30);
                    }
                    else
                    {
                        this.likeButton.Image = HeartImage.ToImage(30, 30);
                    }
                }
Esempio n. 3
0
        public void StatusBar_Icon(string ICOPath, int section = 1)
        {
            _Images img = new _Images();

            if (section == 1)
            {
                // show icon in bottom left statusbar (works)
                try { statusPanel.Icon = img.ImagePath_to_Icon(ICOPath, 32); }
                catch (Exception ex) { ahk.MsgBox(ex.Message); }
            }

            if (section == 2)
            {
                // show icon in bottom right statusbar (works)
                try { datetimePanel.Icon = img.ImagePath_to_Icon(ICOPath, 32); }
                catch (Exception ex) { MessageBox.Show(ex.Message); }
            }
        }