├── .gitignore ├── DirectXHost ├── App.config ├── Constants.cs ├── DirectXHost.cs ├── DirectXHost.csproj ├── Extensions │ └── Direct2DExt.cs ├── GraphicsD3D11.cs ├── Program.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx └── Resources │ ├── App.ico │ ├── DiscordHost.png │ └── directx-11-logo.png ├── DiscordOverlayHost.sln ├── DiscordOverlayHost ├── App.config ├── Controls │ ├── GradientPanel.Designer.cs │ ├── GradientPanel.cs │ ├── ImageButton.Designer.cs │ └── ImageButton.cs ├── DiscordOverlayHost.csproj ├── Forms │ ├── AboutDialog.Designer.cs │ ├── AboutDialog.cs │ ├── AboutDialog.resx │ ├── ConfigUIForm.Designer.cs │ ├── ConfigUIForm.cs │ ├── ConfigUIForm.resx │ ├── frmConfiguration.Designer.cs │ ├── frmConfiguration.cs │ └── frmConfiguration.resx ├── HostApplicationContext.cs ├── Program.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── Resources │ ├── 109_AllAnnotations_Help_24x24_72.png │ ├── 109_AllAnnotations_Help_24x24_72_Dark.png │ ├── 109_AllAnnotations_Help_24x24_72_Dim.png │ ├── 305_Close_24x24_72.png │ ├── 305_Close_24x24_Red.png │ ├── 305_Close_24x24_Red_Dark.png │ ├── App.ico │ ├── DirectXHost_256.png │ ├── Discord-Logo-Color.png │ ├── Discord-Logo.png │ ├── Discord-Wordmark-White.png │ ├── DiscordHost.png │ ├── DiscordHost_48.png │ ├── GL.png │ ├── Microsoft-DirectX-logo.png │ ├── OpenGLHost_256.png │ ├── OpenGL_100px_Nov14.png │ ├── OpenTK_logo.jpg │ ├── SharpDXlogo.png │ ├── gear_32xLG.png │ ├── gear_32xLG_Dark.png │ ├── gear_32xLG_Dim.png │ ├── gear_32xLG_Lit.png │ └── logo.ico ├── TrayNotification │ └── TrayNotificationManager.cs └── Win32 │ └── NativeMethods.cs ├── OpenGlHost ├── OpenGlHost.cs ├── OpenGlHost.csproj ├── Program.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx └── Resources │ ├── App.ico │ └── DiscordHost.png └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## Eclipse 3 | ################# 4 | 5 | *.pydevproject 6 | .project 7 | .metadata 8 | bin/ 9 | tmp/ 10 | *.tmp 11 | *.bak 12 | *.swp 13 | *~.nib 14 | local.properties 15 | .classpath 16 | .settings/ 17 | .loadpath 18 | 19 | # External tool builders 20 | .externalToolBuilders/ 21 | 22 | # Locally stored "Eclipse launch configurations" 23 | *.launch 24 | 25 | # CDT-specific 26 | .cproject 27 | 28 | # PDT-specific 29 | .buildpath 30 | 31 | 32 | ################# 33 | ## Visual Studio 34 | ################# 35 | 36 | ## Ignore Visual Studio temporary files, build results, and 37 | ## files generated by popular Visual Studio add-ons. 38 | 39 | # User-specific files 40 | *.suo 41 | *.user 42 | *.sln.docstates 43 | 44 | # Build results 45 | 46 | [Dd]ebug/ 47 | [Rr]elease/ 48 | x64/ 49 | build/ 50 | [Bb]in/ 51 | [Oo]bj/ 52 | 53 | # MSTest test Results 54 | [Tt]est[Rr]esult*/ 55 | [Bb]uild[Ll]og.* 56 | 57 | *_i.c 58 | *_p.c 59 | *.ilk 60 | *.meta 61 | *.obj 62 | *.pch 63 | *.pdb 64 | *.pgc 65 | *.pgd 66 | *.rsp 67 | *.sbr 68 | *.tlb 69 | *.tli 70 | *.tlh 71 | *.tmp 72 | *.tmp_proj 73 | *.log 74 | *.vspscc 75 | *.vssscc 76 | .builds 77 | *.pidb 78 | *.log 79 | *.scc 80 | 81 | # Visual C++ cache files 82 | ipch/ 83 | *.aps 84 | *.ncb 85 | *.opensdf 86 | *.sdf 87 | *.cachefile 88 | 89 | # Visual Studio profiler 90 | *.psess 91 | *.vsp 92 | *.vspx 93 | 94 | # Guidance Automation Toolkit 95 | *.gpState 96 | 97 | # ReSharper is a .NET coding add-in 98 | _ReSharper*/ 99 | *.[Rr]e[Ss]harper 100 | 101 | # TeamCity is a build add-in 102 | _TeamCity* 103 | 104 | # DotCover is a Code Coverage Tool 105 | *.dotCover 106 | 107 | # NCrunch 108 | *.ncrunch* 109 | .*crunch*.local.xml 110 | 111 | # Installshield output folder 112 | [Ee]xpress/ 113 | 114 | # DocProject is a documentation generator add-in 115 | DocProject/buildhelp/ 116 | DocProject/Help/*.HxT 117 | DocProject/Help/*.HxC 118 | DocProject/Help/*.hhc 119 | DocProject/Help/*.hhk 120 | DocProject/Help/*.hhp 121 | DocProject/Help/Html2 122 | DocProject/Help/html 123 | 124 | # Click-Once directory 125 | publish/ 126 | 127 | # Publish Web Output 128 | *.Publish.xml 129 | *.pubxml 130 | *.publishproj 131 | 132 | # NuGet Packages Directory 133 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line 134 | #packages/ 135 | 136 | # Windows Azure Build Output 137 | csx 138 | *.build.csdef 139 | 140 | # Windows Store app package directory 141 | AppPackages/ 142 | 143 | # Others 144 | sql/ 145 | *.Cache 146 | ClientBin/ 147 | [Ss]tyle[Cc]op.* 148 | ~$* 149 | *~ 150 | *.dbmdl 151 | *.[Pp]ublish.xml 152 | *.pfx 153 | *.publishsettings 154 | 155 | # RIA/Silverlight projects 156 | Generated_Code/ 157 | 158 | # Backup & report files from converting an old project file to a newer 159 | # Visual Studio version. Backup files are not needed, because we have git ;-) 160 | _UpgradeReport_Files/ 161 | Backup*/ 162 | UpgradeLog*.XML 163 | UpgradeLog*.htm 164 | 165 | # SQL Server files 166 | App_Data/*.mdf 167 | App_Data/*.ldf 168 | 169 | ############# 170 | ## Windows detritus 171 | ############# 172 | 173 | # Windows image file caches 174 | Thumbs.db 175 | ehthumbs.db 176 | 177 | # Folder config file 178 | Desktop.ini 179 | 180 | # Recycle Bin used on file shares 181 | $RECYCLE.BIN/ 182 | 183 | # Mac crap 184 | .DS_Store 185 | 186 | 187 | ############# 188 | ## Python 189 | ############# 190 | 191 | *.py[cod] 192 | 193 | # Packages 194 | *.egg 195 | *.egg-info 196 | dist/ 197 | build/ 198 | eggs/ 199 | parts/ 200 | var/ 201 | sdist/ 202 | develop-eggs/ 203 | .installed.cfg 204 | 205 | # Installer logs 206 | pip-log.txt 207 | 208 | # Unit test / coverage reports 209 | .coverage 210 | .tox 211 | 212 | #Translations 213 | *.mo 214 | 215 | #Mr Developer 216 | .mr.developer.cfg 217 | -------------------------------------------------------------------------------- /DirectXHost/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /DirectXHost/Constants.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace DirectXHost 8 | { 9 | public static class Constants 10 | { 11 | public const string WindowTitle = "Discord Overlay Host: DirectX"; 12 | public const int StartWidth = 350; 13 | public const int StartHeight = 450; 14 | public const int RefreshRate = 60; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /DirectXHost/DirectXHost.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | using SharpDX.Windows; 4 | using System.Drawing; 5 | 6 | namespace DirectXHost 7 | { 8 | public class DirectXHost : IDisposable 9 | { 10 | private RenderForm _dxForm; 11 | private GraphicsD3D11 _graphics; 12 | private bool UserResized { get; set; } 13 | private Size ClientSize { get; set; } 14 | 15 | public bool IsDisposed { get; private set; } 16 | 17 | #region Events 18 | public event EventHandler HostWindowClosed; 19 | public event EventHandler HostWindowCreated; 20 | protected void OnHostWindowCreated() 21 | { 22 | if (HostWindowCreated != null) 23 | { 24 | HostWindowCreated(this._dxForm, new EventArgs()); 25 | } 26 | } 27 | 28 | protected void OnHostWindowClosed() 29 | { 30 | if (HostWindowClosed != null) 31 | { 32 | HostWindowClosed(this._dxForm, new EventArgs()); 33 | } 34 | } 35 | #endregion 36 | 37 | public DirectXHost() 38 | { 39 | try 40 | { 41 | InitializeRenderForm(); 42 | _graphics = new GraphicsD3D11(); 43 | _graphics.Initialise(_dxForm, true); 44 | _dxForm.UserResized += (sender, args) => 45 | { 46 | var renderForm = sender as RenderForm; 47 | ClientSize = new Size(renderForm.ClientSize.Width, renderForm.ClientSize.Height); 48 | UserResized = true; 49 | }; 50 | LoadContent(); 51 | } 52 | catch (Exception ex) 53 | { 54 | MessageBox.Show(string.Format("Exception loading DirectX host window.\r\n{0}", ex.Message), "DirectX Host", MessageBoxButtons.OK, MessageBoxIcon.Error); 55 | } 56 | } 57 | 58 | public void Exit() 59 | { 60 | throw new NotImplementedException(); 61 | } 62 | 63 | public void Run() 64 | { 65 | try 66 | { 67 | RenderLoop.Run(_dxForm, RenderCallback); 68 | } 69 | catch (Exception ex) 70 | { 71 | MessageBox.Show(string.Format("Exception running DirectX host window.\r\n{0}", ex.Message), "DirectX Host", MessageBoxButtons.OK, MessageBoxIcon.Error); 72 | } 73 | } 74 | 75 | private void RenderCallback() 76 | { 77 | Update(); 78 | Draw(); 79 | } 80 | 81 | private void InitializeRenderForm() 82 | { 83 | _dxForm = new RenderForm(Constants.WindowTitle); 84 | _dxForm.HandleCreated += WindowHandleCreated; 85 | _dxForm.HandleDestroyed += WindowHandleDestroyed; 86 | _dxForm.ClientSize = new System.Drawing.Size(Constants.StartWidth, Constants.StartHeight); 87 | _dxForm.StartPosition = FormStartPosition.CenterScreen; 88 | } 89 | 90 | private void WindowHandleDestroyed(object sender, EventArgs e) 91 | { 92 | this.Dispose(); 93 | this.IsDisposed = true; 94 | OnHostWindowClosed(); 95 | } 96 | 97 | private void WindowHandleCreated(object sender, EventArgs e) 98 | { 99 | OnHostWindowCreated(); 100 | } 101 | 102 | private void LoadContent() 103 | { 104 | //To add content to the form if we want to 105 | } 106 | 107 | public void Update() 108 | { 109 | if (UserResized) 110 | { 111 | _graphics.ResizeGraphics(ClientSize.Width, ClientSize.Height); 112 | UserResized = false; 113 | } 114 | } 115 | 116 | public void Draw() 117 | { 118 | _graphics.ClearRenderTargetView(); 119 | 120 | _graphics.PresentSwapChain(); 121 | } 122 | 123 | #region IDisposable Support 124 | 125 | protected virtual void Dispose(bool disposing) 126 | { 127 | if (!IsDisposed) 128 | { 129 | if (disposing) 130 | { 131 | // TODO: dispose managed state (managed objects). 132 | _dxForm.Dispose(); 133 | } 134 | 135 | _graphics.Dispose(); 136 | IsDisposed = true; 137 | } 138 | } 139 | 140 | // TODO: override a finalizer only if Dispose(bool disposing) above has code to free unmanaged resources. 141 | ~DirectXHost() { 142 | // Do not change this code. Put cleanup code in Dispose(bool disposing) above. 143 | Dispose(false); 144 | } 145 | 146 | // This code added to correctly implement the disposable pattern. 147 | public void Dispose() 148 | { 149 | // Do not change this code. Put cleanup code in Dispose(bool disposing) above. 150 | Dispose(true); 151 | // TODO: uncomment the following line if the finalizer is overridden above. 152 | GC.SuppressFinalize(this); 153 | } 154 | #endregion 155 | 156 | } 157 | } 158 | -------------------------------------------------------------------------------- /DirectXHost/DirectXHost.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {A2948F55-87D4-4512-8805-E12EF75C8B45} 8 | WinExe 9 | Properties 10 | DirectXHost 11 | DirectXHost 12 | v4.5.2 13 | 512 14 | true 15 | 16 | 17 | AnyCPU 18 | true 19 | full 20 | false 21 | ..\DiscordOverlayHost\bin\Debug\Hosts\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | AnyCPU 28 | pdbonly 29 | true 30 | ..\DiscordOverlayHost\bin\Release\Hosts\ 31 | TRACE 32 | prompt 33 | 4 34 | false 35 | 36 | 37 | DirectXHost.Program 38 | 39 | 40 | Resources\App.ico 41 | 42 | 43 | 44 | 45 | 46 | 47 | D:\Development\SharpDX\Bin\Desktop\SharpDX.dll 48 | 49 | 50 | D:\Development\SharpDX\Bin\Desktop\SharpDX.D3DCompiler.dll 51 | 52 | 53 | D:\Development\SharpDX\Bin\Desktop\SharpDX.Desktop.dll 54 | 55 | 56 | D:\Development\SharpDX\Bin\Desktop\SharpDX.Direct2D1.dll 57 | 58 | 59 | D:\Development\SharpDX\Bin\Desktop\SharpDX.Direct3D11.dll 60 | 61 | 62 | D:\Development\SharpDX\Bin\Desktop\SharpDX.DXGI.dll 63 | 64 | 65 | D:\Development\SharpDX\Bin\Desktop\SharpDX.Mathematics.dll 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | True 80 | True 81 | Resources.resx 82 | 83 | 84 | 85 | 86 | ResXFileCodeGenerator 87 | Resources.Designer.cs 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 107 | -------------------------------------------------------------------------------- /DirectXHost/Extensions/Direct2DExt.cs: -------------------------------------------------------------------------------- 1 | using SharpDX; 2 | using SharpDX.Direct2D1; 3 | using SharpDX.DXGI; 4 | using System.Drawing.Imaging; 5 | using System.Runtime.InteropServices; 6 | 7 | namespace DirectXHost.Extensions 8 | { 9 | public static class Direct2DExt 10 | { 11 | public static SharpDX.Direct2D1.Bitmap BitmapFromGDIImage(RenderTarget renderTarget, System.Drawing.Image gdiImage) 12 | { 13 | using (var bitmap = new System.Drawing.Bitmap(gdiImage)) 14 | { 15 | var sourceArea = new System.Drawing.Rectangle(0, 0, bitmap.Width, bitmap.Height); 16 | var bitmapProperties = new BitmapProperties(new SharpDX.Direct2D1.PixelFormat(Format.R8G8B8A8_UNorm, SharpDX.Direct2D1.AlphaMode.Premultiplied)); 17 | var size = new Size2(bitmap.Width, bitmap.Height); 18 | 19 | // Transform pixels from BGRA to RGBA 20 | int stride = bitmap.Width * sizeof(int); 21 | using (var tempStream = new DataStream(bitmap.Height * stride, true, true)) 22 | { 23 | // Lock System.Drawing.Bitmap 24 | var bitmapData = bitmap.LockBits(sourceArea, ImageLockMode.ReadOnly, System.Drawing.Imaging.PixelFormat.Format32bppPArgb); 25 | 26 | // Convert all pixels 27 | for (int y = 0; y < bitmap.Height; y++) 28 | { 29 | int offset = bitmapData.Stride * y; 30 | for (int x = 0; x < bitmap.Width; x++) 31 | { 32 | // Not optimized 33 | byte B = Marshal.ReadByte(bitmapData.Scan0, offset++); 34 | byte G = Marshal.ReadByte(bitmapData.Scan0, offset++); 35 | byte R = Marshal.ReadByte(bitmapData.Scan0, offset++); 36 | byte A = Marshal.ReadByte(bitmapData.Scan0, offset++); 37 | int rgba = R | (G << 8) | (B << 16) | (A << 24); 38 | tempStream.Write(rgba); 39 | } 40 | 41 | } 42 | bitmap.UnlockBits(bitmapData); 43 | tempStream.Position = 0; 44 | 45 | return new Bitmap(renderTarget, size, tempStream, stride, bitmapProperties); 46 | } 47 | } 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /DirectXHost/GraphicsD3D11.cs: -------------------------------------------------------------------------------- 1 | using SharpDX; 2 | using SharpDX.Direct3D; 3 | using SharpDX.Direct3D11; 4 | using SharpDX.DXGI; 5 | using SharpDX.Windows; 6 | using System; 7 | using D3D11Device = SharpDX.Direct3D11.Device; 8 | using D2D = SharpDX.Direct2D1; 9 | 10 | namespace DirectXHost 11 | { 12 | internal class GraphicsD3D11 : IDisposable 13 | { 14 | private enum BufferingType 15 | { 16 | DoubleBuffering = 1, 17 | TripleBuffering = 2 18 | } 19 | 20 | private SwapChain _swapChain; 21 | private SwapChainDescription swapChainDescription; 22 | public SwapChain SwapChain { get { return _swapChain; } } 23 | private D3D11Device _device; 24 | private DeviceContext _deviceContext; 25 | private RenderTargetView _renderTargetView; 26 | 27 | private Color _bgColor = new SharpDX.Color(46, 49, 54, 10); 28 | 29 | public void Initialise(RenderForm renderForm, bool windowed) 30 | { 31 | ModeDescription modeDescription = DescribeBuffer(renderForm.ClientSize.Width, renderForm.ClientSize.Height); 32 | swapChainDescription = DescribeSwapChain(modeDescription, renderForm, windowed); 33 | CreateDevice(swapChainDescription); 34 | // Ignore all windows events 35 | Factory factory = _swapChain.GetParent(); 36 | factory.MakeWindowAssociation(renderForm.Handle, WindowAssociationFlags.IgnoreAll); 37 | AssignDeviceContext(); 38 | CreateRenderTargetView(); 39 | } 40 | 41 | internal void ResizeGraphics(int width, int height) 42 | { 43 | Utilities.Dispose(ref _renderTargetView); 44 | _swapChain.ResizeBuffers(swapChainDescription.BufferCount, width, height, Format.Unknown, SwapChainFlags.None); 45 | CreateRenderTargetView(); 46 | } 47 | 48 | private ModeDescription DescribeBuffer(int width, int height) 49 | { 50 | ModeDescription desc = new ModeDescription() 51 | { 52 | Width = width, 53 | Height = height, 54 | RefreshRate = new Rational(Constants.RefreshRate, 1), 55 | Format = Format.R8G8B8A8_UNorm 56 | }; 57 | return desc; 58 | } 59 | 60 | private SwapChainDescription DescribeSwapChain( 61 | ModeDescription modeDescription, 62 | RenderForm renderForm, 63 | bool windowed) 64 | { 65 | SwapChainDescription desc = new SwapChainDescription() 66 | { 67 | ModeDescription = modeDescription, 68 | SampleDescription = new SampleDescription(1, 0), 69 | Usage = Usage.RenderTargetOutput, 70 | BufferCount = (int)BufferingType.DoubleBuffering, 71 | OutputHandle = renderForm.Handle, 72 | IsWindowed = windowed 73 | }; 74 | return desc; 75 | } 76 | 77 | private void CreateDevice(SwapChainDescription swapChainDescription) 78 | { 79 | D3D11Device.CreateWithSwapChain( 80 | DriverType.Hardware, 81 | DeviceCreationFlags.BgraSupport, 82 | new SharpDX.Direct3D.FeatureLevel[] { FeatureLevel.Level_11_0 }, 83 | swapChainDescription, 84 | out _device, 85 | out _swapChain); 86 | } 87 | 88 | private void AssignDeviceContext() 89 | { 90 | _deviceContext = _device.ImmediateContext; 91 | } 92 | 93 | private void CreateRenderTargetView() 94 | { 95 | using (Texture2D backBuffer = _swapChain.GetBackBuffer(0)) 96 | { 97 | _renderTargetView = new RenderTargetView(_device, backBuffer); 98 | } 99 | _deviceContext.OutputMerger.SetRenderTargets(_renderTargetView); 100 | } 101 | 102 | public void Dispose() 103 | { 104 | _swapChain.Dispose(); 105 | _device.Dispose(); 106 | _deviceContext.Dispose(); 107 | _renderTargetView.Dispose(); 108 | } 109 | 110 | public void ClearRenderTargetView() 111 | { 112 | _deviceContext.ClearRenderTargetView(_renderTargetView, _bgColor); 113 | } 114 | 115 | public void PresentSwapChain() 116 | { 117 | _swapChain.Present(1, PresentFlags.None); 118 | } 119 | } 120 | } -------------------------------------------------------------------------------- /DirectXHost/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace DirectXHost 4 | { 5 | static class Program 6 | { 7 | /// 8 | /// The main entry point for the application. 9 | /// 10 | [STAThread] 11 | static void Main() 12 | { 13 | DirectXHost dxHost = new DirectXHost(); 14 | dxHost.Run(); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /DirectXHost/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("DirectXHost")] 9 | [assembly: AssemblyDescription("Runs the DirectX host window for Discord game overlay.")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("DiscordOverlayHost")] 13 | [assembly: AssemblyCopyright("Copyright © 2016")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("80e3b3fb-3a4c-4def-bf98-17566b657e9d")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | [assembly: AssemblyVersion("1.0.0.0")] 33 | [assembly: AssemblyFileVersion("1.0.0.0")] 34 | -------------------------------------------------------------------------------- /DirectXHost/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace DirectXHost.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DirectXHost.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Looks up a localized resource of type System.Drawing.Bitmap. 65 | /// 66 | internal static System.Drawing.Bitmap DiscordHost { 67 | get { 68 | object obj = ResourceManager.GetObject("DiscordHost", resourceCulture); 69 | return ((System.Drawing.Bitmap)(obj)); 70 | } 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /DirectXHost/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 122 | ..\Resources\DiscordHost.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 123 | 124 | -------------------------------------------------------------------------------- /DirectXHost/Resources/App.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AsterDW/DiscordOverlayHost/4e07204f59d60feeff962aee2dadc1b89cd41ab4/DirectXHost/Resources/App.ico -------------------------------------------------------------------------------- /DirectXHost/Resources/DiscordHost.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AsterDW/DiscordOverlayHost/4e07204f59d60feeff962aee2dadc1b89cd41ab4/DirectXHost/Resources/DiscordHost.png -------------------------------------------------------------------------------- /DirectXHost/Resources/directx-11-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AsterDW/DiscordOverlayHost/4e07204f59d60feeff962aee2dadc1b89cd41ab4/DirectXHost/Resources/directx-11-logo.png -------------------------------------------------------------------------------- /DiscordOverlayHost.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.24720.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DiscordOverlayHost", "DiscordOverlayHost\DiscordOverlayHost.csproj", "{05EEE403-992C-497E-B3D2-FAE06CD7E68E}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenGlHost", "OpenGlHost\OpenGlHost.csproj", "{02D89970-9E4D-46DD-86C1-EC8493281EBF}" 9 | EndProject 10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DirectXHost", "DirectXHost\DirectXHost.csproj", "{A2948F55-87D4-4512-8805-E12EF75C8B45}" 11 | EndProject 12 | Global 13 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 14 | Debug|Any CPU = Debug|Any CPU 15 | Release|Any CPU = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {05EEE403-992C-497E-B3D2-FAE06CD7E68E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 19 | {05EEE403-992C-497E-B3D2-FAE06CD7E68E}.Debug|Any CPU.Build.0 = Debug|Any CPU 20 | {05EEE403-992C-497E-B3D2-FAE06CD7E68E}.Release|Any CPU.ActiveCfg = Release|Any CPU 21 | {05EEE403-992C-497E-B3D2-FAE06CD7E68E}.Release|Any CPU.Build.0 = Release|Any CPU 22 | {02D89970-9E4D-46DD-86C1-EC8493281EBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 23 | {02D89970-9E4D-46DD-86C1-EC8493281EBF}.Debug|Any CPU.Build.0 = Debug|Any CPU 24 | {02D89970-9E4D-46DD-86C1-EC8493281EBF}.Release|Any CPU.ActiveCfg = Release|Any CPU 25 | {02D89970-9E4D-46DD-86C1-EC8493281EBF}.Release|Any CPU.Build.0 = Release|Any CPU 26 | {A2948F55-87D4-4512-8805-E12EF75C8B45}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 27 | {A2948F55-87D4-4512-8805-E12EF75C8B45}.Debug|Any CPU.Build.0 = Debug|Any CPU 28 | {A2948F55-87D4-4512-8805-E12EF75C8B45}.Release|Any CPU.ActiveCfg = Release|Any CPU 29 | {A2948F55-87D4-4512-8805-E12EF75C8B45}.Release|Any CPU.Build.0 = Release|Any CPU 30 | EndGlobalSection 31 | GlobalSection(SolutionProperties) = preSolution 32 | HideSolutionNode = FALSE 33 | EndGlobalSection 34 | EndGlobal 35 | -------------------------------------------------------------------------------- /DiscordOverlayHost/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | True 15 | 16 | 17 | False 18 | 19 | 20 | False 21 | 22 | 23 | True 24 | 25 | 26 | False 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /DiscordOverlayHost/Controls/GradientPanel.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace DiscordOverlayHost.Controls 2 | { 3 | partial class GradientPanel 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | #region Component Designer generated code 11 | 12 | /// 13 | /// Required method for Designer support - do not modify 14 | /// the contents of this method with the code editor. 15 | /// 16 | private void InitializeComponent() 17 | { 18 | components = new System.ComponentModel.Container(); 19 | } 20 | 21 | #endregion 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /DiscordOverlayHost/Controls/GradientPanel.cs: -------------------------------------------------------------------------------- 1 | using System.Drawing; 2 | using System.Windows.Forms; 3 | using System.Drawing.Drawing2D; 4 | using System; 5 | 6 | namespace DiscordOverlayHost.Controls 7 | { 8 | public partial class GradientPanel : Panel 9 | { 10 | private Color _bgc1 = Color.FromKnownColor(KnownColor.Control); 11 | private Color _bgc2 = Color.FromKnownColor(KnownColor.Control); 12 | 13 | public Color BackgroundColor1 14 | { 15 | get { return _bgc1; } 16 | set 17 | { 18 | _bgc1 = value; 19 | CreateBackgroundBrush(); 20 | } 21 | } 22 | 23 | public Color BackgroundColor2 24 | { 25 | get { return _bgc2; } 26 | set 27 | { 28 | _bgc2 = value; 29 | CreateBackgroundBrush(); 30 | } 31 | } 32 | 33 | private LinearGradientMode _gradientMode = LinearGradientMode.Vertical; 34 | public LinearGradientMode GradientMode 35 | { 36 | get 37 | { 38 | return _gradientMode; 39 | } 40 | set 41 | { 42 | _gradientMode = value; 43 | CreateBackgroundBrush(); 44 | } 45 | } 46 | 47 | private LinearGradientBrush _backgroundBrush; 48 | 49 | public GradientPanel() 50 | { 51 | SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.UserPaint, true); 52 | CreateBackgroundBrush(); 53 | } 54 | 55 | private void CreateBackgroundBrush() 56 | { 57 | //Do not create new brush with 0 width or height. 58 | if (Width == 0 || Height == 0) 59 | { 60 | return; 61 | } 62 | 63 | if (_backgroundBrush != null) 64 | { 65 | _backgroundBrush.Dispose(); 66 | } 67 | _backgroundBrush = new LinearGradientBrush(this.ClientRectangle, BackgroundColor1, BackgroundColor2, GradientMode); 68 | if (this.Visible) 69 | { 70 | this.Invalidate(); 71 | } 72 | } 73 | 74 | protected override void OnResize(EventArgs eventargs) 75 | { 76 | base.OnResize(eventargs); 77 | 78 | CreateBackgroundBrush(); 79 | } 80 | 81 | protected override void OnPaint(PaintEventArgs e) 82 | { 83 | if (Width != 0 && Height != 0) 84 | { 85 | e.Graphics.FillRectangle(_backgroundBrush, this.ClientRectangle); 86 | } 87 | } 88 | 89 | /// 90 | /// Clean up any resources being used. 91 | /// 92 | /// true if managed resources should be disposed; otherwise, false. 93 | protected override void Dispose(bool disposing) 94 | { 95 | if (disposing && (components != null)) 96 | { 97 | _backgroundBrush.Dispose(); 98 | components.Dispose(); 99 | } 100 | base.Dispose(disposing); 101 | } 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /DiscordOverlayHost/Controls/ImageButton.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace DiscordOverlayHost.Controls 2 | { 3 | partial class ImageButton 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Component Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | components = new System.ComponentModel.Container(); 32 | } 33 | 34 | #endregion 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /DiscordOverlayHost/Controls/ImageButton.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Drawing; 3 | using System.Windows.Forms; 4 | 5 | namespace DiscordOverlayHost.Controls 6 | { 7 | public partial class ImageButton : Button 8 | { 9 | private Image _normalImage; 10 | public Image NormalImage 11 | { 12 | get 13 | { 14 | return _normalImage; 15 | } 16 | set 17 | { 18 | _normalImage = value; 19 | this.Invalidate(); 20 | } 21 | } 22 | 23 | private Image _mouseOverImage; 24 | public Image MouseOverImage 25 | { 26 | get 27 | { 28 | return _mouseOverImage; 29 | } 30 | set 31 | { 32 | _mouseOverImage = value; 33 | this.Invalidate(); 34 | } 35 | } 36 | 37 | private Image _mouseDownImage; 38 | public Image MouseDownImage 39 | { 40 | get 41 | { 42 | return _mouseDownImage; 43 | } 44 | set 45 | { 46 | _mouseDownImage = value; 47 | this.Invalidate(); 48 | } 49 | } 50 | 51 | private enum ButtonState 52 | { 53 | Normal = 0, 54 | MouseOver = 1, 55 | MouseDown = 2 56 | } 57 | 58 | private ButtonState _buttonState = ButtonState.Normal; 59 | 60 | public ImageButton() 61 | { 62 | InitializeComponent(); 63 | SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw | ControlStyles.SupportsTransparentBackColor | ControlStyles.UserPaint, true); 64 | SetStyle(ControlStyles.Opaque, false); 65 | } 66 | 67 | protected override void OnResize(EventArgs e) 68 | { 69 | base.OnResize(e); 70 | } 71 | 72 | protected override void OnMouseEnter(EventArgs e) 73 | { 74 | base.OnMouseEnter(e); 75 | _buttonState = ButtonState.MouseOver; 76 | this.Invalidate(); 77 | } 78 | 79 | protected override void OnMouseLeave(EventArgs e) 80 | { 81 | base.OnMouseLeave(e); 82 | _buttonState = ButtonState.Normal; 83 | this.Invalidate(); 84 | } 85 | 86 | protected override void OnMouseDown(MouseEventArgs mevent) 87 | { 88 | base.OnMouseDown(mevent); 89 | _buttonState = ButtonState.MouseDown; 90 | this.Invalidate(); 91 | } 92 | 93 | protected override void OnMouseUp(MouseEventArgs mevent) 94 | { 95 | base.OnMouseUp(mevent); 96 | if (ClientRectangle.Contains(PointToClient(MousePosition))) 97 | { 98 | _buttonState = ButtonState.MouseOver; 99 | } 100 | else 101 | { 102 | _buttonState = ButtonState.Normal; 103 | } 104 | this.Invalidate(); 105 | } 106 | 107 | protected override void OnPaintBackground(PaintEventArgs pevent) 108 | { 109 | base.OnPaintBackground(pevent); 110 | } 111 | 112 | protected override void OnPaint(PaintEventArgs pevent) 113 | { 114 | try 115 | { 116 | pevent.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality; 117 | pevent.Graphics.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality; 118 | pevent.Graphics.CompositingMode = System.Drawing.Drawing2D.CompositingMode.SourceOver; 119 | 120 | using (SolidBrush brush = new SolidBrush(this.BackColor)) 121 | { 122 | pevent.Graphics.FillRectangle(brush, pevent.ClipRectangle); 123 | } 124 | 125 | Image img = null; 126 | switch(_buttonState) 127 | { 128 | case ButtonState.Normal: 129 | img = NormalImage; 130 | break; 131 | case ButtonState.MouseOver: 132 | img = MouseOverImage; 133 | break; 134 | case ButtonState.MouseDown: 135 | img = MouseDownImage; 136 | break; 137 | } 138 | 139 | if (img != null) 140 | { 141 | Rectangle rect = new Rectangle(0, 0, Width, Height); 142 | rect.Inflate(-2, -2); 143 | pevent.Graphics.DrawImage(img, 0, 0, Width, Height); 144 | } 145 | } 146 | catch 147 | { 148 | // 149 | } 150 | } 151 | } 152 | } 153 | -------------------------------------------------------------------------------- /DiscordOverlayHost/DiscordOverlayHost.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {05EEE403-992C-497E-B3D2-FAE06CD7E68E} 8 | WinExe 9 | Properties 10 | DiscordOverlayHost 11 | DiscordOverlayHost 12 | v4.5.2 13 | 512 14 | true 15 | 16 | publish\ 17 | true 18 | Disk 19 | false 20 | Foreground 21 | 7 22 | Days 23 | false 24 | false 25 | true 26 | 0 27 | 1.0.0.%2a 28 | false 29 | false 30 | true 31 | 32 | 33 | AnyCPU 34 | true 35 | full 36 | false 37 | bin\Debug\ 38 | DEBUG;TRACE 39 | prompt 40 | 4 41 | false 42 | 43 | 44 | AnyCPU 45 | pdbonly 46 | true 47 | bin\Release\ 48 | TRACE 49 | prompt 50 | 4 51 | false 52 | 53 | 54 | Resources\App.ico 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | Form 72 | 73 | 74 | AboutDialog.cs 75 | 76 | 77 | Form 78 | 79 | 80 | ConfigUIForm.cs 81 | 82 | 83 | Component 84 | 85 | 86 | GradientPanel.cs 87 | 88 | 89 | Component 90 | 91 | 92 | ImageButton.cs 93 | 94 | 95 | Form 96 | 97 | 98 | frmConfiguration.cs 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | AboutDialog.cs 107 | 108 | 109 | ConfigUIForm.cs 110 | 111 | 112 | frmConfiguration.cs 113 | 114 | 115 | ResXFileCodeGenerator 116 | Resources.Designer.cs 117 | Designer 118 | 119 | 120 | True 121 | Resources.resx 122 | True 123 | 124 | 125 | SettingsSingleFileGenerator 126 | Settings.Designer.cs 127 | 128 | 129 | True 130 | Settings.settings 131 | True 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | False 162 | Microsoft .NET Framework 4.5.2 %28x86 and x64%29 163 | true 164 | 165 | 166 | False 167 | .NET Framework 3.5 SP1 168 | false 169 | 170 | 171 | 172 | 179 | -------------------------------------------------------------------------------- /DiscordOverlayHost/Forms/AboutDialog.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace DiscordOverlayHost 2 | { 3 | partial class AboutDialog 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.components = new System.ComponentModel.Container(); 32 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutDialog)); 33 | this.gradientPanel1 = new DiscordOverlayHost.Controls.GradientPanel(); 34 | this.tabControl1 = new System.Windows.Forms.TabControl(); 35 | this.tabPage1 = new System.Windows.Forms.TabPage(); 36 | this.panel3 = new DiscordOverlayHost.Controls.GradientPanel(); 37 | this.pictureBox6 = new System.Windows.Forms.PictureBox(); 38 | this.linkLabel2 = new System.Windows.Forms.LinkLabel(); 39 | this.linkLabel1 = new System.Windows.Forms.LinkLabel(); 40 | this.label3 = new System.Windows.Forms.Label(); 41 | this.label5 = new System.Windows.Forms.Label(); 42 | this.label4 = new System.Windows.Forms.Label(); 43 | this.label1 = new System.Windows.Forms.Label(); 44 | this.label2 = new System.Windows.Forms.Label(); 45 | this.tabPage2 = new System.Windows.Forms.TabPage(); 46 | this.gradientPanel2 = new DiscordOverlayHost.Controls.GradientPanel(); 47 | this.linkLabelOpenTk = new System.Windows.Forms.LinkLabel(); 48 | this.label7 = new System.Windows.Forms.Label(); 49 | this.pictureBox3 = new System.Windows.Forms.PictureBox(); 50 | this.label8 = new System.Windows.Forms.Label(); 51 | this.pictureBox2 = new System.Windows.Forms.PictureBox(); 52 | this.tabPage3 = new System.Windows.Forms.TabPage(); 53 | this.gradientPanel3 = new DiscordOverlayHost.Controls.GradientPanel(); 54 | this.linkLabelSharpDx = new System.Windows.Forms.LinkLabel(); 55 | this.label9 = new System.Windows.Forms.Label(); 56 | this.pictureBox4 = new System.Windows.Forms.PictureBox(); 57 | this.label10 = new System.Windows.Forms.Label(); 58 | this.pictureBox5 = new System.Windows.Forms.PictureBox(); 59 | this.imageList1 = new System.Windows.Forms.ImageList(this.components); 60 | this.imageButton1 = new DiscordOverlayHost.Controls.ImageButton(); 61 | this.pictureBox1 = new System.Windows.Forms.PictureBox(); 62 | this.gradientPanel1.SuspendLayout(); 63 | this.tabControl1.SuspendLayout(); 64 | this.tabPage1.SuspendLayout(); 65 | this.panel3.SuspendLayout(); 66 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).BeginInit(); 67 | this.tabPage2.SuspendLayout(); 68 | this.gradientPanel2.SuspendLayout(); 69 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit(); 70 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit(); 71 | this.tabPage3.SuspendLayout(); 72 | this.gradientPanel3.SuspendLayout(); 73 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit(); 74 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).BeginInit(); 75 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); 76 | this.SuspendLayout(); 77 | // 78 | // gradientPanel1 79 | // 80 | this.gradientPanel1.BackColor = System.Drawing.Color.Transparent; 81 | this.gradientPanel1.BackgroundColor1 = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(45))))); 82 | this.gradientPanel1.BackgroundColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(65)))), ((int)(((byte)(65)))), ((int)(((byte)(85))))); 83 | this.gradientPanel1.Controls.Add(this.tabControl1); 84 | this.gradientPanel1.Controls.Add(this.imageButton1); 85 | this.gradientPanel1.Controls.Add(this.pictureBox1); 86 | this.gradientPanel1.Dock = System.Windows.Forms.DockStyle.Fill; 87 | this.gradientPanel1.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; 88 | this.gradientPanel1.Location = new System.Drawing.Point(0, 0); 89 | this.gradientPanel1.Name = "gradientPanel1"; 90 | this.gradientPanel1.Size = new System.Drawing.Size(334, 361); 91 | this.gradientPanel1.TabIndex = 1; 92 | // 93 | // tabControl1 94 | // 95 | this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 96 | | System.Windows.Forms.AnchorStyles.Left) 97 | | System.Windows.Forms.AnchorStyles.Right))); 98 | this.tabControl1.Controls.Add(this.tabPage1); 99 | this.tabControl1.Controls.Add(this.tabPage2); 100 | this.tabControl1.Controls.Add(this.tabPage3); 101 | this.tabControl1.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 102 | this.tabControl1.ImageList = this.imageList1; 103 | this.tabControl1.Location = new System.Drawing.Point(12, 135); 104 | this.tabControl1.Name = "tabControl1"; 105 | this.tabControl1.SelectedIndex = 0; 106 | this.tabControl1.Size = new System.Drawing.Size(310, 193); 107 | this.tabControl1.TabIndex = 0; 108 | // 109 | // tabPage1 110 | // 111 | this.tabPage1.Controls.Add(this.panel3); 112 | this.tabPage1.ImageIndex = 0; 113 | this.tabPage1.Location = new System.Drawing.Point(4, 31); 114 | this.tabPage1.Name = "tabPage1"; 115 | this.tabPage1.Padding = new System.Windows.Forms.Padding(3); 116 | this.tabPage1.Size = new System.Drawing.Size(302, 158); 117 | this.tabPage1.TabIndex = 0; 118 | this.tabPage1.Text = "General"; 119 | this.tabPage1.UseVisualStyleBackColor = true; 120 | // 121 | // panel3 122 | // 123 | this.panel3.BackColor = System.Drawing.Color.White; 124 | this.panel3.BackgroundColor1 = System.Drawing.Color.FromArgb(((int)(((byte)(245)))), ((int)(((byte)(245)))), ((int)(((byte)(250))))); 125 | this.panel3.BackgroundColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(250)))), ((int)(((byte)(250)))), ((int)(((byte)(255))))); 126 | this.panel3.Controls.Add(this.pictureBox6); 127 | this.panel3.Controls.Add(this.linkLabel2); 128 | this.panel3.Controls.Add(this.linkLabel1); 129 | this.panel3.Controls.Add(this.label3); 130 | this.panel3.Controls.Add(this.label5); 131 | this.panel3.Controls.Add(this.label4); 132 | this.panel3.Controls.Add(this.label1); 133 | this.panel3.Controls.Add(this.label2); 134 | this.panel3.Dock = System.Windows.Forms.DockStyle.Fill; 135 | this.panel3.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; 136 | this.panel3.Location = new System.Drawing.Point(3, 3); 137 | this.panel3.Name = "panel3"; 138 | this.panel3.Size = new System.Drawing.Size(296, 152); 139 | this.panel3.TabIndex = 0; 140 | // 141 | // pictureBox6 142 | // 143 | this.pictureBox6.BackColor = System.Drawing.Color.Transparent; 144 | this.pictureBox6.Image = global::DiscordOverlayHost.Properties.Resources.Discord_Logo; 145 | this.pictureBox6.Location = new System.Drawing.Point(4, 95); 146 | this.pictureBox6.Name = "pictureBox6"; 147 | this.pictureBox6.Size = new System.Drawing.Size(120, 50); 148 | this.pictureBox6.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; 149 | this.pictureBox6.TabIndex = 6; 150 | this.pictureBox6.TabStop = false; 151 | // 152 | // linkLabel2 153 | // 154 | this.linkLabel2.AutoSize = true; 155 | this.linkLabel2.BackColor = System.Drawing.Color.Transparent; 156 | this.linkLabel2.Location = new System.Drawing.Point(130, 127); 157 | this.linkLabel2.Name = "linkLabel2"; 158 | this.linkLabel2.Size = new System.Drawing.Size(127, 13); 159 | this.linkLabel2.TabIndex = 6; 160 | this.linkLabel2.TabStop = true; 161 | this.linkLabel2.Text = "https://discordapp.com"; 162 | this.linkLabel2.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel2_LinkClicked); 163 | // 164 | // linkLabel1 165 | // 166 | this.linkLabel1.AutoSize = true; 167 | this.linkLabel1.BackColor = System.Drawing.Color.Transparent; 168 | this.linkLabel1.Location = new System.Drawing.Point(29, 72); 169 | this.linkLabel1.Name = "linkLabel1"; 170 | this.linkLabel1.Size = new System.Drawing.Size(160, 13); 171 | this.linkLabel1.TabIndex = 4; 172 | this.linkLabel1.TabStop = true; 173 | this.linkLabel1.Text = "Christopher.Aster@gmail.com"; 174 | this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); 175 | // 176 | // label3 177 | // 178 | this.label3.AutoSize = true; 179 | this.label3.BackColor = System.Drawing.Color.Transparent; 180 | this.label3.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 181 | this.label3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(30)))), ((int)(((byte)(55))))); 182 | this.label3.Location = new System.Drawing.Point(29, 40); 183 | this.label3.Name = "label3"; 184 | this.label3.Size = new System.Drawing.Size(136, 13); 185 | this.label3.TabIndex = 2; 186 | this.label3.Text = "Chris Oldenhouse - Aster"; 187 | // 188 | // label5 189 | // 190 | this.label5.BackColor = System.Drawing.Color.Transparent; 191 | this.label5.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 192 | this.label5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(30)))), ((int)(((byte)(55))))); 193 | this.label5.Location = new System.Drawing.Point(130, 95); 194 | this.label5.Name = "label5"; 195 | this.label5.Size = new System.Drawing.Size(163, 37); 196 | this.label5.TabIndex = 5; 197 | this.label5.Text = "Discord is designed and copyright by Hammer & Chisel"; 198 | this.label5.UseMnemonic = false; 199 | // 200 | // label4 201 | // 202 | this.label4.AutoSize = true; 203 | this.label4.BackColor = System.Drawing.Color.Transparent; 204 | this.label4.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 205 | this.label4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(30)))), ((int)(((byte)(55))))); 206 | this.label4.Location = new System.Drawing.Point(13, 57); 207 | this.label4.Name = "label4"; 208 | this.label4.Size = new System.Drawing.Size(50, 13); 209 | this.label4.TabIndex = 3; 210 | this.label4.Text = "Contact:"; 211 | // 212 | // label1 213 | // 214 | this.label1.AutoSize = true; 215 | this.label1.BackColor = System.Drawing.Color.Transparent; 216 | this.label1.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 217 | this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(30)))), ((int)(((byte)(55))))); 218 | this.label1.Location = new System.Drawing.Point(13, 25); 219 | this.label1.Name = "label1"; 220 | this.label1.Size = new System.Drawing.Size(65, 13); 221 | this.label1.TabIndex = 1; 222 | this.label1.Text = "Written by:"; 223 | // 224 | // label2 225 | // 226 | this.label2.AutoSize = true; 227 | this.label2.BackColor = System.Drawing.Color.Transparent; 228 | this.label2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 229 | this.label2.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 230 | this.label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(30)))), ((int)(((byte)(55))))); 231 | this.label2.Location = new System.Drawing.Point(27, 3); 232 | this.label2.Name = "label2"; 233 | this.label2.Size = new System.Drawing.Size(242, 21); 234 | this.label2.TabIndex = 0; 235 | this.label2.Text = "Discord Overlay Host Manager"; 236 | // 237 | // tabPage2 238 | // 239 | this.tabPage2.Controls.Add(this.gradientPanel2); 240 | this.tabPage2.ImageIndex = 2; 241 | this.tabPage2.Location = new System.Drawing.Point(4, 31); 242 | this.tabPage2.Name = "tabPage2"; 243 | this.tabPage2.Padding = new System.Windows.Forms.Padding(3); 244 | this.tabPage2.Size = new System.Drawing.Size(302, 158); 245 | this.tabPage2.TabIndex = 1; 246 | this.tabPage2.Text = "OpenGL"; 247 | this.tabPage2.UseVisualStyleBackColor = true; 248 | // 249 | // gradientPanel2 250 | // 251 | this.gradientPanel2.BackColor = System.Drawing.Color.Transparent; 252 | this.gradientPanel2.BackgroundColor1 = System.Drawing.Color.FromArgb(((int)(((byte)(245)))), ((int)(((byte)(245)))), ((int)(((byte)(250))))); 253 | this.gradientPanel2.BackgroundColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(250)))), ((int)(((byte)(250)))), ((int)(((byte)(255))))); 254 | this.gradientPanel2.Controls.Add(this.linkLabelOpenTk); 255 | this.gradientPanel2.Controls.Add(this.label7); 256 | this.gradientPanel2.Controls.Add(this.pictureBox3); 257 | this.gradientPanel2.Controls.Add(this.label8); 258 | this.gradientPanel2.Controls.Add(this.pictureBox2); 259 | this.gradientPanel2.Dock = System.Windows.Forms.DockStyle.Fill; 260 | this.gradientPanel2.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; 261 | this.gradientPanel2.Location = new System.Drawing.Point(3, 3); 262 | this.gradientPanel2.Name = "gradientPanel2"; 263 | this.gradientPanel2.Size = new System.Drawing.Size(296, 152); 264 | this.gradientPanel2.TabIndex = 0; 265 | // 266 | // linkLabelOpenTk 267 | // 268 | this.linkLabelOpenTk.AutoSize = true; 269 | this.linkLabelOpenTk.Location = new System.Drawing.Point(125, 117); 270 | this.linkLabelOpenTk.Name = "linkLabelOpenTk"; 271 | this.linkLabelOpenTk.Size = new System.Drawing.Size(135, 13); 272 | this.linkLabelOpenTk.TabIndex = 2; 273 | this.linkLabelOpenTk.TabStop = true; 274 | this.linkLabelOpenTk.Text = "http://www.opentk.com/"; 275 | this.linkLabelOpenTk.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabelOpenTk_LinkClicked); 276 | // 277 | // label7 278 | // 279 | this.label7.Location = new System.Drawing.Point(125, 85); 280 | this.label7.Name = "label7"; 281 | this.label7.Size = new System.Drawing.Size(165, 30); 282 | this.label7.TabIndex = 1; 283 | this.label7.Text = "OpenGL Host created with the Open Toolkit Library."; 284 | // 285 | // pictureBox3 286 | // 287 | this.pictureBox3.Image = global::DiscordOverlayHost.Properties.Resources.OpenTK_logo; 288 | this.pictureBox3.Location = new System.Drawing.Point(4, 85); 289 | this.pictureBox3.Name = "pictureBox3"; 290 | this.pictureBox3.Size = new System.Drawing.Size(120, 50); 291 | this.pictureBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; 292 | this.pictureBox3.TabIndex = 3; 293 | this.pictureBox3.TabStop = false; 294 | // 295 | // label8 296 | // 297 | this.label8.Location = new System.Drawing.Point(125, 4); 298 | this.label8.Name = "label8"; 299 | this.label8.Size = new System.Drawing.Size(174, 71); 300 | this.label8.TabIndex = 0; 301 | this.label8.Text = "OpenGL® and the oval logo are trademarks or registered trademarks of Silicon Grap" + 302 | "hics, Inc. in the United States and/or other countries worldwide."; 303 | // 304 | // pictureBox2 305 | // 306 | this.pictureBox2.Image = global::DiscordOverlayHost.Properties.Resources.OpenGL_100px_Nov14; 307 | this.pictureBox2.Location = new System.Drawing.Point(4, 10); 308 | this.pictureBox2.Name = "pictureBox2"; 309 | this.pictureBox2.Size = new System.Drawing.Size(120, 50); 310 | this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; 311 | this.pictureBox2.TabIndex = 0; 312 | this.pictureBox2.TabStop = false; 313 | // 314 | // tabPage3 315 | // 316 | this.tabPage3.Controls.Add(this.gradientPanel3); 317 | this.tabPage3.ImageIndex = 1; 318 | this.tabPage3.Location = new System.Drawing.Point(4, 31); 319 | this.tabPage3.Name = "tabPage3"; 320 | this.tabPage3.Padding = new System.Windows.Forms.Padding(3); 321 | this.tabPage3.Size = new System.Drawing.Size(302, 158); 322 | this.tabPage3.TabIndex = 2; 323 | this.tabPage3.Text = "DirectX"; 324 | this.tabPage3.UseVisualStyleBackColor = true; 325 | // 326 | // gradientPanel3 327 | // 328 | this.gradientPanel3.BackColor = System.Drawing.Color.Transparent; 329 | this.gradientPanel3.BackgroundColor1 = System.Drawing.Color.FromArgb(((int)(((byte)(245)))), ((int)(((byte)(245)))), ((int)(((byte)(250))))); 330 | this.gradientPanel3.BackgroundColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(250)))), ((int)(((byte)(250)))), ((int)(((byte)(255))))); 331 | this.gradientPanel3.Controls.Add(this.linkLabelSharpDx); 332 | this.gradientPanel3.Controls.Add(this.label9); 333 | this.gradientPanel3.Controls.Add(this.pictureBox4); 334 | this.gradientPanel3.Controls.Add(this.label10); 335 | this.gradientPanel3.Controls.Add(this.pictureBox5); 336 | this.gradientPanel3.Dock = System.Windows.Forms.DockStyle.Fill; 337 | this.gradientPanel3.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; 338 | this.gradientPanel3.Location = new System.Drawing.Point(3, 3); 339 | this.gradientPanel3.Name = "gradientPanel3"; 340 | this.gradientPanel3.Size = new System.Drawing.Size(296, 152); 341 | this.gradientPanel3.TabIndex = 0; 342 | // 343 | // linkLabelSharpDx 344 | // 345 | this.linkLabelSharpDx.AutoSize = true; 346 | this.linkLabelSharpDx.Location = new System.Drawing.Point(125, 117); 347 | this.linkLabelSharpDx.Name = "linkLabelSharpDx"; 348 | this.linkLabelSharpDx.Size = new System.Drawing.Size(106, 13); 349 | this.linkLabelSharpDx.TabIndex = 2; 350 | this.linkLabelSharpDx.TabStop = true; 351 | this.linkLabelSharpDx.Text = "http://sharpdx.org/"; 352 | this.linkLabelSharpDx.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabelSharpDx_LinkClicked); 353 | // 354 | // label9 355 | // 356 | this.label9.Location = new System.Drawing.Point(125, 85); 357 | this.label9.Name = "label9"; 358 | this.label9.Size = new System.Drawing.Size(165, 30); 359 | this.label9.TabIndex = 1; 360 | this.label9.Text = "DirectX Host created with the SharpDX library."; 361 | // 362 | // pictureBox4 363 | // 364 | this.pictureBox4.Image = global::DiscordOverlayHost.Properties.Resources.SharpDXlogo; 365 | this.pictureBox4.Location = new System.Drawing.Point(4, 85); 366 | this.pictureBox4.Name = "pictureBox4"; 367 | this.pictureBox4.Size = new System.Drawing.Size(120, 50); 368 | this.pictureBox4.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; 369 | this.pictureBox4.TabIndex = 3; 370 | this.pictureBox4.TabStop = false; 371 | // 372 | // label10 373 | // 374 | this.label10.Location = new System.Drawing.Point(125, 4); 375 | this.label10.Name = "label10"; 376 | this.label10.Size = new System.Drawing.Size(174, 71); 377 | this.label10.TabIndex = 0; 378 | this.label10.Text = "DirectX® is a trademark of Microsoft Corporation in the United States and/or othe" + 379 | "r countries."; 380 | // 381 | // pictureBox5 382 | // 383 | this.pictureBox5.Image = global::DiscordOverlayHost.Properties.Resources.Microsoft_DirectX_logo; 384 | this.pictureBox5.Location = new System.Drawing.Point(4, 10); 385 | this.pictureBox5.Name = "pictureBox5"; 386 | this.pictureBox5.Size = new System.Drawing.Size(120, 50); 387 | this.pictureBox5.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; 388 | this.pictureBox5.TabIndex = 0; 389 | this.pictureBox5.TabStop = false; 390 | // 391 | // imageList1 392 | // 393 | this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream"))); 394 | this.imageList1.TransparentColor = System.Drawing.Color.Transparent; 395 | this.imageList1.Images.SetKeyName(0, "DiscordHost_48.png"); 396 | this.imageList1.Images.SetKeyName(1, "logo.ico"); 397 | this.imageList1.Images.SetKeyName(2, "GL.png"); 398 | // 399 | // imageButton1 400 | // 401 | this.imageButton1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 402 | this.imageButton1.Location = new System.Drawing.Point(302, 334); 403 | this.imageButton1.MouseDownImage = global::DiscordOverlayHost.Properties.Resources._305_Close_24x24_Red_Dark; 404 | this.imageButton1.MouseOverImage = global::DiscordOverlayHost.Properties.Resources._305_Close_24x24_Red; 405 | this.imageButton1.Name = "imageButton1"; 406 | this.imageButton1.NormalImage = global::DiscordOverlayHost.Properties.Resources._305_Close_24x24_72; 407 | this.imageButton1.Size = new System.Drawing.Size(20, 20); 408 | this.imageButton1.TabIndex = 2; 409 | this.imageButton1.Text = "imageButton1"; 410 | this.imageButton1.UseVisualStyleBackColor = true; 411 | this.imageButton1.Click += new System.EventHandler(this.button1_Click); 412 | // 413 | // pictureBox1 414 | // 415 | this.pictureBox1.BackColor = System.Drawing.Color.Transparent; 416 | this.pictureBox1.Image = global::DiscordOverlayHost.Properties.Resources.DiscordHost; 417 | this.pictureBox1.Location = new System.Drawing.Point(103, 5); 418 | this.pictureBox1.Name = "pictureBox1"; 419 | this.pictureBox1.Size = new System.Drawing.Size(128, 128); 420 | this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; 421 | this.pictureBox1.TabIndex = 0; 422 | this.pictureBox1.TabStop = false; 423 | // 424 | // AboutDialog 425 | // 426 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 427 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 428 | this.BackColor = System.Drawing.Color.White; 429 | this.ClientSize = new System.Drawing.Size(334, 361); 430 | this.Controls.Add(this.gradientPanel1); 431 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; 432 | this.Name = "AboutDialog"; 433 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; 434 | this.Text = "About"; 435 | this.gradientPanel1.ResumeLayout(false); 436 | this.tabControl1.ResumeLayout(false); 437 | this.tabPage1.ResumeLayout(false); 438 | this.panel3.ResumeLayout(false); 439 | this.panel3.PerformLayout(); 440 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).EndInit(); 441 | this.tabPage2.ResumeLayout(false); 442 | this.gradientPanel2.ResumeLayout(false); 443 | this.gradientPanel2.PerformLayout(); 444 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit(); 445 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit(); 446 | this.tabPage3.ResumeLayout(false); 447 | this.gradientPanel3.ResumeLayout(false); 448 | this.gradientPanel3.PerformLayout(); 449 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit(); 450 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit(); 451 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); 452 | this.ResumeLayout(false); 453 | 454 | } 455 | 456 | #endregion 457 | private System.Windows.Forms.PictureBox pictureBox1; 458 | private Controls.GradientPanel gradientPanel1; 459 | private System.Windows.Forms.ImageList imageList1; 460 | private Controls.ImageButton imageButton1; 461 | private System.Windows.Forms.TabControl tabControl1; 462 | private System.Windows.Forms.TabPage tabPage1; 463 | private Controls.GradientPanel panel3; 464 | private System.Windows.Forms.PictureBox pictureBox6; 465 | private System.Windows.Forms.LinkLabel linkLabel2; 466 | private System.Windows.Forms.LinkLabel linkLabel1; 467 | private System.Windows.Forms.Label label3; 468 | private System.Windows.Forms.Label label5; 469 | private System.Windows.Forms.Label label4; 470 | private System.Windows.Forms.Label label1; 471 | private System.Windows.Forms.Label label2; 472 | private System.Windows.Forms.TabPage tabPage2; 473 | private Controls.GradientPanel gradientPanel2; 474 | private System.Windows.Forms.LinkLabel linkLabelOpenTk; 475 | private System.Windows.Forms.Label label7; 476 | private System.Windows.Forms.PictureBox pictureBox3; 477 | private System.Windows.Forms.Label label8; 478 | private System.Windows.Forms.PictureBox pictureBox2; 479 | private System.Windows.Forms.TabPage tabPage3; 480 | private Controls.GradientPanel gradientPanel3; 481 | private System.Windows.Forms.LinkLabel linkLabelSharpDx; 482 | private System.Windows.Forms.Label label9; 483 | private System.Windows.Forms.PictureBox pictureBox4; 484 | private System.Windows.Forms.Label label10; 485 | private System.Windows.Forms.PictureBox pictureBox5; 486 | } 487 | } -------------------------------------------------------------------------------- /DiscordOverlayHost/Forms/AboutDialog.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Drawing.Drawing2D; 7 | using System.Linq; 8 | using System.Text; 9 | using System.Threading.Tasks; 10 | using System.Windows.Forms; 11 | 12 | namespace DiscordOverlayHost 13 | { 14 | public partial class AboutDialog : Form 15 | { 16 | public AboutDialog() 17 | { 18 | InitializeComponent(); 19 | } 20 | 21 | private void VisitWebPage(string url) 22 | { 23 | try 24 | { 25 | System.Diagnostics.Process proc = new System.Diagnostics.Process(); 26 | proc.StartInfo.FileName = url; 27 | proc.Start(); 28 | } 29 | catch(Exception ex) 30 | { 31 | MessageBox.Show(this, string.Format("There was an error opening the web page.\r\n{0}", ex.Message), "Web Page", MessageBoxButtons.OK, MessageBoxIcon.Error); 32 | } 33 | } 34 | 35 | private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) 36 | { 37 | try 38 | { 39 | System.Diagnostics.Process proc = new System.Diagnostics.Process(); 40 | proc.StartInfo.FileName = "mailto:christopher.aster@gmail.com?subject=Discord Overlay Host"; 41 | proc.Start(); 42 | } 43 | catch(Exception ex) 44 | { 45 | MessageBox.Show(this, string.Format("There was an error opening your email client.\r\n{0}", ex.Message), "eMail", MessageBoxButtons.OK, MessageBoxIcon.Error); 46 | } 47 | 48 | } 49 | 50 | private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) 51 | { 52 | VisitWebPage("https://discordapp.com"); 53 | } 54 | 55 | private void button1_Click(object sender, EventArgs e) 56 | { 57 | this.Close(); 58 | } 59 | 60 | private void linkLabelOpenTk_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) 61 | { 62 | VisitWebPage("http://www.opentk.com/"); 63 | } 64 | 65 | private void linkLabelSharpDx_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) 66 | { 67 | VisitWebPage("http://sharpdx.org/"); 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /DiscordOverlayHost/Forms/AboutDialog.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 17, 17 122 | 123 | 124 | 125 | AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w 126 | LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 127 | ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAu 128 | DgAAAk1TRnQBSQFMAgEBAwEAAZABAAGQAQABGAEAARgBAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo 129 | AwABYAMAARgDAAEBAQABCAYAAQkYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA 130 | AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 131 | AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA 132 | AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYCAAFm 133 | AZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMCAAHM 134 | AWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQABZgEA 135 | ATMBAAGZAQABMwEAAcwBAAEzAQAB/wEAAf8BMwIAAzMBAAIzAWYBAAIzAZkBAAIzAcwBAAIzAf8BAAEz 136 | AWYCAAEzAWYBMwEAATMCZgEAATMBZgGZAQABMwFmAcwBAAEzAWYB/wEAATMBmQIAATMBmQEzAQABMwGZ 137 | AWYBAAEzApkBAAEzAZkBzAEAATMBmQH/AQABMwHMAgABMwHMATMBAAEzAcwBZgEAATMBzAGZAQABMwLM 138 | AQABMwHMAf8BAAEzAf8BMwEAATMB/wFmAQABMwH/AZkBAAEzAf8BzAEAATMC/wEAAWYDAAFmAQABMwEA 139 | AWYBAAFmAQABZgEAAZkBAAFmAQABzAEAAWYBAAH/AQABZgEzAgABZgIzAQABZgEzAWYBAAFmATMBmQEA 140 | AWYBMwHMAQABZgEzAf8BAAJmAgACZgEzAQADZgEAAmYBmQEAAmYBzAEAAWYBmQIAAWYBmQEzAQABZgGZ 141 | AWYBAAFmApkBAAFmAZkBzAEAAWYBmQH/AQABZgHMAgABZgHMATMBAAFmAcwBmQEAAWYCzAEAAWYBzAH/ 142 | AQABZgH/AgABZgH/ATMBAAFmAf8BmQEAAWYB/wHMAQABzAEAAf8BAAH/AQABzAEAApkCAAGZATMBmQEA 143 | AZkBAAGZAQABmQEAAcwBAAGZAwABmQIzAQABmQEAAWYBAAGZATMBzAEAAZkBAAH/AQABmQFmAgABmQFm 144 | ATMBAAGZATMBZgEAAZkBZgGZAQABmQFmAcwBAAGZATMB/wEAApkBMwEAApkBZgEAA5kBAAKZAcwBAAKZ 145 | Af8BAAGZAcwCAAGZAcwBMwEAAWYBzAFmAQABmQHMAZkBAAGZAswBAAGZAcwB/wEAAZkB/wIAAZkB/wEz 146 | AQABmQHMAWYBAAGZAf8BmQEAAZkB/wHMAQABmQL/AQABzAMAAZkBAAEzAQABzAEAAWYBAAHMAQABmQEA 147 | AcwBAAHMAQABmQEzAgABzAIzAQABzAEzAWYBAAHMATMBmQEAAcwBMwHMAQABzAEzAf8BAAHMAWYCAAHM 148 | AWYBMwEAAZkCZgEAAcwBZgGZAQABzAFmAcwBAAGZAWYB/wEAAcwBmQIAAcwBmQEzAQABzAGZAWYBAAHM 149 | ApkBAAHMAZkBzAEAAcwBmQH/AQACzAIAAswBMwEAAswBZgEAAswBmQEAA8wBAALMAf8BAAHMAf8CAAHM 150 | Af8BMwEAAZkB/wFmAQABzAH/AZkBAAHMAf8BzAEAAcwC/wEAAcwBAAEzAQAB/wEAAWYBAAH/AQABmQEA 151 | AcwBMwIAAf8CMwEAAf8BMwFmAQAB/wEzAZkBAAH/ATMBzAEAAf8BMwH/AQAB/wFmAgAB/wFmATMBAAHM 152 | AmYBAAH/AWYBmQEAAf8BZgHMAQABzAFmAf8BAAH/AZkCAAH/AZkBMwEAAf8BmQFmAQAB/wKZAQAB/wGZ 153 | AcwBAAH/AZkB/wEAAf8BzAIAAf8BzAEzAQAB/wHMAWYBAAH/AcwBmQEAAf8CzAEAAf8BzAH/AQAC/wEz 154 | AQABzAH/AWYBAAL/AZkBAAL/AcwBAAJmAf8BAAFmAf8BZgEAAWYC/wEAAf8CZgEAAf8BZgH/AQAC/wFm 155 | AQABIQEAAaUBAANfAQADdwEAA4YBAAOWAQADywEAA7IBAAPXAQAD3QEAA+MBAAPqAQAD8QEAA/gBAAHw 156 | AfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD/wMAAf8S9AH/AwAD/wX0 157 | BAAF9AH/AQAE/zEAAf8GZgWGCK4BtAEHAgABbwJGASABHwEBASIBQwH/AwAB7ANDAQsBHgRFAe0xAAH3 158 | AWYBhhCuAs8BtQH/AQABbwJGBSABRAH/AgAB7wFDBAEERQHtMQAB7QFmAW0B6wTsAe0CkgL3A+8DBwG8 159 | ArUB9AEAARcCRgQgAekBRgFFAf8BAAG8Ah8DAQRFAe0xAAHtAWYBbQHrBOwC7QGSAvcD7wMHAbwB7QG1 160 | AfQBAAFvAkYFIAElAUYBRQH/AUYDHwIBBEUB7TEAAe0BZgHrBOwB7QKSAfcD7wQHAbwB8AK1AfQBAAFv 161 | BEYDIAElBEYC6QIfAQEERQHtMQAB7QFmAesB7AHrARMBFAJmAxIB6gJtAq4B7AG8AfACtQH0AQAB6wHq 162 | AW4BbwNGASAFRgEkAukBJAIBAUQBEgH3Af8BABb/AfQZAAHtAWYB6wHsARMBZgHqAusCZgFsAuoB9wHv 163 | AewBrgHvAfACtQH0AQAB6wNDARUBbwhGAUUCJAFEA0MBbQEAAfQC/wKRAZACkQHwAYsBrgH/AbUHkQLy 164 | Au0ZAAHtAWYB6wHsARME6wLsAe0BkgH3Ae0E7wHxArUB9AEAAZIFQwFuA0YDTAJGAUUBRARDARIBAAH2 165 | Af8IkQGQAf8BtQeRAfIB8AEAAW0ZAAHtAYYB6wHtARMC6wLsAW0B7QGSAfcB7ALvAQcC7wHxAbUBBwH0 166 | AQABBwRDAhUBbwFMAVICegFSAUwBRgFFARUEQwEVAv8BkAKRBP8DkQH/AbUBkQGQCf8ZAAHtAYYB6wHt 167 | ARIB6wLsARIB6gHsAfcCrgH3AgcB9wHvAfEBtQEHAfQBAAH/A/QCFQEUAW4BUwF6A6ABUgFMAUQBFQFD 168 | ARMC9AHzAf8B9AKRAfIE/wG7ApAB/wG1ApEI/wH0GQAB7QGGAewBkgISA+wBrgL3AZIBrgIHAbwBkQEH 169 | AfEBtQG8AfQFAAESARUBFAFKAXUBoAH2Af8BwwF6AUwBFAEVAUMBEwQAAQcCkQP/ApABkQGQAa4B/wG1 170 | AZEBkAn/GQAB7QGGAewB9wISAewB7QGSAvcC7wIHArwBtQEHAfIBtQG8AfQFAAHrARUBFAFKAVIBoAL2 171 | AaABegFMARQBFQFDARUB/wMAAbUCkQP/BZEB/wG1AZEBkAn/GQAB7QGuAewB9wHqAWwB7QGSAvcC7wIH 172 | ArwBBwG1AbwB8gG1Ad0B9AIAAvcBkgESAhUBSwFMAXoCoAF6AVIBRgEUAhUBQwHtAfcBkgHwAbwCkQb/ 173 | AfYC/wG1AZEBkAn/GQABkgGuAewB7wFtAWwBrgHsA+8CBwO8ArUBvAHzAbUB3QH0AgABEgRDARUBTAFG 174 | AUwDUgJGASQBFQVDAewB9AGRAZAB8AT/AbQCkQH/AbUBkQGQCf8ZAAH3Aa4B7AHvAewDrgGSApEBkgK1 175 | AQcDtQHwAfMBtQHdAfQCAAHrA0MBFQFFCEYBRQEjBUMBbQH/A5EB9AH2Af8BGQGuAZEBvAH/AbUBkQGQ 176 | Cf8ZAAH3Aa4B7AHvAQcC7QP3AbUB7wG1BAcBvALzAbUB8gH0AgAB7wJDARUJRgFFAekBHwEBAREDQwEU 177 | Av8BkAKRAa4BkAKRAa4C/wG1AZEBkAn/GQAB9wGuAewDBwO8A/AE8QHyAvMB9AG1ARkB9AEAAfIB7AFF 178 | AUwBRgFAAiACJQRGASQB6QEfAwECRAHtAfQC/wWRAbUD/wG1AZEBkAn/GQAB9wGuAewCBwO8A/AE8QHy 179 | A/MB9AG1AfMB9AEAAW8BRgJMAUYDIAElASABRgEaAkYBRQEfBAECRQHtAQAB9BX/GgAB9wGuAewBBwO8 180 | A/AE8QHyBPMB9AG1AvQBAAFvAUYBTAJGAyABJQHpAW8BAAFvAUYBRQUBAkUB7TEAAfcBrgETBe0BkgHt 181 | CfcBkgHdAvQBAAFvAUwDRgIgAekBJQFFAZICAAFvAUUFAQJFAe0xAAG8CbUBBwO8AfAC3QHyA/MB7wH/ 182 | AQABbwRGASABHwHpAUQBQwHrAgAB/wEaAUUEAQJFAe0yAAG8DPcG7wH3Af8CAAFvAkYBbwKTAW0DEgHr 183 | BAABbQHrAW4ERQHtkAABQgFNAT4HAAE+AwABKAMAAWADAAEYAwABAQEAAQEFAAEgAQEWAAP/AQABwAEA 184 | AQMBgAF4ARAD/wMAAYABAAEBAYABOAEAA/8DAAGAAgABgAEYAQAD/wMAAYACAAGAAQgBAAP/AwABgAIA 185 | AYACAAP/AwABgAIAAYACAAP/AwABgAIAAYACAAGABQABgAIAAYABAAEBBgABgAIAAYABAAEBBgABgAIA 186 | AYAIAAGAAgABgAgAAYACAAH4AQABDwYAAYACAAH4AQABBwYAAYACAAHACAABgAIAAcAIAAGAAgABwAgA 187 | AYACAAHACAABgAIAAYAIAAGAAgABgAIAAYABAAEBAwABgAIAAYABCAEAA/8DAAGAAgABgAEMAQAD/wMA 188 | AYACAAGAAQwBAAP/AwABwAEAAQEBgAEPAQAD/wMACf8DAAs= 189 | 190 | 191 | -------------------------------------------------------------------------------- /DiscordOverlayHost/Forms/ConfigUIForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace DiscordOverlayHost 2 | { 3 | partial class ConfigUIForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.components = new System.ComponentModel.Container(); 32 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ConfigUIForm)); 33 | this.imageList1 = new System.Windows.Forms.ImageList(this.components); 34 | this.panel1 = new DiscordOverlayHost.Controls.GradientPanel(); 35 | this.pictureBox3 = new System.Windows.Forms.PictureBox(); 36 | this.panel2 = new System.Windows.Forms.Panel(); 37 | this.imgBtnConfig = new DiscordOverlayHost.Controls.ImageButton(); 38 | this.imgBtnAbout = new DiscordOverlayHost.Controls.ImageButton(); 39 | this.label1 = new System.Windows.Forms.Label(); 40 | this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); 41 | this.cbAutoShowMgr = new System.Windows.Forms.CheckBox(); 42 | this.cbAutoClose = new System.Windows.Forms.CheckBox(); 43 | this.panel4 = new System.Windows.Forms.Panel(); 44 | this.cbAutoRunOpenGL = new System.Windows.Forms.CheckBox(); 45 | this.cbAutoRunDirectX = new System.Windows.Forms.CheckBox(); 46 | this.panel3 = new DiscordOverlayHost.Controls.GradientPanel(); 47 | this.btnDirectX = new System.Windows.Forms.Button(); 48 | this.btnOpenGL = new System.Windows.Forms.Button(); 49 | this.label2 = new System.Windows.Forms.Label(); 50 | this.pictureBox2 = new System.Windows.Forms.PictureBox(); 51 | this.panel1.SuspendLayout(); 52 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit(); 53 | this.panel2.SuspendLayout(); 54 | this.flowLayoutPanel1.SuspendLayout(); 55 | this.panel3.SuspendLayout(); 56 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit(); 57 | this.SuspendLayout(); 58 | // 59 | // imageList1 60 | // 61 | this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream"))); 62 | this.imageList1.TransparentColor = System.Drawing.Color.Transparent; 63 | this.imageList1.Images.SetKeyName(0, "DiscordHost_48.png"); 64 | this.imageList1.Images.SetKeyName(1, "OpenGLHost_256.png"); 65 | this.imageList1.Images.SetKeyName(2, "DirectXHost_256.png"); 66 | // 67 | // panel1 68 | // 69 | this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(45))))); 70 | this.panel1.BackgroundColor1 = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(45))))); 71 | this.panel1.BackgroundColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(65)))), ((int)(((byte)(65)))), ((int)(((byte)(85))))); 72 | this.panel1.Controls.Add(this.pictureBox3); 73 | this.panel1.Controls.Add(this.panel2); 74 | this.panel1.Controls.Add(this.panel3); 75 | this.panel1.Controls.Add(this.label2); 76 | this.panel1.Controls.Add(this.pictureBox2); 77 | this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; 78 | this.panel1.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; 79 | this.panel1.Location = new System.Drawing.Point(0, 0); 80 | this.panel1.Name = "panel1"; 81 | this.panel1.Size = new System.Drawing.Size(434, 260); 82 | this.panel1.TabIndex = 0; 83 | // 84 | // pictureBox3 85 | // 86 | this.pictureBox3.BackColor = System.Drawing.Color.Transparent; 87 | this.pictureBox3.Image = global::DiscordOverlayHost.Properties.Resources.Discord_Wordmark_White; 88 | this.pictureBox3.Location = new System.Drawing.Point(62, 0); 89 | this.pictureBox3.Name = "pictureBox3"; 90 | this.pictureBox3.Size = new System.Drawing.Size(100, 50); 91 | this.pictureBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; 92 | this.pictureBox3.TabIndex = 3; 93 | this.pictureBox3.TabStop = false; 94 | // 95 | // panel2 96 | // 97 | this.panel2.BackColor = System.Drawing.Color.Transparent; 98 | this.panel2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; 99 | this.panel2.Controls.Add(this.imgBtnConfig); 100 | this.panel2.Controls.Add(this.imgBtnAbout); 101 | this.panel2.Controls.Add(this.label1); 102 | this.panel2.Controls.Add(this.flowLayoutPanel1); 103 | this.panel2.Location = new System.Drawing.Point(0, 52); 104 | this.panel2.Name = "panel2"; 105 | this.panel2.Size = new System.Drawing.Size(200, 207); 106 | this.panel2.TabIndex = 0; 107 | // 108 | // imgBtnConfig 109 | // 110 | this.imgBtnConfig.Location = new System.Drawing.Point(15, 8); 111 | this.imgBtnConfig.MouseDownImage = global::DiscordOverlayHost.Properties.Resources.gear_32xLG_Dark; 112 | this.imgBtnConfig.MouseOverImage = ((System.Drawing.Image)(resources.GetObject("imgBtnConfig.MouseOverImage"))); 113 | this.imgBtnConfig.Name = "imgBtnConfig"; 114 | this.imgBtnConfig.NormalImage = global::DiscordOverlayHost.Properties.Resources.gear_32xLG; 115 | this.imgBtnConfig.Size = new System.Drawing.Size(20, 20); 116 | this.imgBtnConfig.TabIndex = 3; 117 | this.imgBtnConfig.Text = "imageButton2"; 118 | this.imgBtnConfig.UseVisualStyleBackColor = true; 119 | this.imgBtnConfig.Click += new System.EventHandler(this.imageButton2_Click); 120 | // 121 | // imgBtnAbout 122 | // 123 | this.imgBtnAbout.Location = new System.Drawing.Point(12, 181); 124 | this.imgBtnAbout.MouseDownImage = global::DiscordOverlayHost.Properties.Resources._109_AllAnnotations_Help_24x24_72_Dark; 125 | this.imgBtnAbout.MouseOverImage = global::DiscordOverlayHost.Properties.Resources._109_AllAnnotations_Help_24x24_72; 126 | this.imgBtnAbout.Name = "imgBtnAbout"; 127 | this.imgBtnAbout.NormalImage = global::DiscordOverlayHost.Properties.Resources._109_AllAnnotations_Help_24x24_72_Dim; 128 | this.imgBtnAbout.Size = new System.Drawing.Size(20, 20); 129 | this.imgBtnAbout.TabIndex = 1; 130 | this.imgBtnAbout.UseVisualStyleBackColor = true; 131 | this.imgBtnAbout.Click += new System.EventHandler(this.button1_Click); 132 | // 133 | // label1 134 | // 135 | this.label1.AutoSize = true; 136 | this.label1.BackColor = System.Drawing.Color.Transparent; 137 | this.label1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 138 | this.label1.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 139 | this.label1.ForeColor = System.Drawing.Color.WhiteSmoke; 140 | this.label1.Location = new System.Drawing.Point(41, 11); 141 | this.label1.Name = "label1"; 142 | this.label1.Size = new System.Drawing.Size(94, 17); 143 | this.label1.TabIndex = 2; 144 | this.label1.Text = "Configuration"; 145 | this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; 146 | // 147 | // flowLayoutPanel1 148 | // 149 | this.flowLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 150 | | System.Windows.Forms.AnchorStyles.Left) 151 | | System.Windows.Forms.AnchorStyles.Right))); 152 | this.flowLayoutPanel1.BackColor = System.Drawing.Color.Transparent; 153 | this.flowLayoutPanel1.Controls.Add(this.cbAutoShowMgr); 154 | this.flowLayoutPanel1.Controls.Add(this.cbAutoClose); 155 | this.flowLayoutPanel1.Controls.Add(this.panel4); 156 | this.flowLayoutPanel1.Controls.Add(this.cbAutoRunOpenGL); 157 | this.flowLayoutPanel1.Controls.Add(this.cbAutoRunDirectX); 158 | this.flowLayoutPanel1.Location = new System.Drawing.Point(3, 35); 159 | this.flowLayoutPanel1.Name = "flowLayoutPanel1"; 160 | this.flowLayoutPanel1.Padding = new System.Windows.Forms.Padding(15, 8, 3, 3); 161 | this.flowLayoutPanel1.Size = new System.Drawing.Size(194, 140); 162 | this.flowLayoutPanel1.TabIndex = 0; 163 | // 164 | // cbAutoShowMgr 165 | // 166 | this.cbAutoShowMgr.AutoSize = true; 167 | this.cbAutoShowMgr.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 168 | this.cbAutoShowMgr.ForeColor = System.Drawing.Color.WhiteSmoke; 169 | this.cbAutoShowMgr.Location = new System.Drawing.Point(18, 11); 170 | this.cbAutoShowMgr.Name = "cbAutoShowMgr"; 171 | this.cbAutoShowMgr.Size = new System.Drawing.Size(112, 19); 172 | this.cbAutoShowMgr.TabIndex = 0; 173 | this.cbAutoShowMgr.Text = "Show on startup"; 174 | this.cbAutoShowMgr.UseVisualStyleBackColor = true; 175 | // 176 | // cbAutoClose 177 | // 178 | this.cbAutoClose.AutoSize = true; 179 | this.cbAutoClose.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 180 | this.cbAutoClose.ForeColor = System.Drawing.Color.WhiteSmoke; 181 | this.cbAutoClose.Location = new System.Drawing.Point(18, 36); 182 | this.cbAutoClose.Name = "cbAutoClose"; 183 | this.cbAutoClose.Size = new System.Drawing.Size(134, 19); 184 | this.cbAutoClose.TabIndex = 1; 185 | this.cbAutoClose.Text = "Auto Close Manager"; 186 | this.cbAutoClose.UseVisualStyleBackColor = true; 187 | // 188 | // panel4 189 | // 190 | this.panel4.BackColor = System.Drawing.Color.WhiteSmoke; 191 | this.panel4.Location = new System.Drawing.Point(18, 61); 192 | this.panel4.Name = "panel4"; 193 | this.panel4.Size = new System.Drawing.Size(170, 3); 194 | this.panel4.TabIndex = 1; 195 | // 196 | // cbAutoRunOpenGL 197 | // 198 | this.cbAutoRunOpenGL.AutoSize = true; 199 | this.cbAutoRunOpenGL.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 200 | this.cbAutoRunOpenGL.ForeColor = System.Drawing.Color.WhiteSmoke; 201 | this.cbAutoRunOpenGL.Location = new System.Drawing.Point(18, 70); 202 | this.cbAutoRunOpenGL.Name = "cbAutoRunOpenGL"; 203 | this.cbAutoRunOpenGL.Size = new System.Drawing.Size(168, 19); 204 | this.cbAutoRunOpenGL.TabIndex = 2; 205 | this.cbAutoRunOpenGL.Text = "Auto Launch OpenGL Host"; 206 | this.cbAutoRunOpenGL.UseVisualStyleBackColor = true; 207 | // 208 | // cbAutoRunDirectX 209 | // 210 | this.cbAutoRunDirectX.AutoSize = true; 211 | this.cbAutoRunDirectX.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 212 | this.cbAutoRunDirectX.ForeColor = System.Drawing.Color.WhiteSmoke; 213 | this.cbAutoRunDirectX.Location = new System.Drawing.Point(18, 95); 214 | this.cbAutoRunDirectX.Name = "cbAutoRunDirectX"; 215 | this.cbAutoRunDirectX.Size = new System.Drawing.Size(163, 19); 216 | this.cbAutoRunDirectX.TabIndex = 3; 217 | this.cbAutoRunDirectX.Text = "Auto Launch DirectX Host"; 218 | this.cbAutoRunDirectX.UseVisualStyleBackColor = true; 219 | // 220 | // panel3 221 | // 222 | this.panel3.BackColor = System.Drawing.Color.Transparent; 223 | this.panel3.BackgroundColor1 = System.Drawing.Color.FromArgb(((int)(((byte)(245)))), ((int)(((byte)(245)))), ((int)(((byte)(250))))); 224 | this.panel3.BackgroundColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(250)))), ((int)(((byte)(250)))), ((int)(((byte)(255))))); 225 | this.panel3.Controls.Add(this.btnDirectX); 226 | this.panel3.Controls.Add(this.btnOpenGL); 227 | this.panel3.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal; 228 | this.panel3.Location = new System.Drawing.Point(202, 52); 229 | this.panel3.Name = "panel3"; 230 | this.panel3.Size = new System.Drawing.Size(231, 207); 231 | this.panel3.TabIndex = 2; 232 | // 233 | // btnDirectX 234 | // 235 | this.btnDirectX.BackColor = System.Drawing.Color.Transparent; 236 | this.btnDirectX.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(75))))); 237 | this.btnDirectX.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(100))))); 238 | this.btnDirectX.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(125)))), ((int)(((byte)(125)))), ((int)(((byte)(145))))); 239 | this.btnDirectX.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 240 | this.btnDirectX.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 241 | this.btnDirectX.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; 242 | this.btnDirectX.ImageIndex = 2; 243 | this.btnDirectX.ImageList = this.imageList1; 244 | this.btnDirectX.Location = new System.Drawing.Point(33, 105); 245 | this.btnDirectX.Name = "btnDirectX"; 246 | this.btnDirectX.Size = new System.Drawing.Size(165, 64); 247 | this.btnDirectX.TabIndex = 2; 248 | this.btnDirectX.Text = "Start DirectX Host"; 249 | this.btnDirectX.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; 250 | this.btnDirectX.UseVisualStyleBackColor = false; 251 | this.btnDirectX.Click += new System.EventHandler(this.btnDirectX_Click); 252 | // 253 | // btnOpenGL 254 | // 255 | this.btnOpenGL.BackColor = System.Drawing.Color.Transparent; 256 | this.btnOpenGL.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(75))))); 257 | this.btnOpenGL.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(100))))); 258 | this.btnOpenGL.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(125)))), ((int)(((byte)(125)))), ((int)(((byte)(145))))); 259 | this.btnOpenGL.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 260 | this.btnOpenGL.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 261 | this.btnOpenGL.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; 262 | this.btnOpenGL.ImageIndex = 1; 263 | this.btnOpenGL.ImageList = this.imageList1; 264 | this.btnOpenGL.Location = new System.Drawing.Point(33, 26); 265 | this.btnOpenGL.Name = "btnOpenGL"; 266 | this.btnOpenGL.Size = new System.Drawing.Size(165, 64); 267 | this.btnOpenGL.TabIndex = 1; 268 | this.btnOpenGL.Text = "Start OpenGL Host"; 269 | this.btnOpenGL.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; 270 | this.btnOpenGL.UseVisualStyleBackColor = false; 271 | this.btnOpenGL.Click += new System.EventHandler(this.btnOpenGL_Click); 272 | // 273 | // label2 274 | // 275 | this.label2.AutoSize = true; 276 | this.label2.BackColor = System.Drawing.Color.Transparent; 277 | this.label2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 278 | this.label2.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 279 | this.label2.ForeColor = System.Drawing.Color.WhiteSmoke; 280 | this.label2.Location = new System.Drawing.Point(165, 15); 281 | this.label2.Name = "label2"; 282 | this.label2.Size = new System.Drawing.Size(180, 21); 283 | this.label2.TabIndex = 2; 284 | this.label2.Text = "Overlay Host Manager"; 285 | // 286 | // pictureBox2 287 | // 288 | this.pictureBox2.BackColor = System.Drawing.Color.Transparent; 289 | this.pictureBox2.Image = global::DiscordOverlayHost.Properties.Resources.DiscordHost_48; 290 | this.pictureBox2.Location = new System.Drawing.Point(5, 0); 291 | this.pictureBox2.Name = "pictureBox2"; 292 | this.pictureBox2.Size = new System.Drawing.Size(50, 50); 293 | this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; 294 | this.pictureBox2.TabIndex = 0; 295 | this.pictureBox2.TabStop = false; 296 | // 297 | // ConfigUIForm 298 | // 299 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 300 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 301 | this.BackColor = System.Drawing.Color.White; 302 | this.ClientSize = new System.Drawing.Size(434, 260); 303 | this.Controls.Add(this.panel1); 304 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; 305 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 306 | this.MaximizeBox = false; 307 | this.Name = "ConfigUIForm"; 308 | this.Text = "Host Manager"; 309 | this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ConfigUIForm_FormClosing); 310 | this.Load += new System.EventHandler(this.ConfigUIForm_Load); 311 | this.panel1.ResumeLayout(false); 312 | this.panel1.PerformLayout(); 313 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit(); 314 | this.panel2.ResumeLayout(false); 315 | this.panel2.PerformLayout(); 316 | this.flowLayoutPanel1.ResumeLayout(false); 317 | this.flowLayoutPanel1.PerformLayout(); 318 | this.panel3.ResumeLayout(false); 319 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit(); 320 | this.ResumeLayout(false); 321 | 322 | } 323 | 324 | #endregion 325 | 326 | private DiscordOverlayHost.Controls.GradientPanel panel1; 327 | private System.Windows.Forms.Panel panel2; 328 | private DiscordOverlayHost.Controls.GradientPanel panel3; 329 | private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; 330 | private System.Windows.Forms.PictureBox pictureBox2; 331 | private System.Windows.Forms.Label label1; 332 | private System.Windows.Forms.ImageList imageList1; 333 | private System.Windows.Forms.Button btnOpenGL; 334 | private System.Windows.Forms.CheckBox cbAutoShowMgr; 335 | private System.Windows.Forms.Button btnDirectX; 336 | private System.Windows.Forms.CheckBox cbAutoClose; 337 | private System.Windows.Forms.Panel panel4; 338 | private System.Windows.Forms.CheckBox cbAutoRunOpenGL; 339 | private System.Windows.Forms.CheckBox cbAutoRunDirectX; 340 | private System.Windows.Forms.Label label2; 341 | private System.Windows.Forms.PictureBox pictureBox3; 342 | private Controls.ImageButton imgBtnAbout; 343 | private Controls.ImageButton imgBtnConfig; 344 | } 345 | } -------------------------------------------------------------------------------- /DiscordOverlayHost/Forms/ConfigUIForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | 4 | namespace DiscordOverlayHost 5 | { 6 | public partial class ConfigUIForm : Form 7 | { 8 | private HostApplicationContext _context; 9 | public ConfigUIForm(HostApplicationContext context) 10 | { 11 | _context = context; 12 | InitializeComponent(); 13 | flowLayoutPanel1.Height = Properties.Settings.Default.ConfigPanelClosed ? 10 : 140; 14 | SetupRollupTimer(); 15 | } 16 | 17 | private void btnClose_Click(object sender, EventArgs e) 18 | { 19 | this.Close(); 20 | } 21 | 22 | private void ConfigUIForm_Load(object sender, EventArgs e) 23 | { 24 | cbAutoShowMgr.Checked = Properties.Settings.Default.ShowSettingsOnStart; 25 | cbAutoRunOpenGL.Checked = Properties.Settings.Default.AutoStartOpenGL; 26 | cbAutoRunDirectX.Checked = Properties.Settings.Default.AutoStartDirectX; 27 | cbAutoClose.Checked = Properties.Settings.Default.AutoCloseManager; 28 | } 29 | 30 | private void ConfigUIForm_FormClosing(object sender, FormClosingEventArgs e) 31 | { 32 | Properties.Settings.Default.ShowSettingsOnStart = cbAutoShowMgr.Checked; 33 | Properties.Settings.Default.AutoStartOpenGL = cbAutoRunOpenGL.Checked; 34 | Properties.Settings.Default.AutoStartDirectX = cbAutoRunDirectX.Checked; 35 | Properties.Settings.Default.AutoCloseManager = cbAutoClose.Checked; 36 | Properties.Settings.Default.Save(); 37 | } 38 | 39 | private void btnOpenGL_Click(object sender, EventArgs e) 40 | { 41 | _context.RunOpenGLHost(); 42 | } 43 | 44 | private void btnDirectX_Click(object sender, EventArgs e) 45 | { 46 | _context.RunDirectXHost(); 47 | } 48 | 49 | private void button1_Click(object sender, EventArgs e) 50 | { 51 | new AboutDialog().ShowDialog(this); 52 | } 53 | 54 | private Timer rollupTimer; 55 | 56 | private void SetupRollupTimer() 57 | { 58 | rollupTimer = new Timer(); 59 | rollupTimer.Interval = 15; 60 | rollupTimer.Tick += RollupTimer_Tick; 61 | } 62 | 63 | private void RollupTimer_Tick(object sender, EventArgs e) 64 | { 65 | int step = 20; 66 | if (Properties.Settings.Default.ConfigPanelClosed) 67 | { 68 | flowLayoutPanel1.Height = flowLayoutPanel1.Height < 10+step ? 10 : flowLayoutPanel1.Height - step; 69 | if (flowLayoutPanel1.Height <= 10) 70 | { 71 | rollupTimer.Stop(); 72 | } 73 | } 74 | else 75 | { 76 | flowLayoutPanel1.Height = flowLayoutPanel1.Height > 140 - step ? 140 : flowLayoutPanel1.Height + step; 77 | if (flowLayoutPanel1.Height >= 140) 78 | { 79 | rollupTimer.Stop(); 80 | } 81 | } 82 | } 83 | 84 | private void imageButton2_Click(object sender, EventArgs e) 85 | { 86 | Properties.Settings.Default.ConfigPanelClosed = !Properties.Settings.Default.ConfigPanelClosed; 87 | Properties.Settings.Default.Save(); 88 | 89 | if (!rollupTimer.Enabled) 90 | rollupTimer.Start(); 91 | } 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /DiscordOverlayHost/Forms/frmConfiguration.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace DiscordOverlayHost 2 | { 3 | partial class frmConfiguration 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.components = new System.ComponentModel.Container(); 32 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmConfiguration)); 33 | this.imageList1 = new System.Windows.Forms.ImageList(this.components); 34 | this.btnOpenGL = new System.Windows.Forms.Button(); 35 | this.groupBox1 = new System.Windows.Forms.GroupBox(); 36 | this.cbAutoRunOpenGL = new System.Windows.Forms.CheckBox(); 37 | this.groupBox2 = new System.Windows.Forms.GroupBox(); 38 | this.cbAutoRunDirectX = new System.Windows.Forms.CheckBox(); 39 | this.btnDirectX = new System.Windows.Forms.Button(); 40 | this.cbAutoClose = new System.Windows.Forms.CheckBox(); 41 | this.cbAutoShowMgr = new System.Windows.Forms.CheckBox(); 42 | this.menuStrip1 = new System.Windows.Forms.MenuStrip(); 43 | this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 44 | this.groupBox1.SuspendLayout(); 45 | this.groupBox2.SuspendLayout(); 46 | this.menuStrip1.SuspendLayout(); 47 | this.SuspendLayout(); 48 | // 49 | // imageList1 50 | // 51 | this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream"))); 52 | this.imageList1.TransparentColor = System.Drawing.Color.Transparent; 53 | this.imageList1.Images.SetKeyName(0, "App.ico"); 54 | this.imageList1.Images.SetKeyName(1, "directx-11-logo.png"); 55 | // 56 | // btnOpenGL 57 | // 58 | this.btnOpenGL.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; 59 | this.btnOpenGL.ImageIndex = 0; 60 | this.btnOpenGL.ImageList = this.imageList1; 61 | this.btnOpenGL.Location = new System.Drawing.Point(146, 19); 62 | this.btnOpenGL.Name = "btnOpenGL"; 63 | this.btnOpenGL.Size = new System.Drawing.Size(149, 45); 64 | this.btnOpenGL.TabIndex = 0; 65 | this.btnOpenGL.Text = "Start OpenGL Host"; 66 | this.btnOpenGL.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; 67 | this.btnOpenGL.UseVisualStyleBackColor = true; 68 | this.btnOpenGL.Click += new System.EventHandler(this.btnOpenGL_Click); 69 | // 70 | // groupBox1 71 | // 72 | this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 73 | this.groupBox1.Controls.Add(this.cbAutoRunOpenGL); 74 | this.groupBox1.Controls.Add(this.btnOpenGL); 75 | this.groupBox1.Location = new System.Drawing.Point(8, 82); 76 | this.groupBox1.Name = "groupBox1"; 77 | this.groupBox1.Size = new System.Drawing.Size(314, 100); 78 | this.groupBox1.TabIndex = 2; 79 | this.groupBox1.TabStop = false; 80 | this.groupBox1.Text = "OpenGL"; 81 | // 82 | // cbAutoRunOpenGL 83 | // 84 | this.cbAutoRunOpenGL.AutoSize = true; 85 | this.cbAutoRunOpenGL.Location = new System.Drawing.Point(146, 70); 86 | this.cbAutoRunOpenGL.Name = "cbAutoRunOpenGL"; 87 | this.cbAutoRunOpenGL.Size = new System.Drawing.Size(149, 17); 88 | this.cbAutoRunOpenGL.TabIndex = 3; 89 | this.cbAutoRunOpenGL.Text = "Auto launch OpenGL host"; 90 | this.cbAutoRunOpenGL.UseVisualStyleBackColor = true; 91 | // 92 | // groupBox2 93 | // 94 | this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 95 | this.groupBox2.Controls.Add(this.cbAutoRunDirectX); 96 | this.groupBox2.Controls.Add(this.btnDirectX); 97 | this.groupBox2.Location = new System.Drawing.Point(8, 199); 98 | this.groupBox2.Name = "groupBox2"; 99 | this.groupBox2.Size = new System.Drawing.Size(314, 100); 100 | this.groupBox2.TabIndex = 2; 101 | this.groupBox2.TabStop = false; 102 | this.groupBox2.Text = "DirectX"; 103 | // 104 | // cbAutoRunDirectX 105 | // 106 | this.cbAutoRunDirectX.AutoSize = true; 107 | this.cbAutoRunDirectX.Checked = true; 108 | this.cbAutoRunDirectX.CheckState = System.Windows.Forms.CheckState.Checked; 109 | this.cbAutoRunDirectX.Location = new System.Drawing.Point(146, 70); 110 | this.cbAutoRunDirectX.Name = "cbAutoRunDirectX"; 111 | this.cbAutoRunDirectX.Size = new System.Drawing.Size(144, 17); 112 | this.cbAutoRunDirectX.TabIndex = 3; 113 | this.cbAutoRunDirectX.Text = "Auto launch DirectX host"; 114 | this.cbAutoRunDirectX.UseVisualStyleBackColor = true; 115 | // 116 | // btnDirectX 117 | // 118 | this.btnDirectX.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; 119 | this.btnDirectX.ImageIndex = 1; 120 | this.btnDirectX.ImageList = this.imageList1; 121 | this.btnDirectX.Location = new System.Drawing.Point(146, 19); 122 | this.btnDirectX.Name = "btnDirectX"; 123 | this.btnDirectX.Size = new System.Drawing.Size(149, 45); 124 | this.btnDirectX.TabIndex = 0; 125 | this.btnDirectX.Text = "Start DirectX Host"; 126 | this.btnDirectX.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; 127 | this.btnDirectX.UseVisualStyleBackColor = true; 128 | this.btnDirectX.Click += new System.EventHandler(this.btnDirectX_Click); 129 | // 130 | // cbAutoClose 131 | // 132 | this.cbAutoClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 133 | this.cbAutoClose.AutoSize = true; 134 | this.cbAutoClose.Location = new System.Drawing.Point(154, 55); 135 | this.cbAutoClose.Name = "cbAutoClose"; 136 | this.cbAutoClose.Size = new System.Drawing.Size(163, 17); 137 | this.cbAutoClose.TabIndex = 1; 138 | this.cbAutoClose.Text = "Close manager with last form."; 139 | this.cbAutoClose.UseVisualStyleBackColor = true; 140 | // 141 | // cbAutoShowMgr 142 | // 143 | this.cbAutoShowMgr.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 144 | this.cbAutoShowMgr.AutoSize = true; 145 | this.cbAutoShowMgr.Location = new System.Drawing.Point(154, 32); 146 | this.cbAutoShowMgr.Name = "cbAutoShowMgr"; 147 | this.cbAutoShowMgr.Size = new System.Drawing.Size(148, 17); 148 | this.cbAutoShowMgr.TabIndex = 1; 149 | this.cbAutoShowMgr.Text = "Show this form on startup."; 150 | this.cbAutoShowMgr.UseVisualStyleBackColor = true; 151 | // 152 | // menuStrip1 153 | // 154 | this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 155 | this.aboutToolStripMenuItem}); 156 | this.menuStrip1.Location = new System.Drawing.Point(0, 0); 157 | this.menuStrip1.Name = "menuStrip1"; 158 | this.menuStrip1.Size = new System.Drawing.Size(334, 24); 159 | this.menuStrip1.TabIndex = 3; 160 | this.menuStrip1.Text = "menuStrip1"; 161 | // 162 | // aboutToolStripMenuItem 163 | // 164 | this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem"; 165 | this.aboutToolStripMenuItem.Size = new System.Drawing.Size(52, 20); 166 | this.aboutToolStripMenuItem.Text = "About"; 167 | // 168 | // frmConfiguration 169 | // 170 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 171 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 172 | this.ClientSize = new System.Drawing.Size(334, 311); 173 | this.Controls.Add(this.menuStrip1); 174 | this.Controls.Add(this.groupBox2); 175 | this.Controls.Add(this.groupBox1); 176 | this.Controls.Add(this.cbAutoClose); 177 | this.Controls.Add(this.cbAutoShowMgr); 178 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; 179 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 180 | this.MainMenuStrip = this.menuStrip1; 181 | this.MaximizeBox = false; 182 | this.Name = "frmConfiguration"; 183 | this.Text = "Discord Overlay Host Manager"; 184 | this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmGlHost_FormClosing); 185 | this.Load += new System.EventHandler(this.frmConfiguration_Load); 186 | this.groupBox1.ResumeLayout(false); 187 | this.groupBox1.PerformLayout(); 188 | this.groupBox2.ResumeLayout(false); 189 | this.groupBox2.PerformLayout(); 190 | this.menuStrip1.ResumeLayout(false); 191 | this.menuStrip1.PerformLayout(); 192 | this.ResumeLayout(false); 193 | this.PerformLayout(); 194 | 195 | } 196 | 197 | #endregion 198 | 199 | private System.Windows.Forms.Button btnOpenGL; 200 | private System.Windows.Forms.ImageList imageList1; 201 | private System.Windows.Forms.CheckBox cbAutoShowMgr; 202 | private System.Windows.Forms.GroupBox groupBox1; 203 | private System.Windows.Forms.CheckBox cbAutoRunOpenGL; 204 | private System.Windows.Forms.GroupBox groupBox2; 205 | private System.Windows.Forms.Button btnDirectX; 206 | private System.Windows.Forms.CheckBox cbAutoRunDirectX; 207 | private System.Windows.Forms.CheckBox cbAutoClose; 208 | private System.Windows.Forms.MenuStrip menuStrip1; 209 | private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem; 210 | } 211 | } 212 | 213 | -------------------------------------------------------------------------------- /DiscordOverlayHost/Forms/frmConfiguration.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | 4 | namespace DiscordOverlayHost 5 | { 6 | public partial class frmConfiguration : Form 7 | { 8 | private HostApplicationContext _context; 9 | 10 | public frmConfiguration(HostApplicationContext context) 11 | { 12 | InitializeComponent(); 13 | _context = context; 14 | } 15 | 16 | private void btnOpenGL_Click(object sender, EventArgs e) 17 | { 18 | _context.RunOpenGLHost(); 19 | } 20 | 21 | private void btnDirectX_Click(object sender, EventArgs e) 22 | { 23 | _context.RunDirectXHost(); 24 | } 25 | 26 | private void frmGlHost_FormClosing(object sender, FormClosingEventArgs e) 27 | { 28 | Properties.Settings.Default.ShowSettingsOnStart = cbAutoShowMgr.Checked; 29 | Properties.Settings.Default.AutoStartOpenGL = cbAutoRunOpenGL.Checked; 30 | Properties.Settings.Default.AutoStartDirectX = cbAutoRunDirectX.Checked; 31 | Properties.Settings.Default.AutoCloseManager = cbAutoClose.Checked; 32 | Properties.Settings.Default.Save(); 33 | } 34 | 35 | private void frmConfiguration_Load(object sender, EventArgs e) 36 | { 37 | cbAutoShowMgr.Checked = Properties.Settings.Default.ShowSettingsOnStart; 38 | cbAutoRunOpenGL.Checked = Properties.Settings.Default.AutoStartOpenGL; 39 | cbAutoRunDirectX.Checked = Properties.Settings.Default.AutoStartDirectX; 40 | cbAutoClose.Checked = Properties.Settings.Default.AutoCloseManager; 41 | } 42 | 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /DiscordOverlayHost/HostApplicationContext.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | using DiscordOverlayHost.TrayNotification; 4 | using System.Diagnostics; 5 | using System.Drawing; 6 | 7 | namespace DiscordOverlayHost 8 | { 9 | public class HostApplicationContext : ApplicationContext 10 | { 11 | private ConfigUIForm configForm; 12 | 13 | private Process glProcess; 14 | private Process dxProcess; 15 | 16 | private TrayNotificationManager trayNotification; 17 | 18 | public bool IsClosing { get; private set; } 19 | 20 | public HostApplicationContext() 21 | { 22 | trayNotification = new TrayNotificationManager(); 23 | trayNotification.ConfigurationClick += TrayNotification_ConfigurationClick; 24 | trayNotification.OpenGLClick += TrayNotification_OpenGLClick; 25 | trayNotification.DirectXClick += TrayNotification_DirectXClick; 26 | trayNotification.QuitClick += TrayNotification_QuitClick; 27 | 28 | if (Properties.Settings.Default.ShowSettingsOnStart) 29 | { 30 | RunConfigurationForm(); 31 | } 32 | if (Properties.Settings.Default.AutoStartOpenGL) 33 | { 34 | RunOpenGLHost(); 35 | } 36 | if (Properties.Settings.Default.AutoStartDirectX) 37 | { 38 | RunDirectXHost(); 39 | } 40 | } 41 | 42 | private void TrayNotification_ConfigurationClick(object sender, EventArgs e) 43 | { 44 | RunConfigurationForm(); 45 | } 46 | 47 | private void TrayNotification_OpenGLClick(object sender, EventArgs e) 48 | { 49 | RunOpenGLHost(); 50 | } 51 | 52 | private void TrayNotification_DirectXClick(object sender, EventArgs e) 53 | { 54 | RunDirectXHost(); 55 | } 56 | 57 | private void TrayNotification_QuitClick(object sender, EventArgs e) 58 | { 59 | CloseContext(); 60 | } 61 | 62 | internal void RunConfigurationForm() 63 | { 64 | if (configForm != null && !configForm.IsDisposed) 65 | { 66 | configForm.Show(); 67 | configForm.BringToFront(); 68 | } 69 | else 70 | { 71 | configForm = new ConfigUIForm(this); 72 | configForm.FormClosed += ConfigForm_FormClosed; 73 | configForm.Disposed += ConfigForm_Disposed; 74 | configForm.Show(); 75 | } 76 | } 77 | 78 | internal void RunOpenGLHost() 79 | { 80 | try 81 | { 82 | //If already running bring to front 83 | if (glProcess != null && !glProcess.HasExited) 84 | { 85 | Win32.NativeMethods.SetForegroundWindow(glProcess.MainWindowHandle); 86 | Win32.NativeMethods.ShowWindow(glProcess.MainWindowHandle, Win32.NativeMethods.ShowWindowOptions.SW_RESTORE); 87 | return; 88 | } 89 | 90 | //Create new process 91 | glProcess = Process.Start(@".\Hosts\OpenGlHost.exe"); 92 | glProcess.EnableRaisingEvents = true; 93 | glProcess.Exited += Process_Exited; 94 | glProcess.WaitForInputIdle(); 95 | Rectangle screenBounds = Screen.FromHandle(glProcess.MainWindowHandle).Bounds; 96 | Win32.NativeMethods.SetWindowPos(glProcess.MainWindowHandle, 97 | (configForm != null && configForm.Visible) ? configForm.Handle : (IntPtr)Win32.NativeMethods.SpecialWindowHandles.HWND_TOP, 98 | (screenBounds.Width / 2) - 350, //Place window left of center screen; 99 | (screenBounds.Height - 450) / 2, //Place window center height of screen; 100 | 0, 101 | 0, 102 | Win32.NativeMethods.SetWindowPosFlags.SWP_NOSIZE); 103 | trayNotification.SetOpenGlStatus(true); 104 | } 105 | catch (Exception ex) 106 | { 107 | MessageBox.Show(string.Format("There was an error opening the OpenGL Host window:\r\n{0}", ex.Message), "Discord Overlay Host", MessageBoxButtons.OK, MessageBoxIcon.Error); 108 | } 109 | } 110 | 111 | internal void RunDirectXHost() 112 | { 113 | try 114 | { 115 | //If already running bring to front 116 | if (dxProcess != null && !dxProcess.HasExited) 117 | { 118 | Win32.NativeMethods.SetForegroundWindow(dxProcess.MainWindowHandle); 119 | Win32.NativeMethods.ShowWindow(dxProcess.MainWindowHandle, Win32.NativeMethods.ShowWindowOptions.SW_RESTORE); 120 | return; 121 | } 122 | 123 | //Create new process 124 | dxProcess = Process.Start(@".\Hosts\DirectXHost.exe"); 125 | dxProcess.EnableRaisingEvents = true; 126 | dxProcess.Exited += Process_Exited; 127 | dxProcess.WaitForInputIdle(); 128 | Rectangle screenBounds = Screen.FromHandle(dxProcess.MainWindowHandle).Bounds; 129 | Win32.NativeMethods.SetWindowPos(dxProcess.MainWindowHandle, 130 | (configForm != null && configForm.Visible) ? configForm.Handle : (IntPtr)Win32.NativeMethods.SpecialWindowHandles.HWND_TOP, 131 | (screenBounds.Width / 2), //Place window right of center screen; 132 | (screenBounds.Height - 450) / 2, //Place window center height of screen; 133 | 0, 134 | 0, 135 | Win32.NativeMethods.SetWindowPosFlags.SWP_NOSIZE); 136 | Win32.NativeMethods.SetForegroundWindow(dxProcess.MainWindowHandle); 137 | trayNotification.SetDirectXStatus(true); 138 | } 139 | catch (Exception ex) 140 | { 141 | MessageBox.Show(string.Format("There was an error opening the DirectX Host window:\r\n{0}", ex.Message), "Discord Overlay Host", MessageBoxButtons.OK, MessageBoxIcon.Error); 142 | } 143 | } 144 | 145 | private void Process_Exited(object sender, EventArgs e) 146 | { 147 | Process process = sender as Process; 148 | if (process != null) 149 | process.Exited -= Process_Exited; 150 | 151 | if (glProcess == null || glProcess.HasExited) 152 | trayNotification.SetOpenGlStatus(false); 153 | if (dxProcess == null || dxProcess.HasExited) 154 | trayNotification.SetDirectXStatus(false); 155 | 156 | CheckCloseContext(); 157 | } 158 | 159 | private void ConfigForm_FormClosed(object sender, FormClosedEventArgs e) 160 | { 161 | Form form = sender as Form; 162 | form.Dispose(); 163 | } 164 | private void ConfigForm_Disposed(object sender, EventArgs e) 165 | { 166 | CheckCloseContext(); 167 | } 168 | 169 | private void CheckCloseContext() 170 | { 171 | if (IsClosing) return; 172 | 173 | if (!Properties.Settings.Default.AutoCloseManager) 174 | { 175 | return; 176 | } 177 | 178 | if (configForm != null && configForm.Created && configForm.Visible) return; 179 | 180 | if (glProcess != null && !glProcess.HasExited) return; 181 | 182 | if (dxProcess != null && !dxProcess.HasExited) return; 183 | 184 | CloseContext(); 185 | } 186 | 187 | internal void CloseContext() 188 | { 189 | IsClosing = true; 190 | try 191 | { 192 | if (configForm != null && !configForm.IsDisposed) 193 | { 194 | if (configForm.IsHandleCreated) 195 | configForm.Close(); 196 | } 197 | 198 | if (glProcess != null && !glProcess.HasExited) 199 | { 200 | glProcess.CloseMainWindow(); 201 | if (!glProcess.WaitForExit(3000)) 202 | { 203 | glProcess.Close(); 204 | } 205 | } 206 | 207 | if (dxProcess != null && !dxProcess.HasExited) 208 | { 209 | dxProcess.CloseMainWindow(); 210 | if (!dxProcess.WaitForExit(3000)) 211 | { 212 | dxProcess.Close(); 213 | } 214 | } 215 | } 216 | catch(Exception ex) 217 | { 218 | Debug.WriteLine(ex); 219 | } 220 | ExitThread(); 221 | } 222 | 223 | protected override void Dispose(bool disposing) 224 | { 225 | trayNotification.Dispose(); 226 | if (configForm != null && !configForm.IsDisposed) 227 | { 228 | configForm.Dispose(); 229 | } 230 | 231 | base.Dispose(disposing); 232 | } 233 | } 234 | } 235 | -------------------------------------------------------------------------------- /DiscordOverlayHost/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | 4 | namespace DiscordOverlayHost 5 | { 6 | static class Program 7 | { 8 | /// 9 | /// The main entry point for the application. 10 | /// 11 | [STAThread] 12 | static void Main() 13 | { 14 | Application.EnableVisualStyles(); 15 | Application.SetCompatibleTextRenderingDefault(false); 16 | Application.Run(new HostApplicationContext()); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /DiscordOverlayHost/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("DiscordOverlayHost")] 9 | [assembly: AssemblyDescription("Host Manager application to capture Discord game overlays.")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("DiscordOverlayHost")] 13 | [assembly: AssemblyCopyright("Copyright © 2016")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("05eee403-992c-497e-b3d2-fae06cd7e68e")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.2.0")] 36 | [assembly: AssemblyFileVersion("1.0.2.0")] 37 | -------------------------------------------------------------------------------- /DiscordOverlayHost/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace DiscordOverlayHost.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DiscordOverlayHost.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Looks up a localized resource of type System.Drawing.Bitmap. 65 | /// 66 | internal static System.Drawing.Bitmap _109_AllAnnotations_Help_24x24_72 { 67 | get { 68 | object obj = ResourceManager.GetObject("_109_AllAnnotations_Help_24x24_72", resourceCulture); 69 | return ((System.Drawing.Bitmap)(obj)); 70 | } 71 | } 72 | 73 | /// 74 | /// Looks up a localized resource of type System.Drawing.Bitmap. 75 | /// 76 | internal static System.Drawing.Bitmap _109_AllAnnotations_Help_24x24_72_Dark { 77 | get { 78 | object obj = ResourceManager.GetObject("_109_AllAnnotations_Help_24x24_72_Dark", resourceCulture); 79 | return ((System.Drawing.Bitmap)(obj)); 80 | } 81 | } 82 | 83 | /// 84 | /// Looks up a localized resource of type System.Drawing.Bitmap. 85 | /// 86 | internal static System.Drawing.Bitmap _109_AllAnnotations_Help_24x24_72_Dim { 87 | get { 88 | object obj = ResourceManager.GetObject("_109_AllAnnotations_Help_24x24_72_Dim", resourceCulture); 89 | return ((System.Drawing.Bitmap)(obj)); 90 | } 91 | } 92 | 93 | /// 94 | /// Looks up a localized resource of type System.Drawing.Bitmap. 95 | /// 96 | internal static System.Drawing.Bitmap _305_Close_24x24_72 { 97 | get { 98 | object obj = ResourceManager.GetObject("_305_Close_24x24_72", resourceCulture); 99 | return ((System.Drawing.Bitmap)(obj)); 100 | } 101 | } 102 | 103 | /// 104 | /// Looks up a localized resource of type System.Drawing.Bitmap. 105 | /// 106 | internal static System.Drawing.Bitmap _305_Close_24x24_Red { 107 | get { 108 | object obj = ResourceManager.GetObject("_305_Close_24x24_Red", resourceCulture); 109 | return ((System.Drawing.Bitmap)(obj)); 110 | } 111 | } 112 | 113 | /// 114 | /// Looks up a localized resource of type System.Drawing.Bitmap. 115 | /// 116 | internal static System.Drawing.Bitmap _305_Close_24x24_Red_Dark { 117 | get { 118 | object obj = ResourceManager.GetObject("_305_Close_24x24_Red_Dark", resourceCulture); 119 | return ((System.Drawing.Bitmap)(obj)); 120 | } 121 | } 122 | 123 | /// 124 | /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). 125 | /// 126 | internal static System.Drawing.Icon AppIcon { 127 | get { 128 | object obj = ResourceManager.GetObject("AppIcon", resourceCulture); 129 | return ((System.Drawing.Icon)(obj)); 130 | } 131 | } 132 | 133 | /// 134 | /// Looks up a localized resource of type System.Drawing.Bitmap. 135 | /// 136 | internal static System.Drawing.Bitmap Discord_Logo { 137 | get { 138 | object obj = ResourceManager.GetObject("Discord_Logo", resourceCulture); 139 | return ((System.Drawing.Bitmap)(obj)); 140 | } 141 | } 142 | 143 | /// 144 | /// Looks up a localized resource of type System.Drawing.Bitmap. 145 | /// 146 | internal static System.Drawing.Bitmap Discord_Wordmark_White { 147 | get { 148 | object obj = ResourceManager.GetObject("Discord_Wordmark_White", resourceCulture); 149 | return ((System.Drawing.Bitmap)(obj)); 150 | } 151 | } 152 | 153 | /// 154 | /// Looks up a localized resource of type System.Drawing.Bitmap. 155 | /// 156 | internal static System.Drawing.Bitmap DiscordHost { 157 | get { 158 | object obj = ResourceManager.GetObject("DiscordHost", resourceCulture); 159 | return ((System.Drawing.Bitmap)(obj)); 160 | } 161 | } 162 | 163 | /// 164 | /// Looks up a localized resource of type System.Drawing.Bitmap. 165 | /// 166 | internal static System.Drawing.Bitmap DiscordHost_48 { 167 | get { 168 | object obj = ResourceManager.GetObject("DiscordHost_48", resourceCulture); 169 | return ((System.Drawing.Bitmap)(obj)); 170 | } 171 | } 172 | 173 | /// 174 | /// Looks up a localized resource of type System.Drawing.Bitmap. 175 | /// 176 | internal static System.Drawing.Bitmap gear_32xLG { 177 | get { 178 | object obj = ResourceManager.GetObject("gear_32xLG", resourceCulture); 179 | return ((System.Drawing.Bitmap)(obj)); 180 | } 181 | } 182 | 183 | /// 184 | /// Looks up a localized resource of type System.Drawing.Bitmap. 185 | /// 186 | internal static System.Drawing.Bitmap gear_32xLG_Dark { 187 | get { 188 | object obj = ResourceManager.GetObject("gear_32xLG_Dark", resourceCulture); 189 | return ((System.Drawing.Bitmap)(obj)); 190 | } 191 | } 192 | 193 | /// 194 | /// Looks up a localized resource of type System.Drawing.Bitmap. 195 | /// 196 | internal static System.Drawing.Bitmap gear_32xLG_Lit { 197 | get { 198 | object obj = ResourceManager.GetObject("gear_32xLG_Lit", resourceCulture); 199 | return ((System.Drawing.Bitmap)(obj)); 200 | } 201 | } 202 | 203 | /// 204 | /// Looks up a localized resource of type System.Drawing.Bitmap. 205 | /// 206 | internal static System.Drawing.Bitmap Microsoft_DirectX_logo { 207 | get { 208 | object obj = ResourceManager.GetObject("Microsoft_DirectX_logo", resourceCulture); 209 | return ((System.Drawing.Bitmap)(obj)); 210 | } 211 | } 212 | 213 | /// 214 | /// Looks up a localized resource of type System.Drawing.Bitmap. 215 | /// 216 | internal static System.Drawing.Bitmap OpenGL_100px_Nov14 { 217 | get { 218 | object obj = ResourceManager.GetObject("OpenGL_100px_Nov14", resourceCulture); 219 | return ((System.Drawing.Bitmap)(obj)); 220 | } 221 | } 222 | 223 | /// 224 | /// Looks up a localized resource of type System.Drawing.Bitmap. 225 | /// 226 | internal static System.Drawing.Bitmap OpenTK_logo { 227 | get { 228 | object obj = ResourceManager.GetObject("OpenTK_logo", resourceCulture); 229 | return ((System.Drawing.Bitmap)(obj)); 230 | } 231 | } 232 | 233 | /// 234 | /// Looks up a localized resource of type System.Drawing.Bitmap. 235 | /// 236 | internal static System.Drawing.Bitmap SharpDXlogo { 237 | get { 238 | object obj = ResourceManager.GetObject("SharpDXlogo", resourceCulture); 239 | return ((System.Drawing.Bitmap)(obj)); 240 | } 241 | } 242 | } 243 | } 244 | -------------------------------------------------------------------------------- /DiscordOverlayHost/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 122 | ..\Resources\App.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 123 | 124 | 125 | ..\Resources\DiscordHost.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 126 | 127 | 128 | ..\Resources\Discord-Wordmark-White.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 129 | 130 | 131 | ..\Resources\gear_32xLG.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 132 | 133 | 134 | ..\Resources\109_AllAnnotations_Help_24x24_72.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 135 | 136 | 137 | ..\Resources\DiscordHost_48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 138 | 139 | 140 | ..\Resources\305_Close_24x24_72.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 141 | 142 | 143 | ..\Resources\109_AllAnnotations_Help_24x24_72_Dark.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 144 | 145 | 146 | ..\Resources\109_AllAnnotations_Help_24x24_72_Dim.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 147 | 148 | 149 | ..\Resources\Microsoft-DirectX-logo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 150 | 151 | 152 | ..\Resources\OpenGL_100px_Nov14.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 153 | 154 | 155 | ..\Resources\OpenTK_logo.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 156 | 157 | 158 | ..\Resources\SharpDXlogo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 159 | 160 | 161 | ..\Resources\305_Close_24x24_Red.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 162 | 163 | 164 | ..\Resources\305_Close_24x24_Red_Dark.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 165 | 166 | 167 | ..\Resources\Discord-Logo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 168 | 169 | 170 | ..\Resources\gear_32xLG_Dark.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 171 | 172 | 173 | ..\Resources\gear_32xLG_Lit.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 174 | 175 | -------------------------------------------------------------------------------- /DiscordOverlayHost/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace DiscordOverlayHost.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | 26 | [global::System.Configuration.UserScopedSettingAttribute()] 27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 28 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 29 | public bool ShowSettingsOnStart { 30 | get { 31 | return ((bool)(this["ShowSettingsOnStart"])); 32 | } 33 | set { 34 | this["ShowSettingsOnStart"] = value; 35 | } 36 | } 37 | 38 | [global::System.Configuration.UserScopedSettingAttribute()] 39 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 40 | [global::System.Configuration.DefaultSettingValueAttribute("False")] 41 | public bool AutoStartOpenGL { 42 | get { 43 | return ((bool)(this["AutoStartOpenGL"])); 44 | } 45 | set { 46 | this["AutoStartOpenGL"] = value; 47 | } 48 | } 49 | 50 | [global::System.Configuration.UserScopedSettingAttribute()] 51 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 52 | [global::System.Configuration.DefaultSettingValueAttribute("False")] 53 | public bool AutoStartDirectX { 54 | get { 55 | return ((bool)(this["AutoStartDirectX"])); 56 | } 57 | set { 58 | this["AutoStartDirectX"] = value; 59 | } 60 | } 61 | 62 | [global::System.Configuration.UserScopedSettingAttribute()] 63 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 64 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 65 | public bool AutoCloseManager { 66 | get { 67 | return ((bool)(this["AutoCloseManager"])); 68 | } 69 | set { 70 | this["AutoCloseManager"] = value; 71 | } 72 | } 73 | 74 | [global::System.Configuration.UserScopedSettingAttribute()] 75 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 76 | [global::System.Configuration.DefaultSettingValueAttribute("False")] 77 | public bool ConfigPanelClosed { 78 | get { 79 | return ((bool)(this["ConfigPanelClosed"])); 80 | } 81 | set { 82 | this["ConfigPanelClosed"] = value; 83 | } 84 | } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /DiscordOverlayHost/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | True 7 | 8 | 9 | False 10 | 11 | 12 | False 13 | 14 | 15 | True 16 | 17 | 18 | False 19 | 20 | 21 | -------------------------------------------------------------------------------- /DiscordOverlayHost/Resources/109_AllAnnotations_Help_24x24_72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AsterDW/DiscordOverlayHost/4e07204f59d60feeff962aee2dadc1b89cd41ab4/DiscordOverlayHost/Resources/109_AllAnnotations_Help_24x24_72.png -------------------------------------------------------------------------------- /DiscordOverlayHost/Resources/109_AllAnnotations_Help_24x24_72_Dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AsterDW/DiscordOverlayHost/4e07204f59d60feeff962aee2dadc1b89cd41ab4/DiscordOverlayHost/Resources/109_AllAnnotations_Help_24x24_72_Dark.png -------------------------------------------------------------------------------- /DiscordOverlayHost/Resources/109_AllAnnotations_Help_24x24_72_Dim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AsterDW/DiscordOverlayHost/4e07204f59d60feeff962aee2dadc1b89cd41ab4/DiscordOverlayHost/Resources/109_AllAnnotations_Help_24x24_72_Dim.png -------------------------------------------------------------------------------- /DiscordOverlayHost/Resources/305_Close_24x24_72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AsterDW/DiscordOverlayHost/4e07204f59d60feeff962aee2dadc1b89cd41ab4/DiscordOverlayHost/Resources/305_Close_24x24_72.png -------------------------------------------------------------------------------- /DiscordOverlayHost/Resources/305_Close_24x24_Red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AsterDW/DiscordOverlayHost/4e07204f59d60feeff962aee2dadc1b89cd41ab4/DiscordOverlayHost/Resources/305_Close_24x24_Red.png -------------------------------------------------------------------------------- /DiscordOverlayHost/Resources/305_Close_24x24_Red_Dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AsterDW/DiscordOverlayHost/4e07204f59d60feeff962aee2dadc1b89cd41ab4/DiscordOverlayHost/Resources/305_Close_24x24_Red_Dark.png -------------------------------------------------------------------------------- /DiscordOverlayHost/Resources/App.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AsterDW/DiscordOverlayHost/4e07204f59d60feeff962aee2dadc1b89cd41ab4/DiscordOverlayHost/Resources/App.ico -------------------------------------------------------------------------------- /DiscordOverlayHost/Resources/DirectXHost_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AsterDW/DiscordOverlayHost/4e07204f59d60feeff962aee2dadc1b89cd41ab4/DiscordOverlayHost/Resources/DirectXHost_256.png -------------------------------------------------------------------------------- /DiscordOverlayHost/Resources/Discord-Logo-Color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AsterDW/DiscordOverlayHost/4e07204f59d60feeff962aee2dadc1b89cd41ab4/DiscordOverlayHost/Resources/Discord-Logo-Color.png -------------------------------------------------------------------------------- /DiscordOverlayHost/Resources/Discord-Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AsterDW/DiscordOverlayHost/4e07204f59d60feeff962aee2dadc1b89cd41ab4/DiscordOverlayHost/Resources/Discord-Logo.png -------------------------------------------------------------------------------- /DiscordOverlayHost/Resources/Discord-Wordmark-White.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AsterDW/DiscordOverlayHost/4e07204f59d60feeff962aee2dadc1b89cd41ab4/DiscordOverlayHost/Resources/Discord-Wordmark-White.png -------------------------------------------------------------------------------- /DiscordOverlayHost/Resources/DiscordHost.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AsterDW/DiscordOverlayHost/4e07204f59d60feeff962aee2dadc1b89cd41ab4/DiscordOverlayHost/Resources/DiscordHost.png -------------------------------------------------------------------------------- /DiscordOverlayHost/Resources/DiscordHost_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AsterDW/DiscordOverlayHost/4e07204f59d60feeff962aee2dadc1b89cd41ab4/DiscordOverlayHost/Resources/DiscordHost_48.png -------------------------------------------------------------------------------- /DiscordOverlayHost/Resources/GL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AsterDW/DiscordOverlayHost/4e07204f59d60feeff962aee2dadc1b89cd41ab4/DiscordOverlayHost/Resources/GL.png -------------------------------------------------------------------------------- /DiscordOverlayHost/Resources/Microsoft-DirectX-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AsterDW/DiscordOverlayHost/4e07204f59d60feeff962aee2dadc1b89cd41ab4/DiscordOverlayHost/Resources/Microsoft-DirectX-logo.png -------------------------------------------------------------------------------- /DiscordOverlayHost/Resources/OpenGLHost_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AsterDW/DiscordOverlayHost/4e07204f59d60feeff962aee2dadc1b89cd41ab4/DiscordOverlayHost/Resources/OpenGLHost_256.png -------------------------------------------------------------------------------- /DiscordOverlayHost/Resources/OpenGL_100px_Nov14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AsterDW/DiscordOverlayHost/4e07204f59d60feeff962aee2dadc1b89cd41ab4/DiscordOverlayHost/Resources/OpenGL_100px_Nov14.png -------------------------------------------------------------------------------- /DiscordOverlayHost/Resources/OpenTK_logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AsterDW/DiscordOverlayHost/4e07204f59d60feeff962aee2dadc1b89cd41ab4/DiscordOverlayHost/Resources/OpenTK_logo.jpg -------------------------------------------------------------------------------- /DiscordOverlayHost/Resources/SharpDXlogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AsterDW/DiscordOverlayHost/4e07204f59d60feeff962aee2dadc1b89cd41ab4/DiscordOverlayHost/Resources/SharpDXlogo.png -------------------------------------------------------------------------------- /DiscordOverlayHost/Resources/gear_32xLG.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AsterDW/DiscordOverlayHost/4e07204f59d60feeff962aee2dadc1b89cd41ab4/DiscordOverlayHost/Resources/gear_32xLG.png -------------------------------------------------------------------------------- /DiscordOverlayHost/Resources/gear_32xLG_Dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AsterDW/DiscordOverlayHost/4e07204f59d60feeff962aee2dadc1b89cd41ab4/DiscordOverlayHost/Resources/gear_32xLG_Dark.png -------------------------------------------------------------------------------- /DiscordOverlayHost/Resources/gear_32xLG_Dim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AsterDW/DiscordOverlayHost/4e07204f59d60feeff962aee2dadc1b89cd41ab4/DiscordOverlayHost/Resources/gear_32xLG_Dim.png -------------------------------------------------------------------------------- /DiscordOverlayHost/Resources/gear_32xLG_Lit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AsterDW/DiscordOverlayHost/4e07204f59d60feeff962aee2dadc1b89cd41ab4/DiscordOverlayHost/Resources/gear_32xLG_Lit.png -------------------------------------------------------------------------------- /DiscordOverlayHost/Resources/logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AsterDW/DiscordOverlayHost/4e07204f59d60feeff962aee2dadc1b89cd41ab4/DiscordOverlayHost/Resources/logo.ico -------------------------------------------------------------------------------- /DiscordOverlayHost/TrayNotification/TrayNotificationManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | 4 | namespace DiscordOverlayHost.TrayNotification 5 | { 6 | public class TrayNotificationManager: IDisposable 7 | { 8 | private NotifyIcon notifyIcon; 9 | 10 | public bool IsDisposed { get; private set; } 11 | 12 | public event EventHandler ConfigurationClick; 13 | public event EventHandler OpenGLClick; 14 | public event EventHandler DirectXClick; 15 | public event EventHandler QuitClick; 16 | 17 | public TrayNotificationManager() 18 | { 19 | notifyIcon = new NotifyIcon(); 20 | notifyIcon.Icon = Properties.Resources.AppIcon; 21 | notifyIcon.ContextMenuStrip = GetMenuStrip(); 22 | notifyIcon.Text = "Discord Overlay Host"; 23 | 24 | notifyIcon.Visible = true; 25 | } 26 | 27 | private ContextMenuStrip GetMenuStrip() 28 | { 29 | ContextMenuStrip notificationMenu = new ContextMenuStrip(); 30 | ToolStripMenuItem configurationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem("Configuration"); 31 | configurationToolStripMenuItem.Name = "Config"; 32 | configurationToolStripMenuItem.Click += new EventHandler(ConfigurationClicked); 33 | 34 | ToolStripSeparator toolStripSeparator1 = new ToolStripSeparator(); 35 | ToolStripMenuItem openGLtoolStripMenuItem = new ToolStripMenuItem("OpenGL Host"); 36 | openGLtoolStripMenuItem.Name = "OpenGL"; 37 | openGLtoolStripMenuItem.Click += OpenGLClicked; 38 | 39 | ToolStripMenuItem directXtoolStripMenuItem = new ToolStripMenuItem("DirectX Host"); 40 | directXtoolStripMenuItem.Name = "DirectX"; 41 | directXtoolStripMenuItem.Click += DirectXClicked; 42 | 43 | ToolStripSeparator toolStripSeparator2 = new ToolStripSeparator(); 44 | ToolStripMenuItem closeToolStripMenuItem = new ToolStripMenuItem("Quit Overlay Host"); 45 | closeToolStripMenuItem.Name = "Quit"; 46 | closeToolStripMenuItem.Click += CloseClicked; 47 | 48 | notificationMenu.Items.AddRange( new ToolStripItem[] { 49 | configurationToolStripMenuItem, 50 | toolStripSeparator1, 51 | openGLtoolStripMenuItem, 52 | directXtoolStripMenuItem, 53 | toolStripSeparator2, 54 | closeToolStripMenuItem}); 55 | 56 | return notificationMenu; 57 | } 58 | 59 | public void SetOpenGlStatus(bool isChecked) 60 | { 61 | if (notifyIcon.ContextMenuStrip.InvokeRequired) 62 | { 63 | notifyIcon.ContextMenuStrip.Invoke((MethodInvoker)delegate { SetOpenGlStatus(isChecked); }); 64 | return; 65 | } 66 | 67 | ((ToolStripMenuItem)notifyIcon.ContextMenuStrip.Items["OpenGL"]).Checked = isChecked; 68 | } 69 | 70 | public void SetDirectXStatus(bool isChecked) 71 | { 72 | if (notifyIcon.ContextMenuStrip.InvokeRequired) 73 | { 74 | notifyIcon.ContextMenuStrip.Invoke((MethodInvoker)delegate { SetDirectXStatus(isChecked); }); 75 | return; 76 | } 77 | 78 | ((ToolStripMenuItem)notifyIcon.ContextMenuStrip.Items["DirectX"]).Checked = isChecked; 79 | } 80 | 81 | private void ConfigurationClicked(object sender, EventArgs e) 82 | { 83 | if (ConfigurationClick != null) 84 | { 85 | ConfigurationClick(this, e); 86 | } 87 | } 88 | 89 | private void OpenGLClicked(object sender, EventArgs e) 90 | { 91 | if (OpenGLClick != null) 92 | OpenGLClick(this, e); 93 | } 94 | 95 | private void DirectXClicked(object sender, EventArgs e) 96 | { 97 | if (DirectXClick != null) 98 | DirectXClick(this, e); 99 | } 100 | 101 | private void CloseClicked(object sender, EventArgs e) 102 | { 103 | if (QuitClick != null) 104 | QuitClick(this, e); 105 | } 106 | 107 | protected virtual void Dispose(bool disposing) 108 | { 109 | if (!IsDisposed) 110 | { 111 | if (disposing) 112 | { 113 | // TODO: dispose managed state (managed objects). 114 | this.notifyIcon.Visible = false; 115 | notifyIcon.Dispose(); 116 | } 117 | 118 | IsDisposed = true; 119 | } 120 | } 121 | public void Dispose() 122 | { 123 | Dispose(true); 124 | } 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /DiscordOverlayHost/Win32/NativeMethods.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | 4 | namespace DiscordOverlayHost.Win32 5 | { 6 | internal static class NativeMethods 7 | { 8 | public struct Messages 9 | { 10 | const int WM_CLOSE = 0x0010; 11 | } 12 | 13 | /// 14 | /// Special window handles 15 | /// 16 | public enum SpecialWindowHandles 17 | { 18 | // ReSharper disable InconsistentNaming 19 | /// 20 | /// Places the window at the top of the Z order. 21 | /// 22 | HWND_TOP = 0, 23 | /// 24 | /// Places the window at the bottom of the Z order. If the hWnd parameter identifies a topmost window, the window loses its topmost status and is placed at the bottom of all other windows. 25 | /// 26 | HWND_BOTTOM = 1, 27 | /// 28 | /// Places the window above all non-topmost windows. The window maintains its topmost position even when it is deactivated. 29 | /// 30 | HWND_TOPMOST = -1, 31 | /// 32 | /// Places the window above all non-topmost windows (that is, behind all topmost windows). This flag has no effect if the window is already a non-topmost window. 33 | /// 34 | HWND_NOTOPMOST = -2 35 | // ReSharper restore InconsistentNaming 36 | } 37 | 38 | [Flags] 39 | public enum SetWindowPosFlags : uint 40 | { 41 | // ReSharper disable InconsistentNaming 42 | 43 | /// 44 | /// If the calling thread and the thread that owns the window are attached to different input queues, the system posts the request to the thread that owns the window. This prevents the calling thread from blocking its execution while other threads process the request. 45 | /// 46 | SWP_ASYNCWINDOWPOS = 0x4000, 47 | 48 | /// 49 | /// Prevents generation of the WM_SYNCPAINT message. 50 | /// 51 | SWP_DEFERERASE = 0x2000, 52 | 53 | /// 54 | /// Draws a frame (defined in the window's class description) around the window. 55 | /// 56 | SWP_DRAWFRAME = 0x0020, 57 | 58 | /// 59 | /// Applies new frame styles set using the SetWindowLong function. Sends a WM_NCCALCSIZE message to the window, even if the window's size is not being changed. If this flag is not specified, WM_NCCALCSIZE is sent only when the window's size is being changed. 60 | /// 61 | SWP_FRAMECHANGED = 0x0020, 62 | 63 | /// 64 | /// Hides the window. 65 | /// 66 | SWP_HIDEWINDOW = 0x0080, 67 | 68 | /// 69 | /// Does not activate the window. If this flag is not set, the window is activated and moved to the top of either the topmost or non-topmost group (depending on the setting of the hWndInsertAfter parameter). 70 | /// 71 | SWP_NOACTIVATE = 0x0010, 72 | 73 | /// 74 | /// Discards the entire contents of the client area. If this flag is not specified, the valid contents of the client area are saved and copied back into the client area after the window is sized or repositioned. 75 | /// 76 | SWP_NOCOPYBITS = 0x0100, 77 | 78 | /// 79 | /// Retains the current position (ignores X and Y parameters). 80 | /// 81 | SWP_NOMOVE = 0x0002, 82 | 83 | /// 84 | /// Does not change the owner window's position in the Z order. 85 | /// 86 | SWP_NOOWNERZORDER = 0x0200, 87 | 88 | /// 89 | /// Does not redraw changes. If this flag is set, no repainting of any kind occurs. This applies to the client area, the nonclient area (including the title bar and scroll bars), and any part of the parent window uncovered as a result of the window being moved. When this flag is set, the application must explicitly invalidate or redraw any parts of the window and parent window that need redrawing. 90 | /// 91 | SWP_NOREDRAW = 0x0008, 92 | 93 | /// 94 | /// Same as the SWP_NOOWNERZORDER flag. 95 | /// 96 | SWP_NOREPOSITION = 0x0200, 97 | 98 | /// 99 | /// Prevents the window from receiving the WM_WINDOWPOSCHANGING message. 100 | /// 101 | SWP_NOSENDCHANGING = 0x0400, 102 | 103 | /// 104 | /// Retains the current size (ignores the cx and cy parameters). 105 | /// 106 | SWP_NOSIZE = 0x0001, 107 | 108 | /// 109 | /// Retains the current Z order (ignores the hWndInsertAfter parameter). 110 | /// 111 | SWP_NOZORDER = 0x0004, 112 | 113 | /// 114 | /// Displays the window. 115 | /// 116 | SWP_SHOWWINDOW = 0x0040, 117 | 118 | // ReSharper restore InconsistentNaming 119 | } 120 | 121 | [DllImport("User32.dll")] 122 | public extern static IntPtr PostMessage(IntPtr hWnd, int message, IntPtr wParam, IntPtr lParam); 123 | 124 | [DllImport("USER32.DLL")] 125 | public static extern bool SetForegroundWindow(IntPtr hWnd); 126 | 127 | public enum ShowWindowOptions 128 | { 129 | SW_SHOWNORMAL = 1, 130 | SW_SHOWMAXIMIZED = 3, 131 | SW_RESTORE = 9 132 | } 133 | 134 | [DllImport("user32.dll")] 135 | public static extern bool ShowWindow(IntPtr hWnd, ShowWindowOptions nCmdShow); 136 | 137 | [DllImport("user32.dll", SetLastError = true)] 138 | public static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, SetWindowPosFlags uFlags); 139 | } 140 | } 141 | -------------------------------------------------------------------------------- /OpenGlHost/OpenGlHost.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Drawing; 3 | using OpenTK; 4 | using OpenTK.Graphics; 5 | using OpenTK.Graphics.OpenGL; 6 | using System.Diagnostics; 7 | using System.Drawing.Imaging; 8 | using System.Windows.Forms; 9 | 10 | namespace OpenGlHost 11 | { 12 | public class OpenGlHost : IDisposable 13 | { 14 | private class TextureInfo 15 | { 16 | public int TextureID { get; private set; } 17 | public int Width { get; private set; } 18 | public int Height { get; private set; } 19 | 20 | public TextureInfo(int id, int width, int height) 21 | { 22 | TextureID = id; 23 | Width = width; 24 | Height = height; 25 | } 26 | } 27 | private const string windowTitle = "Discord Overlay Host: OpenGL"; 28 | private const int Width = 350; 29 | private const int Height = 450; 30 | //Duration in seconds to show logo on start. 31 | private const int LogoDuration = 8; 32 | 33 | 34 | public bool IsDisposed { get; private set; } 35 | 36 | private GameWindow glHostWindow; 37 | private bool GlLoaded { get; set; } 38 | private Stopwatch clock; 39 | 40 | private TextureInfo logoTexture; 41 | private bool DrawLogo { get; set; } 42 | 43 | #region events 44 | public event EventHandler HostWindowCreated; 45 | public event EventHandler HostWindowClosed; 46 | 47 | protected void OnHostWindowCreated() 48 | { 49 | if (HostWindowCreated != null) 50 | { 51 | HostWindowCreated(this, new EventArgs()); 52 | } 53 | } 54 | 55 | protected void OnHostWindowClosed() 56 | { 57 | if (HostWindowClosed != null) 58 | { 59 | HostWindowClosed(this, new EventArgs()); 60 | } 61 | } 62 | #endregion 63 | 64 | public OpenGlHost() 65 | { 66 | 67 | } 68 | 69 | private void GlHostWindow_Closed(object sender, EventArgs e) 70 | { 71 | this.Dispose(); 72 | OnHostWindowClosed(); 73 | } 74 | 75 | public void Run() 76 | { 77 | try 78 | { 79 | clock = new Stopwatch(); 80 | 81 | GraphicsMode gMode = new GraphicsMode( 82 | new ColorFormat(8, 8, 8, 8) 83 | ); 84 | 85 | glHostWindow = new GameWindow(Width, Height, gMode, windowTitle); 86 | glHostWindow.Icon = Properties.Resources.AppIcon; 87 | //glHostWindow.TargetRenderFrequency = 60; 88 | glHostWindow.Load += GlHostWindow_Load; 89 | glHostWindow.Closed += GlHostWindow_Closed; 90 | 91 | glHostWindow.RenderFrame += GlHostWindow_RenderFrame; 92 | 93 | glHostWindow.Run(); 94 | } 95 | catch(Exception ex) 96 | { 97 | MessageBox.Show(string.Format("Exception loading OpenGL host window.\r\n{0}", ex.Message), "OpenGL Host", MessageBoxButtons.OK, MessageBoxIcon.Error); 98 | } 99 | } 100 | 101 | public void Exit() 102 | { 103 | if (glHostWindow != null && glHostWindow.Exists) 104 | { 105 | glHostWindow.Exit(); 106 | } 107 | } 108 | 109 | private void GlHostWindow_Load(object sender, EventArgs e) 110 | { 111 | OnHostWindowCreated(); 112 | 113 | GlLoaded = true; 114 | GL.Enable(EnableCap.Blend); 115 | GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha); 116 | 117 | GL.Enable(EnableCap.Texture2D); 118 | 119 | logoTexture = LoadLogoTexture(); 120 | if (logoTexture != null) 121 | { 122 | DrawLogo = true; 123 | } 124 | 125 | clock.Start(); 126 | } 127 | 128 | private void GlHostWindow_RenderFrame(object sender, FrameEventArgs e) 129 | { 130 | GL.ClearColor(Color.FromArgb(10, 46, 49, 54)); 131 | GL.Clear(ClearBufferMask.ColorBufferBit); 132 | 133 | if (clock.IsRunning && DrawLogo) 134 | { 135 | if (clock.Elapsed.TotalSeconds < LogoDuration) 136 | { 137 | DrawLogoQuad(); 138 | } 139 | else 140 | { 141 | clock.Stop(); 142 | } 143 | } 144 | glHostWindow.SwapBuffers(); 145 | } 146 | 147 | private void DrawLogoQuad() 148 | { 149 | float absX = (logoTexture.Width / 2f) / (glHostWindow.ClientSize.Width / 2f); 150 | float absY = (logoTexture.Height / 2f) / (glHostWindow.ClientSize.Height / 2f); 151 | 152 | GL.BindTexture(TextureTarget.Texture2D, logoTexture.TextureID); 153 | 154 | GL.Begin(PrimitiveType.Quads); 155 | 156 | GL.TexCoord2(0.0f, 0.0f); 157 | GL.Vertex2(0-absX, absY); 158 | 159 | GL.TexCoord2(1.0f, 0.0f); 160 | GL.Vertex2(absX, absY); 161 | 162 | GL.TexCoord2(1.0f, 1.0f); 163 | GL.Vertex2(absX, 0-absY); 164 | 165 | GL.TexCoord2(0.0f, 1.0f); 166 | GL.Vertex2(0-absX, 0-absY); 167 | 168 | GL.End(); 169 | } 170 | 171 | private TextureInfo LoadLogoTexture() 172 | { 173 | try 174 | { 175 | int textureID = 0; 176 | 177 | Bitmap bmpLogo = Properties.Resources.DiscordHost; 178 | 179 | GL.Hint(HintTarget.PerspectiveCorrectionHint, HintMode.Nicest); 180 | 181 | GL.GenTextures(1, out textureID); 182 | GL.BindTexture(TextureTarget.Texture2D, textureID); 183 | 184 | BitmapData data = bmpLogo.LockBits(new System.Drawing.Rectangle(0, 0, bmpLogo.Width, bmpLogo.Height), 185 | ImageLockMode.ReadOnly, System.Drawing.Imaging.PixelFormat.Format32bppArgb); 186 | 187 | GL.TexImage2D(TextureTarget.Texture2D, 0, PixelInternalFormat.Rgba, data.Width, data.Height, 0, 188 | OpenTK.Graphics.OpenGL.PixelFormat.Bgra, PixelType.UnsignedByte, data.Scan0); 189 | 190 | bmpLogo.UnlockBits(data); 191 | 192 | GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapS, (int)TextureWrapMode.Clamp); 193 | GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapT, (int)TextureWrapMode.Clamp); 194 | GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.Linear); 195 | GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMagFilter, (int)TextureMagFilter.Linear); 196 | 197 | return new TextureInfo(textureID, bmpLogo.Width, bmpLogo.Height); 198 | } 199 | catch 200 | { 201 | // 202 | } 203 | //Error loading texture 204 | return null; 205 | } 206 | 207 | protected virtual void Dispose(bool disposing) 208 | { 209 | if (!IsDisposed) 210 | { 211 | if (disposing) 212 | { 213 | // TODO: dispose managed state (managed objects). 214 | 215 | } 216 | 217 | try 218 | { 219 | if (glHostWindow != null) 220 | { 221 | if (glHostWindow.Exists) 222 | { 223 | glHostWindow.Exit(); 224 | } 225 | glHostWindow.Dispose(); 226 | glHostWindow = null; 227 | } 228 | } 229 | catch 230 | { 231 | // 232 | } 233 | 234 | IsDisposed = true; 235 | } 236 | } 237 | 238 | public void Dispose() 239 | { 240 | Dispose(true); 241 | } 242 | } 243 | } 244 | -------------------------------------------------------------------------------- /OpenGlHost/OpenGlHost.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {02D89970-9E4D-46DD-86C1-EC8493281EBF} 8 | WinExe 9 | Properties 10 | OpenGlHost 11 | OpenGlHost 12 | v4.5.2 13 | 512 14 | 15 | 16 | true 17 | full 18 | false 19 | ..\DiscordOverlayHost\bin\Debug\Hosts\ 20 | DEBUG;TRACE 21 | prompt 22 | 4 23 | 24 | 25 | pdbonly 26 | true 27 | ..\DiscordOverlayHost\bin\Release\Hosts\ 28 | TRACE 29 | prompt 30 | 4 31 | 32 | 33 | OpenGlHost.Program 34 | 35 | 36 | Resources\App.ico 37 | 38 | 39 | 40 | False 41 | D:\Development\OpenTK\1.1\Binaries\OpenTK\Release\OpenTK.dll 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | True 60 | True 61 | Resources.resx 62 | 63 | 64 | 65 | 66 | ResXFileCodeGenerator 67 | Resources.Designer.cs 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 84 | -------------------------------------------------------------------------------- /OpenGlHost/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenGlHost 4 | { 5 | static class Program 6 | { 7 | /// 8 | /// The main entry point for the application. 9 | /// 10 | [STAThread] 11 | static void Main() 12 | { 13 | OpenGlHost glHost = new OpenGlHost(); 14 | glHost.Run(); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /OpenGlHost/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("OpenGlHost")] 9 | [assembly: AssemblyDescription("Runs the OpenGL host window for Discord game overlay.")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("OpenGlHost")] 13 | [assembly: AssemblyCopyright("Copyright © 2016")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("02d89970-9e4d-46dd-86c1-ec8493281ebf")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /OpenGlHost/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace OpenGlHost.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("OpenGlHost.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). 65 | /// 66 | internal static System.Drawing.Icon AppIcon { 67 | get { 68 | object obj = ResourceManager.GetObject("AppIcon", resourceCulture); 69 | return ((System.Drawing.Icon)(obj)); 70 | } 71 | } 72 | 73 | /// 74 | /// Looks up a localized resource of type System.Drawing.Bitmap. 75 | /// 76 | internal static System.Drawing.Bitmap DiscordHost { 77 | get { 78 | object obj = ResourceManager.GetObject("DiscordHost", resourceCulture); 79 | return ((System.Drawing.Bitmap)(obj)); 80 | } 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /OpenGlHost/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 122 | ..\Resources\App.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 123 | 124 | 125 | ..\Resources\DiscordHost.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 126 | 127 | -------------------------------------------------------------------------------- /OpenGlHost/Resources/App.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AsterDW/DiscordOverlayHost/4e07204f59d60feeff962aee2dadc1b89cd41ab4/OpenGlHost/Resources/App.ico -------------------------------------------------------------------------------- /OpenGlHost/Resources/DiscordHost.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AsterDW/DiscordOverlayHost/4e07204f59d60feeff962aee2dadc1b89cd41ab4/OpenGlHost/Resources/DiscordHost.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DiscordOverlayHost 2 | Host Manager application to capture Discord game overlays. 3 | 4 | The program provides an OpenGL and DirectX "game" window that Discord can be pointed to to put the in game overlay on to. With the overlay in place you can then capture the host window as a game capture, or window capture within streaming/recording software to put voice channel activity onto the video output. 5 | 6 | See the YouTube video at the following address for an example on how to use the application. 7 | https://www.youtube.com/watch?v=prxlvWcBRwA 8 | 9 | ###Currently supported operating systems: 10 | * Windows 7 11 | * Windows 8 and 8.1 12 | * Windows 10 13 | 14 | The system must have at least the .Net Framework 4.5.2 installed. 15 | --------------------------------------------------------------------------------