浏览代码

Removed PInvoke code that hid the close button.

RedShirtMB Mark Linton redshirt linton 12 年之前
父节点
当前提交
1b45cd4a15
共有 1 个文件被更改,包括 0 次插入12 次删除
  1. 0 12
      MediaBrowser.Common/UI/Splash.xaml.cs

+ 0 - 12
MediaBrowser.Common/UI/Splash.xaml.cs

@@ -1,7 +1,5 @@
 using System;
-using System.Runtime.InteropServices;
 using System.Windows;
-using System.Windows.Interop;
 using MahApps.Metro.Controls;
 using MediaBrowser.Common.Logging;
 using MediaBrowser.Model.Progress;
@@ -13,13 +11,6 @@ namespace MediaBrowser.Common.UI
     /// </summary>
     public partial class Splash : MetroWindow
     {
-        private const int GWL_STYLE = -16;
-        private const int WS_SYSMENU = 0x80000;
-        [DllImport("user32.dll", SetLastError = true)]
-        private static extern int GetWindowLong(IntPtr hWnd, int nIndex);
-        [DllImport("user32.dll")]
-        private static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong);
-
         public Splash(Progress<TaskProgress> progress)
         {
             InitializeComponent();
@@ -42,9 +33,6 @@ namespace MediaBrowser.Common.UI
 
         private void Splash_Loaded(object sender, RoutedEventArgs e)
         {
-            var hwnd = new WindowInteropHelper(this).Handle;
-            SetWindowLong(hwnd, GWL_STYLE, GetWindowLong(hwnd, GWL_STYLE) & ~WS_SYSMENU);
-
             // Setting this in markup throws an exception at runtime
             ShowTitleBar = false;
         }