public frmDataLink(TrayIcon aTargetIcon) { InitializeComponent(); TargetIcon = aTargetIcon; PopulateSourceDataTree(); PopulateTargetDataList(); this.Icon = Properties.Resources.tray; }
//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(); } }
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; }
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; }
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; }
//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(); } }