コード例 #1
0
ファイル: frmDataLink.cs プロジェクト: RiskyKen/tray-usage
 public frmDataLink(TrayIcon aTargetIcon)
 {
     InitializeComponent();
     TargetIcon = aTargetIcon;
     PopulateSourceDataTree();
     PopulateTargetDataList();
     this.Icon = Properties.Resources.tray;
 }
コード例 #2
0
ファイル: frmDataLink.cs プロジェクト: RiskyKen/tray-usage
 public frmDataLink(TrayIcon aTargetIcon)
 {
     InitializeComponent();
     TargetIcon = aTargetIcon;
     PopulateSourceDataTree();
     PopulateTargetDataList();
     this.Icon = Properties.Resources.tray;
 }
コード例 #3
0
ファイル: IconManager.cs プロジェクト: RiskyKen/tray-usage
 //Move an icon down.
 public static void MoveIconDown(Int32 index)
 {
     lock (_iconLock)
     {
         TrayIcon tempIcon = trayIcons[index];
         trayIcons[index]     = trayIcons[index + 1];
         trayIcons[index + 1] = tempIcon;
         ReshowIcons();
     }
 }
コード例 #4
0
        public frmRenderOptionsImage(TrayIcon targetIcon)
        {
            InitializeComponent();
            this.targetIcon = targetIcon;
            targetRender = (RendererImage)targetIcon.renderer;

            textBoxBgImage.Text = targetRender.BackgroundImagePath;
            textBoxActiveImage.Text = targetRender.ActiveImagePath;
            textBoxFgImage.Text = targetRender.ForegroundImagePath;

            comboBoxDirection.SelectedIndex = (byte)targetRender.RenderDirection - 1;
        }
コード例 #5
0
        public frmRenderOptionsImage(TrayIcon targetIcon)
        {
            InitializeComponent();
            this.targetIcon = targetIcon;
            targetRender    = (RendererImage)targetIcon.renderer;

            textBoxBgImage.Text     = targetRender.BackgroundImagePath;
            textBoxActiveImage.Text = targetRender.ActiveImagePath;
            textBoxFgImage.Text     = targetRender.ForegroundImagePath;

            comboBoxDirection.SelectedIndex = (byte)targetRender.RenderDirection - 1;
        }
コード例 #6
0
        public frmRenderOptionsHistory(TrayIcon TargetIcon)
        {
            InitializeComponent();
            this.Icon = Properties.Resources.tray;

            for (Int32 i = 0; i <= Globals.colorPresets.GetUpperBound(0); i++)
            {
                colorPer.Items.Add(i.ToString());
            }

            _targetIcon = TargetIcon;
            _targetRender = (RendererHistory)TargetIcon.renderer;
            LoadColourPics();
            comboBoxDirection.SelectedIndex = (byte)_targetRender.RenderDirection - 1;
            chkUseAlpha.Checked = _targetRender.UseAlpha;
        }
コード例 #7
0
        public frmRenderOptionsBasic(TrayIcon aTargetIcon)
        {
            InitializeComponent();
            this.Icon = Properties.Resources.tray;

            for (Int32 i = 0; i <= Globals.colorPresets.GetUpperBound(0); i++)
            {
                colorPer.Items.Add(i.ToString());
            }

            TargetIcon   = aTargetIcon;
            TargetRender = (RendererBasic)TargetIcon.renderer;
            LoadColourPics();
            comboBoxDirection.SelectedIndex = (byte)TargetRender.RenderDirection - 1;
            chkUseAlpha.Checked             = TargetRender.UseAlpha;
        }
コード例 #8
0
ファイル: IconManager.cs プロジェクト: RiskyKen/tray-usage
        //Remove an icon from the TrayIcons array.
        public static void RemoveIcon(Int32 aIconIndex)
        {
            lock (_iconLock)
            {
                if (trayIcons == null)
                {
                    return;
                }

                if (trayIcons.GetUpperBound(0) == 0)
                {
                    trayIcons[0].Dispose();
                    trayIcons = null;
                }
                else
                {
                    TrayIcon[] NewIcons    = new TrayIcon[trayIcons.GetUpperBound(0)];
                    Int32      OffsetCount = 0;
                    for (Int32 i = 0; i <= trayIcons.GetUpperBound(0); i++)
                    {
                        if (i != aIconIndex)
                        {
                            NewIcons[OffsetCount] = trayIcons[i];
                            OffsetCount++;
                        }
                        else
                        {
                            trayIcons[i].Dispose();
                            trayIcons[i] = null;
                        }
                    }
                    trayIcons = NewIcons;
                }
                CheckDummyIconVisibliy();
                ReshowIcons();
            }
        }
コード例 #9
0
ファイル: IconManager.cs プロジェクト: RiskyKen/tray-usage
        //Remove an icon from the TrayIcons array.
        public static void RemoveIcon(Int32 aIconIndex)
        {
            lock (_iconLock)
            {
                if (trayIcons == null) { return; }

                if (trayIcons.GetUpperBound(0) == 0)
                {
                    trayIcons[0].Dispose();
                    trayIcons = null;
                }
                else
                {
                    TrayIcon[] NewIcons = new TrayIcon[trayIcons.GetUpperBound(0)];
                    Int32 OffsetCount = 0;
                    for (Int32 i = 0; i <= trayIcons.GetUpperBound(0); i++)
                    {
                        if (i != aIconIndex)
                        {
                            NewIcons[OffsetCount] = trayIcons[i];
                            OffsetCount++;
                        }
                        else
                        {
                            trayIcons[i].Dispose();
                            trayIcons[i] = null;
                        }
                    }
                    trayIcons = NewIcons;
                }
                CheckDummyIconVisibliy();
                ReshowIcons();
            }
        }