- windows : fix build (on windows)

This commit is contained in:
Gerard Walace 2013-03-24 23:41:01 +01:00
parent 50b0cc46cf
commit 719ed0994a
4 changed files with 8 additions and 5 deletions

View file

@ -28,6 +28,7 @@ using Forms = System.Windows.Forms;
using Microsoft.Win32; using Microsoft.Win32;
using SparkleLib; using SparkleLib;
using System.Windows;
namespace SparkleShare { namespace SparkleShare {
@ -187,7 +188,7 @@ namespace SparkleShare {
} }
public override void CopyToClipBoardClicked (string text) public override void CopyToClipboard (string text)
{ {
Clipboard.SetData (DataFormats.Text, text); Clipboard.SetData (DataFormats.Text, text);
} }

View file

@ -948,7 +948,7 @@ namespace SparkleShare {
check_box.Click += delegate { Controller.StartupItemChanged (check_box.IsChecked.Value); }; check_box.Click += delegate { Controller.StartupItemChanged (check_box.IsChecked.Value); };
finish_button.Click += delegate { Controller.TutorialPageCompleted (); }; finish_button.Click += delegate { Controller.TutorialPageCompleted (); };
copy_button.Click += delegate { Controller.CopyToClipboardClicked () }; copy_button.Click += delegate { Controller.CopyToClipboardClicked(); };
break; break;
} }

View file

@ -24,6 +24,8 @@ using System.Windows.Forms.Integration;
using System.Windows.Media; using System.Windows.Media;
using System.Windows.Shapes; using System.Windows.Shapes;
using System.Windows.Shell; using System.Windows.Shell;
using System.Runtime.InteropServices;
using System.Windows.Interop;
namespace SparkleShare { namespace SparkleShare {
@ -60,7 +62,7 @@ namespace SparkleShare {
Closing += Close; Closing += Close;
SourceInitialized += delegate { SourceInitialized += delegate {
const int gwl_style = -16; const int gwl_style = -16;
const int ws_sysmenu = 0×00080000; const int ws_sysmenu = 0x00080000;
WindowInteropHelper helper = new WindowInteropHelper (this); WindowInteropHelper helper = new WindowInteropHelper (this);
int style = GetWindowLong (helper.Handle, gwl_style); int style = GetWindowLong (helper.Handle, gwl_style);
SetWindowLong (helper.Handle, gwl_style, style & ~ws_sysmenu); SetWindowLong (helper.Handle, gwl_style, style & ~ws_sysmenu);

View file

@ -142,8 +142,8 @@ namespace SparkleShare {
copy_item.Click += delegate { Controller.CopyToClipboardClicked (); }; copy_item.Click += delegate { Controller.CopyToClipboardClicked (); };
link_code_item.Items.Add (code_item); link_code_item.Items.Add (code_item);
link_code_item.Items.Add (new Separator); link_code_item.Items.Add (new Separator());
link_code_item.Items.Add (this.copy_item); link_code_item.Items.Add (copy_item);
} }
CheckBox notify_check_box = new CheckBox () { CheckBox notify_check_box = new CheckBox () {