Esempio n. 1
0
        //Constructor
        public TrayIcon(string aIconName, String aRolloverText, DataLink[] aTargetData, Color BackgroundColor, Color ForegroundColor)
        {
            _iconName = aIconName;
            _rolloverText = aRolloverText;

            renderer = new RendererBasic();
            ((RendererBasic)renderer).BackgroundColour = BackgroundColor;
            ((RendererBasic)renderer).ForegroundColour = ForegroundColor;
            ((RendererBasic)renderer).UseAlpha = true;

            if (aTargetData != null)
            {
                foreach (DataLink dataLink in aTargetData)
                {
                    AddDataSource(dataLink);
                }
            }

            MakeTrayIcon();
        }
Esempio n. 2
0
        public void ChangeRenderer(string NewRenderer)
        {
            lock (IconManager._iconLock)
            {
                switch (NewRenderer)
                {
                    case "Basic":
                        renderer.Dispose();
                        renderer = new RendererBasic();
                        break;

                    case "History":
                        renderer.Dispose();
                        renderer = new RendererHistory();
                        break;

                    case "Image":
                        renderer.Dispose();
                        renderer = new RendererImage();
                        break;
                }
            }
        }