windows: Fix compile errors
This commit is contained in:
parent
a26de02944
commit
c04c10d084
|
@ -16,18 +16,17 @@
|
|||
|
||||
|
||||
using System;
|
||||
using System.ComponentModel
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace SparkleShare {
|
||||
|
||||
public class SparkleAbout : Window {
|
||||
public class SparkleAbout : Form {
|
||||
|
||||
public SparkleAboutController Controller = new SparkleAboutController ();
|
||||
|
||||
|
@ -67,7 +66,7 @@ namespace SparkleShare {
|
|||
SizeGripStyle = SizeGripStyle.Hide;
|
||||
StartPosition = FormStartPosition.CenterScreen;
|
||||
|
||||
FormClosing += FormClosingEventHandler (Close);
|
||||
FormClosing += Close;
|
||||
|
||||
CreateAbout ();
|
||||
|
||||
|
|
|
@ -24,11 +24,11 @@ using System.Runtime.InteropServices;
|
|||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using CefSharp;
|
||||
using Microsoft.Win32;
|
||||
using SparkleLib;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace SparkleShare {
|
||||
|
||||
|
@ -152,7 +152,7 @@ namespace SparkleShare {
|
|||
|
||||
public override bool CreateSparkleShareFolder ()
|
||||
{
|
||||
if (!Directory.Exists(SparkleConfig.DefaultConfig.FoldersPath) {
|
||||
if (!Directory.Exists (SparkleConfig.DefaultConfig.FoldersPath)) {
|
||||
Directory.CreateDirectory(SparkleConfig.DefaultConfig.FoldersPath);
|
||||
Directory.CreateDirectory(SparkleConfig.DefaultConfig.TmpPath);
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@
|
|||
</Compile>
|
||||
|
||||
<Compile Include="..\SparkleSetupController.cs" />
|
||||
<Compile Include="..\SparkleUI.cs" />
|
||||
<Compile Include="SparkleUI.cs" />
|
||||
<Compile Include="..\SparkleAboutController.cs" />
|
||||
<Compile Include="SparkleBubbles.cs" />
|
||||
<Compile Include="SparkleAbout.cs" />
|
||||
|
|
|
@ -339,7 +339,7 @@ namespace SparkleShare {
|
|||
private Icon GetIconFromBitmap (Bitmap bitmap)
|
||||
{
|
||||
IntPtr unmanaged_icon = bitmap.GetHicon ();
|
||||
Icon icon = (Icon) Icon.FromHandle (unmanaged_con).Clone ();
|
||||
Icon icon = (Icon) Icon.FromHandle (unmanaged_icon).Clone ();
|
||||
DestroyIcon (unmanaged_icon);
|
||||
|
||||
return icon;
|
||||
|
|
86
SparkleShare/Windows/SparkleUI.cs
Normal file
86
SparkleShare/Windows/SparkleUI.cs
Normal file
|
@ -0,0 +1,86 @@
|
|||
// SparkleShare, a collaboration and sharing tool.
|
||||
// Copyright (C) 2010 Hylke Bons <hylkebons@gmail.com>
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
|
||||
#if __MonoCS__
|
||||
using Gtk;
|
||||
using Mono.Unix;
|
||||
using Mono.Unix.Native;
|
||||
#else
|
||||
using System.Windows.Forms;
|
||||
#endif
|
||||
using SparkleLib;
|
||||
|
||||
namespace SparkleShare {
|
||||
|
||||
public class SparkleUI {
|
||||
|
||||
public static SparkleStatusIcon StatusIcon;
|
||||
public static SparkleEventLog EventLog;
|
||||
public static SparkleBubbles Bubbles;
|
||||
public static SparkleSetup Setup;
|
||||
public static SparkleAbout About;
|
||||
|
||||
public static string AssetsPath =
|
||||
new string [] {Defines.PREFIX, "share", "sparkleshare"}.Combine ();
|
||||
|
||||
|
||||
// Short alias for the translations
|
||||
public static string _(string s)
|
||||
{
|
||||
return Program._ (s);
|
||||
}
|
||||
|
||||
|
||||
public SparkleUI ()
|
||||
{
|
||||
// Initialize the application
|
||||
#if __MonoCS__
|
||||
Application.Init ();
|
||||
|
||||
// Use translations
|
||||
Catalog.Init (Defines.GETTEXT_PACKAGE, Defines.LOCALE_DIR);
|
||||
#endif
|
||||
|
||||
Setup = new SparkleSetup ();
|
||||
EventLog = new SparkleEventLog ();
|
||||
//About = new SparkleAbout ();
|
||||
Bubbles = new SparkleBubbles ();
|
||||
StatusIcon = new SparkleStatusIcon ();
|
||||
|
||||
if (Program.Controller.FirstRun)
|
||||
Program.Controller.ShowSetupWindow (PageType.Setup);
|
||||
}
|
||||
|
||||
|
||||
// Runs the application
|
||||
public void Run ()
|
||||
{
|
||||
Application.Run ();
|
||||
#if !__MonoCS__
|
||||
StatusIcon.Dispose ();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue