Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
mjohne authored Nov 2, 2019
1 parent a2c9c94 commit 73a1406
Show file tree
Hide file tree
Showing 6 changed files with 194 additions and 120 deletions.
1 change: 1 addition & 0 deletions PlanetoidDB/Planetoid-DB.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@
</ItemGroup>
<ItemGroup>
<Content Include="Planetoid-DB-3.ico" />
<None Include="Resources\silk_arrow_divide.png" />
<None Include="Resources\silk_bullet_green.png" />
<None Include="Resources\silk_arrow_switch.png" />
<None Include="Resources\silk_arrow_refresh.png" />
Expand Down
68 changes: 50 additions & 18 deletions PlanetoidDB/PlanetoidDBForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions PlanetoidDB/PlanetoidDBForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.Net;
using System.Net.NetworkInformation;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Windows.Forms;
using Office2007Rendering;
using VS2008StripRenderingLibrary;
Expand All @@ -25,6 +26,30 @@ public partial class PlanetoidDBForm : Form
private readonly string strFilenameMPCORBtemp = Properties.Resources.FilenameMpcorbTemp;
private readonly Uri uriMPCORB = new Uri(uriString: Properties.Resources.MpcorbUrl);

private const int FEATURE_DISABLE_NAVIGATION_SOUNDS = 21;
private const int SET_FEATURE_ON_THREAD = 0x00000001;
private const int SET_FEATURE_ON_PROCESS = 0x00000002;
private const int SET_FEATURE_IN_REGISTRY = 0x00000004;
private const int SET_FEATURE_ON_THREAD_LOCALMACHINE = 0x00000008;
private const int SET_FEATURE_ON_THREAD_INTRANET = 0x00000010;
private const int SET_FEATURE_ON_THREAD_TRUSTED = 0x00000020;
private const int SET_FEATURE_ON_THREAD_INTERNET = 0x00000040;
private const int SET_FEATURE_ON_THREAD_RESTRICTED = 0x00000080;

// Necessary dll import
/// <summary>
///
/// </summary>
/// <param name="FeatureEntry"></param>
/// <param name="dwFlags"></param>
/// <param name="fEnable"></param>
/// <returns></returns>
[DllImport("urlmon.dll")]
[PreserveSig]
[return: MarshalAs(UnmanagedType.Error)]

static extern int CoInternetSetFeatureEnabled(int FeatureEntry, [MarshalAs(UnmanagedType.U4)] int dwFlags, bool fEnable);

#region Local methods

/// <summary>
Expand Down Expand Up @@ -356,6 +381,7 @@ public PlanetoidDBForm()
/// <param name="e"></param>
private void PlanetoidDBForm_Load(object sender, EventArgs e)
{
CoInternetSetFeatureEnabled(FeatureEntry: FEATURE_DISABLE_NAVIGATION_SOUNDS, dwFlags: SET_FEATURE_ON_PROCESS, fEnable: true);
SetDoubleBuffered(control: tableLayoutPanelData);
ToolStripManager.Renderer = new Office2007Renderer();
backgroundWorkerLoadingDatabase.WorkerReportsProgress = true;
Expand Down Expand Up @@ -1423,6 +1449,16 @@ private void ToolStripMenuItemSettings_Click(object sender, EventArgs e)
//todo: add Settings here
}

/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void ToolStripMenuItemFilter_Click(object sender, EventArgs e)
{
//todo: add Filter here
}

#endregion

#region DoubleClick-Handler
Expand Down
10 changes: 10 additions & 0 deletions PlanetoidDB/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 73a1406

Please sign in to comment.