Merge branch 'master' of github.com:hbons/SparkleShare

This commit is contained in:
Hylke Bons 2012-03-12 19:43:32 +00:00
commit 4a4b7698c6
55 changed files with 1270 additions and 2842 deletions

5
.gitignore vendored
View file

@ -1,4 +1,5 @@
*~
*.swp
.DS_Store
*.exe
*.exe.mdb
@ -54,3 +55,7 @@ gnome-doc-utils.make
data/plugins/*.xml
desktop.ini
_ReSharper.*
*.msi
*.wixobj
*.wixpdb
*.wxs

3
NEWS
View file

@ -1,6 +1,7 @@
0.8.3 for Linux and Mac (Sun Mar 4 2012):
0.8.3 for Linux, Mac and Windows (Sun Mar 11 2012):
Hylke:
- Windows version implemented with WPF
- Invites feature: link to a host with one click
- Implement sparklshare:// protocol handlers for invites
- "Add SparkleShare to login items" checkbox on the last tutorial page

View file

@ -1,13 +1,23 @@
# SparkleShare
SparkleShare is a collaboration and sharing tool that is designed to keep
things simple and to stay out of your way. It allows you to instantly sync
with any Git repository you have access to.
things simple and to stay out of your way. SparkleShare is available for Linux, Mac and Windows.
SparkleShare currently works on Linux, Mac and Windows.
SparkleShare allows you to instantly sync with any [Git](http://www.git-scm.org/) repository you have access to.
[![Flattr this git repo](http://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/thing/21770/SparkleShare-Sharing-work-made-easy)
## Resources
|||
|-----------------------------------:|:--------------------------|
| **Website**: | http://www.sparkleshare.org/ |
| **Source code**: | http://github.com/SparkleShare/ |
| **IRC channel**: | #sparkleshare on irc.gnome.org |
| **Wiki**: | http://github.com/hbons/SparkleShare/wiki/ |
| **Report issues**: | http://github.com/hbons/SparkleShare/issues/ |
| **Translation project**: | http://www.transifex.net/projects/p/sparkleshare/ |
## License
@ -18,10 +28,6 @@ information see the LICENSE file or visit http://www.gnu.org/licenses/gpl-3.0.ht
## Running SparkleShare
**Note:** SparkleShare creates its own RSA keypair in `$HOME/.config/sparkleshare/` and uses
that for authentication. Please mind this if you're planning to set up your
own server by hand.
### Linux
You can choose to build from source or get the packages through your distribution's repositories.
@ -53,26 +59,20 @@ Download, unzip and open the SparkleShare bundle.
### Windows
Download the installer and run SparkleShare from the start menu.
Download and run the installer and start SparkleShare from the Windows menu.
## Building on Linux
### Debian or Ubuntu (apt):
### Ubuntu:
```bash
$ sudo apt-get install gtk-sharp2 mono-runtime mono-devel monodevelop \
libndesk-dbus1.0-cil-dev nant libnotify-cil-dev libgtk2.0-cil-dev mono-mcs mono-gmcs \
libwebkit-cil-dev intltool libtool python-nautilus libndesk-dbus-glib1.0-cil-dev
$ sudo apt-get install libappindicator0.1-cil-dev gtk-sharp2 mono-runtime mono-devel \
monodevelop libndesk-dbus1.0-cil-dev nant libnotify-cil-dev libgtk2.0-cil-dev mono-mcs
mono-gmcs libwebkit-cil-dev intltool libtool python-nautilus libndesk-dbus-glib1.0-cil-dev
```
For Ubuntu `libappindicator` support, install the following package:
```bash
$ sudo apt-get install libappindicator0.1-cil-dev
```
### Fedora (yum):
### Fedora:
```bash
$ sudo yum install gtk-sharp2-devel mono-core mono-devel monodevelop \
@ -80,6 +80,14 @@ $ sudo yum install gtk-sharp2-devel mono-core mono-devel monodevelop \
notify-sharp-devel webkit-sharp-devel webkitgtk-devel libtool intltool
```
### Debian:
```bash
$ sudo apt-get install gtk-sharp2 mono-runtime mono-devel monodevelop \
libndesk-dbus1.0-cil-dev nant libnotify-cil-dev libgtk2.0-cil-dev mono-mcs mono-gmcs \
libwebkit-cil-dev intltool libtool python-nautilus libndesk-dbus-glib1.0-cil-dev
```
You can then build and install SparkleShare like this:
@ -89,13 +97,16 @@ $ make
$ sudo make install
```
**Note:** Use `--prefix=/usr` if you want the Nautilus extension to work.
**Note:** The Nautilus extension will only be enabled if you build with `--prefix=/usr`.
## Building on Mac
Install <tt>Xcode</tt>, the <tt>Mono</tt> Framework, <tt>MonoDevelop</tt> and the <tt>MonoMac</tt> plugin
(you can find it in <tt>MonoDevelop</tt> => <tt>Add-in Manager</tt>).
Install [Xcode](https://developer.apple.com/xcode/), the [Mono Framework](http://www.mono-project.com/)
and [MonoDevelop](http://monodevelop.com/).
Start MonoDevelop and install the MonoMac add-in (it's in <tt>MonoDevelop</tt> > <tt>Add-in Manager</tt>).
You may need to adjust some environment variables to let the build environment tools find mono:
@ -122,7 +133,7 @@ Now that you have compiled the libraries, open `SparkleShare/Mac/SparkleShare.sl
MonoDevelop and start the build.
### Creating a Mac .app
### Creating a Mac bundle
To create the <tt>SparkleShare.app</tt>, make sure the project is focused and select Project from the menu bar
and click <tt>"Create Mac Installer..."</tt>. Make sure to select <tt>"Don't link assemblies"</tt>.
@ -155,15 +166,11 @@ build
`C:\path\to\SparkleShare\source\bin` should now contain `SparkleShare.exe`, which you can run.
**Note:** SparkleShare needs to be run with administrator privileges.
Open the properties dialog for `SparkleShare.exe` and tick
the `Run this program as an administrator` option in the
`Compatibility` tab.
### Creating a Windows installer
To create an installer package, install [WiX 3.6](http://wix.sourceforge.net/), restart Windows and run:
To create an installer package, install [WiX 3.5](http://wix.sourceforge.net/), restart Windows and run:
```
build installer
@ -172,16 +179,20 @@ build installer
This will create `SparkleShare.msi` in the same directory.
## Info
## Reset SparkleShare settings
|||
|-----------------------------------:|:--------------------------|
| **Official website**: | http://www.sparkleshare.org/ |
| **Source code**: | http://github.com/SparkleShare/ |
| **IRC Channel**: | #sparkleshare on irc.gnome.org |
| **Wiki**: | http://github.com/hbons/SparkleShare/wiki/ |
| **Report issues**: | http://github.com/hbons/SparkleShare/issues/ |
| **Translation project**: | http://www.transifex.net/projects/p/sparkleshare/ |
### Linux and Mac:
```
rm -Rf ~/SparkleShare
rm -Rf ~/.config/sparkleshare
```
### Windows
Remove `My Documents\SparkleShare` and `AppData\Roaming\sparkleshare` (`AppData` is hidden by default).
Now have fun and create cool things together! :)
## Finally
Have fun! :)

View file

@ -47,17 +47,17 @@ namespace SparkleLib.Git {
Uri uri;
try {
uri = new Uri (server + remote_path);
uri = new Uri (server + remote_path);
} catch (UriFormatException) {
uri = new Uri ("ssh://" + server + remote_path);
uri = new Uri ("ssh://" + server + remote_path);
}
if (!uri.Scheme.Equals ("ssh") &&
!uri.Scheme.Equals ("git")) {
uri = new Uri ("ssh://" + uri);
uri = new Uri ("ssh://" + uri);
}
@ -79,8 +79,10 @@ namespace SparkleLib.Git {
} else {
if (string.IsNullOrEmpty (uri.UserInfo)) {
uri = new Uri (uri.Scheme + "://git@" + uri.Host + ":" + uri.Port + uri.AbsolutePath);
uri = new Uri (uri.ToString ().Replace (":-1", ""));
if (uri.Port == -1)
uri = new Uri (uri.Scheme + "://git@" + uri.Host + uri.AbsolutePath);
else
uri = new Uri (uri.Scheme + "://git@" + uri.Host + ":" + uri.Port + uri.AbsolutePath);
}
}
@ -180,8 +182,8 @@ namespace SparkleLib.Git {
} else {
Warnings = new string [] {
string.Format ("You seem to have configured a system gitignore file. " +
"This may interfere with SparkleShare.\n({0})", output)
string.Format ("You seem to have configured a system wide gitignore file. " +
"This may affect SparkleShare files:\n\n{0}", output)
};
}
}

View file

@ -658,7 +658,7 @@ namespace SparkleLib.Git {
file_path = file_path.Substring (0,
file_path.Length - ".empty".Length);
if (change_type.Equals ("A") && !file_path.Contains (".notes")) {
if (change_type.Equals ("A")) {
change_set.Added.Add (file_path);
} else if (change_type.Equals ("M")) {
@ -692,7 +692,6 @@ namespace SparkleLib.Git {
change_set.Deleted.Count +
change_set.MovedFrom.Count) > 0) {
change_set.Notes.AddRange (GetNotes (change_set.Revision));
change_sets.Add (change_set);
}
}
@ -722,9 +721,6 @@ namespace SparkleLib.Git {
continue;
} else if (child_path.EndsWith (".notes")) {
continue;
} else if (child_path.EndsWith (".git")) {
continue;
}
@ -784,10 +780,7 @@ namespace SparkleLib.Git {
if (file_name.EndsWith (".empty"))
file_name = file_name.Substring (0, file_name.Length - 6);
if (file_name.StartsWith (".notes"))
message += "added a note";
else
message += "+ " + file_name + "" + n;
message += "+ " + file_name + "" + n;
count++;
if (count == max_count)

View file

@ -37,8 +37,7 @@ namespace SparkleLib {
public List<string> Edited = new List<string> ();
public List<string> MovedFrom = new List<string> ();
public List<string> MovedTo = new List<string> ();
public List<SparkleNote> Notes = new List<SparkleNote> ();
public string RelativeTimestamp {
get {
@ -57,7 +56,7 @@ namespace SparkleLib {
? time_span.Hours + " hours ago"
: "an hour ago";
if (time_span <= TimeSpan.FromDays (30))
if (time_span <= TimeSpan.FromDays (30))
return time_span.Days > 1
? time_span.Days + " days ago"
: "a day ago";
@ -70,17 +69,8 @@ namespace SparkleLib {
return time_span.Days > 365
? (time_span.Days / 365) + " years ago"
: "a year ago";
}
}
}
public class SparkleNote {
public SparkleUser User;
public DateTime Timestamp;
public string Body;
}
}
}

View file

@ -64,9 +64,6 @@ namespace SparkleLib {
public delegate void NewChangeSetEventHandler (SparkleChangeSet change_set);
public event NewChangeSetEventHandler NewChangeSet;
public delegate void NewNoteEventHandler (SparkleUser user);
public event NewNoteEventHandler NewNote;
public delegate void ConflictResolvedEventHandler ();
public event ConflictResolvedEventHandler ConflictResolved;
@ -259,82 +256,6 @@ namespace SparkleLib {
}
public List<SparkleNote> GetNotes (string revision) {
List<SparkleNote> notes = new List<SparkleNote> ();
string notes_path = Path.Combine (LocalPath, ".notes");
if (!Directory.Exists (notes_path)) {
Directory.CreateDirectory (notes_path);
File.SetAttributes (notes_path, FileAttributes.Directory | FileAttributes.Hidden);
}
Regex regex_notes = new Regex (@"<name>(.+)</name>.*" +
"<email>(.+)</email>.*" +
"<timestamp>([0-9]+)</timestamp>.*" +
"<body>(.+)</body>", RegexOptions.Compiled);
foreach (string file_path in Directory.GetFiles (notes_path)) {
if (Path.GetFileName (file_path).StartsWith (revision)) {
string note_xml = String.Join ("", File.ReadAllLines (file_path));
Match match_notes = regex_notes.Match (note_xml);
if (match_notes.Success) {
SparkleNote note = new SparkleNote () {
User = new SparkleUser (match_notes.Groups [1].Value,
match_notes.Groups [2].Value),
Timestamp = new DateTime (1970, 1, 1).AddSeconds (int.Parse (match_notes.Groups [3].Value)),
Body = match_notes.Groups [4].Value
};
notes.Add (note);
}
}
}
return notes;
}
public void AddNote (string revision, string note)
{
string notes_path = Path.Combine (LocalPath, ".notes");
if (!Directory.Exists (notes_path))
Directory.CreateDirectory (notes_path);
// Add a timestamp in seconds since unix epoch
int timestamp = (int) (DateTime.UtcNow - new DateTime (1970, 1, 1)).TotalSeconds;
string n = Environment.NewLine;
note = "<note>" + n +
" <user>" + n +
" <name>" + SparkleConfig.DefaultConfig.User.Name + "</name>" + n +
" <email>" + SparkleConfig.DefaultConfig.User.Email + "</email>" + n +
" </user>" + n +
" <timestamp>" + timestamp + "</timestamp>" + n +
" <body>" + note + "</body>" + n +
"</note>" + n;
string note_name = revision + SHA1 (timestamp.ToString () + note);
string note_path = Path.Combine (notes_path, note_name);
StreamWriter writer = new StreamWriter (note_path);
writer.Write (note);
writer.Close ();
// The watcher doesn't like .*/ so we need to trigger
// a change manually
FileSystemEventArgs args = new FileSystemEventArgs (WatcherChangeTypes.Changed,
notes_path, note_name);
OnFileActivity (args);
SparkleHelpers.DebugInfo ("Note", "Added note to " + revision);
}
private void SyncUpBase ()
{
try {
@ -411,23 +332,8 @@ namespace SparkleLib {
List<SparkleChangeSet> change_sets = GetChangeSets (1);
if (change_sets != null && change_sets.Count > 0) {
SparkleChangeSet change_set = change_sets [0];
bool note_added = false;
foreach (string added in change_set.Added) {
if (added.Contains (".notes")) {
if (NewNote != null)
NewNote (change_set.User);
note_added = true;
break;
}
}
if (!note_added) {
if (NewChangeSet != null)
NewChangeSet (change_set);
}
if (NewChangeSet != null)
NewChangeSet (change_sets [0]);
}
}
@ -452,14 +358,8 @@ namespace SparkleLib {
EnableWatching ();
this.progress_percentage = 0.0;
this.progress_speed = "";
string notes_path = Path.Combine (LocalPath, ".notes");
if (Directory.Exists (notes_path))
File.SetAttributes (notes_path,
FileAttributes.Directory | FileAttributes.Hidden);
}
this.progress_speed = "";
}
private void CreateWatcher ()

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>

View file

@ -37,7 +37,7 @@
VERSION=DescribeOutput;
ASM_VERSION=String.Format("{0}.{1}",version[0],version[1]);
ASM_FILE_VERSION=String.Format("{0}.{1}.{2}.{3}",version[0],version[1],version[2],version[3]);
ASM_FILE_VERSION="";
} catch (Exception e) {
// Current defaults

View file

@ -10,6 +10,17 @@ BUILD_DEFINES="-define:HAVE_APP_INDICATOR"
endif
SOURCES = \
../Program.cs \
../SparkleAboutController.cs \
../SparkleBubblesController.cs \
../SparkleControllerBase.cs \
../SparkleEventLogController.cs \
../SparkleExtensions.cs \
../SparkleInvite.cs \
../SparkleOptions.cs \
../SparklePlugin.cs \
../SparkleSetupController.cs \
../SparkleStatusIconController.cs \
SparkleAbout.cs \
SparkleBubbles.cs \
SparkleController.cs \

View file

@ -23,6 +23,8 @@ using Gtk;
using Mono.Unix;
using WebKit;
using IO = System.IO;
namespace SparkleShare {
public class SparkleEventLog : Window {
@ -118,6 +120,9 @@ namespace SparkleShare {
Controller.HideWindowEvent += delegate {
Application.Invoke (delegate {
HideAll ();
if (this.content_wrapper.Child != null)
this.content_wrapper.Remove (this.content_wrapper.Child);
});
};
@ -184,12 +189,19 @@ namespace SparkleShare {
store.AppendValues (_("All Projects"));
store.AppendValues ("---");
foreach (string folder in folders)
store.AppendValues (folder);
this.combo_box.Model = store;
this.combo_box.Active = 0;
this.combo_box.Model = store;
this.combo_box.Active = 0;
int row = 2;
foreach (string folder in folders) {
store.AppendValues (folder);
if (folder.Equals (Controller.SelectedFolder))
this.combo_box.Active = row;
row++;
}
this.combo_box.RowSeparatorFunc = delegate (TreeModel model, TreeIter iter) {
string item = (string) this.combo_box.Model.GetValue (iter, 0);
@ -222,6 +234,10 @@ namespace SparkleShare {
if (html == null)
return;
string pixmaps_path = IO.Path.Combine (SparkleUI.AssetsPath, "pixmaps");
string icons_path = new string [] {SparkleUI.AssetsPath, "icons",
"hicolor", "12x12", "status"}.Combine ();
html = html.Replace ("<!-- $body-font-size -->", (double) (Style.FontDescription.Size / 1024 + 3) + "px");
html = html.Replace ("<!-- $day-entry-header-font-size -->", (Style.FontDescription.Size / 1024 + 3) + "px");
@ -233,21 +249,21 @@ namespace SparkleShare {
html = html.Replace ("<!-- $day-entry-header-background-color -->", SparkleUIHelpers.GdkColorToHex (Style.Background (StateType.Normal)));
html = html.Replace ("<!-- $secondary-font-color -->", SparkleUIHelpers.GdkColorToHex (Style.Foreground (StateType.Insensitive)));
html = html.Replace ("<!-- $small-color -->", SparkleUIHelpers.GdkColorToHex (Style.Foreground (StateType.Insensitive)));
html = html.Replace ("<!-- $pixmaps-path -->", "file://" +
new string [] {SparkleUI.AssetsPath, "pixmaps"}.Combine ());
html = html.Replace ("<!-- $document-added-background-image -->", "file://" +
new string [] {SparkleUI.AssetsPath, "icons",
"hicolor", "12x12", "status", "document-added.png"}.Combine ());
html = html.Replace ("<!-- $document-edited-background-image -->", "file://" +
new string [] {SparkleUI.AssetsPath, "icons",
"hicolor", "12x12", "status", "document-edited.png"}.Combine ());
html = html.Replace ("<!-- $document-deleted-background-image -->", "file://" +
new string [] {SparkleUI.AssetsPath, "icons",
"hicolor", "12x12", "status", "document-deleted.png"}.Combine ());
html = html.Replace ("<!-- $document-moved-background-image -->", "file://" +
new string [] {SparkleUI.AssetsPath, "icons",
"hicolor", "12x12", "status", "document-moved.png"}.Combine ());
html = html.Replace ("<!-- $pixmaps-path -->", pixmaps_path);
html = html.Replace ("<!-- $document-added-background-image -->",
"file://" + IO.Path.Combine (icons_path + "document-added.png"));
html = html.Replace ("<!-- $document-edited-background-image -->",
"file://" + IO.Path.Combine (icons_path + "document-edited.png"));
html = html.Replace ("<!-- $document-deleted-background-image -->",
"file://" + IO.Path.Combine (icons_path + "document-deleted.png"));
html = html.Replace ("<!-- $document-moved-background-image -->",
"file://" + IO.Path.Combine (icons_path + "document-moved.png"));
Application.Invoke (delegate {
this.spinner.Stop ();

View file

@ -253,14 +253,6 @@ namespace SparkleShare {
}
}));
address_entry.Completion = new EntryCompletion();
ListStore server_store = new ListStore (typeof (string));
foreach (string host in Program.Controller.PreviousHosts)
server_store.AppendValues (host);
address_entry.Completion.Model = server_store;
address_entry.Completion.TextColumn = 0;
address_entry.Changed += delegate {
Controller.CheckAddPage (address_entry.Text, path_entry.Text, tree.SelectedRow);
@ -274,16 +266,6 @@ namespace SparkleShare {
layout_address.PackStart (address_entry, false, false, 0);
layout_address.PackStart (address_example, false, false, 0);
path_entry.Completion = new EntryCompletion();
ListStore folder_store = new ListStore (typeof (string));
//foreach (string host in Program.Controller.FolderPaths)
// folder_store.AppendValues (host);
path_entry.Completion.Model = folder_store;
path_entry.Completion.TextColumn = 0;
path_entry.Changed += delegate {
Controller.CheckAddPage (address_entry.Text, path_entry.Text, tree.SelectedRow);
};
@ -440,7 +422,7 @@ namespace SparkleShare {
Image list_point_three = new Image (SparkleUIHelpers.GetIcon ("list-point", 16)) { };
Label label_one = new Label () {
Text = "First, have you tried turning it off and on again?",
Text = "Is the host online?",
Wrap = true,
Xalign = 0
};

View file

@ -163,6 +163,9 @@ namespace SparkleShare {
{
InvokeOnMainThread (delegate {
PerformClose (this);
if (this.web_view.Superview == ContentView)
this.web_view.RemoveFromSuperview ();
});
}
};
@ -242,6 +245,17 @@ namespace SparkleShare {
this.popup_button.AddItem ("All Projects");
this.popup_button.Menu.AddItem (NSMenuItem.SeparatorItem);
int row = 2;
foreach (string folder in folders) {
this.popup_button.AddItem (folder);
if (folder.Equals (Controller.SelectedFolder))
this.popup_button.SelectItemAtIndex (row);
row++;
}
this.popup_button.AddItems (folders);
this.popup_button.Activated += delegate {
@ -269,6 +283,9 @@ namespace SparkleShare {
if (html == null)
html = Controller.HTML;
string pixmaps_path = Path.Combine (
NSBundle.MainBundle.ResourcePath, "Pixmaps");
html = html.Replace ("<!-- $body-font-family -->", "Lucida Grande");
html = html.Replace ("<!-- $day-entry-header-font-size -->", "13.6px");
html = html.Replace ("<!-- $body-font-size -->", "13.4px");
@ -277,26 +294,22 @@ namespace SparkleShare {
html = html.Replace ("<!-- $day-entry-header-background-color -->", "#f5f5f5");
html = html.Replace ("<!-- $a-color -->", "#0085cf");
html = html.Replace ("<!-- $a-hover-color -->", "#009ff8");
html = html.Replace ("<!-- $pixmaps-path -->",
"file://" + Path.Combine (NSBundle.MainBundle.ResourcePath,
"Pixmaps"));
html = html.Replace ("<!-- $pixmaps-path -->", pixmaps_path);
html = html.Replace ("<!-- $document-added-background-image -->",
"file://" + Path.Combine (NSBundle.MainBundle.ResourcePath,
"Pixmaps", "document-added-12.png"));
pixmaps_path + "/document-added-12.png"));
html = html.Replace ("<!-- $document-deleted-background-image -->",
"file://" + Path.Combine (NSBundle.MainBundle.ResourcePath,
"Pixmaps", "document-deleted-12.png"));
pixmaps_path + "/document-deleted-12.png"));
html = html.Replace ("<!-- $document-edited-background-image -->",
"file://" + Path.Combine (NSBundle.MainBundle.ResourcePath,
"Pixmaps", "document-edited-12.png"));
pixmaps_path + "/document-edited-12.png"));
html = html.Replace ("<!-- $document-moved-background-image -->",
"file://" + Path.Combine (NSBundle.MainBundle.ResourcePath,
"Pixmaps", "document-moved-12.png"));
pixmaps_path + "/document-moved-12.png"));
InvokeOnMainThread (delegate {
if (this.progress_indicator.Superview == ContentView)
this.progress_indicator.RemoveFromSuperview ();

View file

@ -546,7 +546,7 @@ namespace SparkleShare {
"}" +
"</style>" +
"<ul>" +
" <li>First, have you tried turning it off and on again?</li>" +
" <li>Is the host online?</li>" +
" <li><b>" + Controller.PreviousUrl + "</b> is the address we've compiled. Does this look alright?</li>" +
" <li>The host needs to know who you are. Did you upload the key that's in your SparkleShare folder?</li>" +
"</ul>";

View file

@ -16,6 +16,7 @@
using System;
using System.Threading;
#if __MonoCS__
using Mono.Unix;
@ -29,8 +30,10 @@ namespace SparkleShare {
public static SparkleController Controller;
public static SparkleUI UI;
public static Mutex ProgramMutex = new Mutex (false, "SparkleShare");
// Short alias for the translations
public static string _ (string s)
{
@ -66,7 +69,14 @@ namespace SparkleShare {
if (show_help)
ShowHelp (option_set);
// Only allow one instance of SparkleShare
if (!ProgramMutex.WaitOne (0, false)) {
Console.WriteLine ("SparkleShare is already running.");
Environment.Exit (-1);
}
// Initialize the controller this way so that
// there aren't any exceptions in the OS specific UI's
Controller = new SparkleController ();

View file

@ -36,11 +36,6 @@ namespace SparkleShare {
ShowBubble (change_set.User.Name, FormatMessage (change_set),
Program.Controller.GetAvatar (change_set.User.Email, 36));
};
Program.Controller.NoteNotificationRaised += delegate (SparkleUser user, string folder_name) {
ShowBubble (user.Name, "added a note to '" + folder_name + "'",
Program.Controller.GetAvatar (user.Email, 36));
};
}

View file

@ -82,10 +82,6 @@ namespace SparkleShare {
public event AlertNotificationRaisedEventHandler AlertNotificationRaised;
public delegate void AlertNotificationRaisedEventHandler (string title, string message);
public event NoteNotificationRaisedEventHandler NoteNotificationRaised;
public delegate void NoteNotificationRaisedEventHandler (SparkleUser user, string folder_name);
public bool FirstRun {
get {
@ -347,8 +343,7 @@ namespace SparkleShare {
existing_set.Deleted.AddRange (change_set.Deleted);
existing_set.MovedFrom.AddRange (change_set.MovedFrom);
existing_set.MovedTo.AddRange (change_set.MovedTo);
existing_set.Notes.AddRange (change_set.Notes);
existing_set.Added = existing_set.Added.Distinct ().ToList ();
existing_set.Edited = existing_set.Edited.Distinct ().ToList ();
existing_set.Deleted = existing_set.Deleted.Distinct ().ToList ();
@ -401,42 +396,42 @@ namespace SparkleShare {
event_entry += "<dd>Did something magical</dd>";
} else {
if (change_set.Edited.Count > 0) {
foreach (string file_path in change_set.Edited) {
event_entry += "<dd class='document edited'>";
event_entry += FormatBreadCrumbs (
Path.Combine (SparkleConfig.DefaultConfig.FoldersPath, change_set.Folder),
file_path
);
event_entry += "</dd>";
}
}
if (change_set.Added.Count > 0) {
foreach (string file_path in change_set.Added) {
event_entry += "<dd class='document added'>";
event_entry += FormatBreadCrumbs (
Path.Combine (SparkleConfig.DefaultConfig.FoldersPath, change_set.Folder),
file_path
);
event_entry += FormatBreadCrumbs (
Path.Combine (SparkleConfig.DefaultConfig.FoldersPath, change_set.Folder),
file_path
);
event_entry += "</dd>";
}
}
if (change_set.Edited.Count > 0) {
foreach (string file_path in change_set.Edited) {
event_entry += "<dd class='document edited'>";
event_entry += "</dd>";
event_entry += FormatBreadCrumbs (
Path.Combine (SparkleConfig.DefaultConfig.FoldersPath, change_set.Folder),
file_path
);
event_entry += "</dd>";
}
}
if (change_set.Deleted.Count > 0) {
foreach (string file_path in change_set.Deleted) {
event_entry += "<dd class='document deleted'>";
event_entry += "<dd class='document deleted'>";
event_entry += FormatBreadCrumbs (
Path.Combine (SparkleConfig.DefaultConfig.FoldersPath, change_set.Folder),
file_path
);
event_entry += FormatBreadCrumbs (
Path.Combine (SparkleConfig.DefaultConfig.FoldersPath, change_set.Folder),
file_path
);
event_entry += "</dd>";
event_entry += "</dd>";
}
}
@ -444,8 +439,8 @@ namespace SparkleShare {
int i = 0;
foreach (string file_path in change_set.MovedFrom) {
string to_file_path = change_set.MovedTo [i];
event_entry += "<dd class='document moved'>";
event_entry += "<dd class='document moved'>";
event_entry += FormatBreadCrumbs (
Path.Combine (SparkleConfig.DefaultConfig.FoldersPath, change_set.Folder),
file_path
@ -464,37 +459,16 @@ namespace SparkleShare {
}
}
string comments = "";
comments = "<div class=\"comments\">";
if (change_set.Notes != null) {
change_set.Notes.Sort ((x, y) => (x.Timestamp.CompareTo (y.Timestamp)));
foreach (SparkleNote note in change_set.Notes) {
string note_avatar = GetAvatar (note.User.Email, 48);
if (File.Exists (note_avatar))
note_avatar = "file://" + note_avatar;
else
note_avatar = "<!-- $no-buddy-icon-background-image -->";
comments += "<div class=\"comment-text\">" +
"<p class=\"comment-author\"" +
" style=\"background-image: url('" + note_avatar + "');\">" +
note.User.Name + "</p>" +
note.Body +
"</div>";
}
}
comments += "</div>";
string change_set_avatar = GetAvatar (change_set.User.Email, 48);
if (File.Exists (change_set_avatar))
change_set_avatar = "file://" + change_set_avatar;
else
change_set_avatar = "<!-- $pixmaps-path -->/" + AssignAvatar (change_set.User.Email);
if (File.Exists (change_set_avatar)) {
change_set_avatar = "file://" + change_set_avatar.Replace ("\\", "/");
} else {
change_set_avatar = "file://<!-- $pixmaps-path -->/" +
AssignAvatar (change_set.User.Email);
}
event_entry += "</dl>";
string timestamp = change_set.Timestamp.ToString ("H:mm");
@ -510,8 +484,7 @@ namespace SparkleShare {
.Replace ("<!-- $event-folder -->", change_set.Folder)
.Replace ("<!-- $event-url -->", change_set.Url.ToString ())
.Replace ("<!-- $event-revision -->", change_set.Revision)
.Replace ("<!-- $event-folder-color -->", AssignColor (change_set.Folder))
.Replace ("<!-- $event-comments -->", comments);
.Replace ("<!-- $event-folder-color -->", AssignColor (change_set.Folder));
}
string day_entry = "";
@ -625,12 +598,6 @@ namespace SparkleShare {
NotificationRaised (change_set);
};
repo.NewNote += delegate (SparkleUser user) {
if (NoteNotificationRaised != null)
NoteNotificationRaised (user, repo.Name);
};
repo.ConflictResolved += delegate {
if (AlertNotificationRaised != null)
AlertNotificationRaised ("Conflict detected.",
@ -976,8 +943,8 @@ namespace SparkleShare {
public void FetchFolder (string server, string remote_folder, string announcements_url)
{
server = server.Trim ();
remote_folder = remote_folder.Trim ();
server = server.Trim ();
remote_folder = remote_folder.Trim ();
if (announcements_url != null)
announcements_url = announcements_url.Trim ();
@ -1020,7 +987,7 @@ namespace SparkleShare {
"Failed to load \"" + backend + "\" backend for \"" + canonical_name + "\"");
if (FolderFetchError != null)
FolderFetchError (Path.Combine (server, remote_folder));
FolderFetchError (Path.Combine (server, remote_folder).Replace (@"\", "/"));
return;
}
@ -1073,9 +1040,10 @@ namespace SparkleShare {
this.fetcher.Dispose ();
this.fetcher = null;
if (Directory.Exists (tmp_path))
Directory.Delete (tmp_path, true);
// TODO: only remove stale repos
//if (Directory.Exists (tmp_path))
// Directory.Delete (tmp_path, true);
};
this.fetcher.Failed += delegate {
@ -1137,20 +1105,6 @@ namespace SparkleShare {
}
public void AddNoteToFolder (string folder_name, string revision, string note)
{
folder_name = folder_name.Replace ("%20", " ");
note = note.Replace ("%20", " ");
lock (this.repo_lock) {
foreach (SparkleRepoBase repo in Repositories) {
if (repo.Name.Equals (folder_name))
repo.AddNote (revision, note);
}
}
}
private string [] tango_palette = new string [] {"#eaab00", "#e37222",
"#3892ab", "#33c2cb", "#19b271", "#9eab05", "#8599a8", "#9ca696",
"#b88454", "#cc0033", "#8f6678", "#8c6cd0", "#796cbf", "#4060af",
@ -1189,19 +1143,25 @@ namespace SparkleShare {
private string FormatBreadCrumbs (string path_root, string path)
{
path_root = path_root.Replace ("/",
Path.DirectorySeparatorChar.ToString ());
path = path.Replace ("/",
Path.DirectorySeparatorChar.ToString ());
string link = "";
string [] crumbs = path.Split (Path.DirectorySeparatorChar);
int i = 0;
string new_path_root = path_root;
bool previous_was_folder = false;
foreach (string crumb in crumbs) {
if (string.IsNullOrEmpty (crumb))
continue;
string crumb_path = Path.Combine (new_path_root, crumb);
if (Directory.Exists (crumb_path)) {
link += "<a href='" + crumb_path + "'>" + crumb + Path.DirectorySeparatorChar + "</a>";
previous_was_folder = true;

View file

@ -72,8 +72,10 @@ namespace SparkleShare {
// A short delay is less annoying than
// a flashing window
if (watch.ElapsedMilliseconds < 750)
Thread.Sleep (750 - (int) watch.ElapsedMilliseconds);
int delay = 1000;
if (watch.ElapsedMilliseconds < delay)
Thread.Sleep (delay - (int) watch.ElapsedMilliseconds);
if (UpdateContentEvent != null)
UpdateContentEvent (html);
@ -161,15 +163,16 @@ namespace SparkleShare {
if (UpdateContentEvent != null)
UpdateContentEvent (HTML);
};
Program.Controller.OnIdle += delegate {
if (UpdateContentEvent != null)
UpdateContentEvent (HTML);
// TODO: Check selected folder
if (UpdateSizeInfoEvent != null)
UpdateSizeInfoEvent (Size, HistorySize);
};
Program.Controller.FolderListChanged += delegate {
if (this.selected_folder != null &&
!Program.Controller.Folders.Contains (this.selected_folder)) {
@ -180,9 +183,6 @@ namespace SparkleShare {
if (UpdateChooserEvent != null)
UpdateChooserEvent (Folders);
if (UpdateContentEvent != null)
UpdateContentEvent (HTML);
if (UpdateSizeInfoEvent != null)
UpdateSizeInfoEvent (Size, HistorySize);
};
@ -193,29 +193,17 @@ namespace SparkleShare {
{
if (HideWindowEvent != null)
HideWindowEvent ();
this.selected_folder = null;
}
public void LinkClicked (string url)
{
if (url.StartsWith (Path.VolumeSeparatorChar.ToString ())) {
if (url.StartsWith (Path.VolumeSeparatorChar.ToString ()) ||
url.Substring (1, 1).Equals (":")) {
Program.Controller.OpenFile (url);
} else {
Regex regex = new Regex (@"(.+)~(.+)~(.+)");
Match match = regex.Match (url);
if (match.Success) {
string folder_name = match.Groups [1].Value;
string revision = match.Groups [2].Value;
string note = match.Groups [3].Value;
Thread thread = new Thread (new ThreadStart (delegate {
Program.Controller.AddNoteToFolder (folder_name, revision, note);
}));
thread.Start ();
}
}
}
}

View file

@ -1,62 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CefSharp;
using System.IO;
namespace SparkleShare {
class ApplicationSchemeHandler : ISchemeHandler {
#region ISchemeHandler Members
public bool ProcessRequest (IRequest request, ref string mimeType, ref Stream stream)
{
if (request.Url.EndsWith (".png")) {
System.Drawing.Bitmap Image=null;
if (request.Url.EndsWith ("avatar-default-32.png"))
Image = Icons.avatar_default_32;
else if (request.Url.EndsWith ("document-added-12.png"))
Image = Icons.document_added_12;
else if (request.Url.EndsWith ("document-edited-12.png"))
Image = Icons.document_edited_12;
else if (request.Url.EndsWith ("document-deleted-12.png"))
Image = Icons.document_deleted_12;
else if (request.Url.EndsWith ("document-moved-12.png"))
Image = Icons.document_moved_12;
if (Image != null) {
stream = new MemoryStream ();
Image.Save (stream, System.Drawing.Imaging.ImageFormat.Png);
stream.Seek (0, SeekOrigin.Begin);
mimeType = "image/png";
return true;
}
} else if (request.Url.EndsWith (".js")) {
string Text = null;
if (request.Url.EndsWith ("jquery.js"))
Text = Properties.Resources.jquery_js;
if (Text != null) {
stream = new MemoryStream (Encoding.UTF8.GetPreamble ().Concat (Encoding.UTF8.GetBytes (Text)).ToArray ());
mimeType = "application/javascript";
return true;
}
}
return false;
}
#endregion
}
public class ApplicationSchemeHandlerFactory : ISchemeHandlerFactory {
public ISchemeHandler Create ()
{
return new ApplicationSchemeHandler ();
}
}
}

View file

@ -1,8 +1,19 @@
/*
* AssemblyInfo.cs
*
* This is free software. See COPYING for details.
*/
// 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.Reflection;
using System.Runtime.CompilerServices;

View file

@ -1,27 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CefSharp;
using System.IO;
namespace SparkleShare {
class FileSchemeHandler : ISchemeHandler {
#region ISchemeHandler Members
public bool ProcessRequest (IRequest request, ref string mimeType, ref Stream stream)
{
return false;
}
#endregion
}
public class FileSchemeHandlerFactory : ISchemeHandlerFactory {
public ISchemeHandler Create ()
{
return new FileSchemeHandler ();
}
}
}

View file

@ -1,301 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Este código fue generado por una herramienta.
// Versión del motor en tiempo de ejecución:2.0.50727.3625
//
// Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si
// se vuelve a generar el código.
// </auto-generated>
//------------------------------------------------------------------------------
namespace SparkleShare {
using System;
/// <summary>
/// Clase de recurso con establecimiento inflexible de tipos, para buscar cadenas traducidas, etc.
/// </summary>
// StronglyTypedResourceBuilder generó automáticamente esta clase
// a través de una herramienta como ResGen o Visual Studio.
// Para agregar o quitar un miembro, edite el archivo .ResX y, a continuación, vuelva a ejecutar ResGen
// con la opción /str o vuelva a generar su proyecto de VS.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Icons {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Icons() {
}
/// <summary>
/// Devuelve la instancia de ResourceManager almacenada en caché utilizada por esta clase.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SparkleShare.Icons", typeof(Icons).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Reemplaza la propiedad CurrentUICulture del subproceso actual para todas las
/// búsquedas de recursos mediante esta clase de recurso con establecimiento inflexible de tipos.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
internal static System.Drawing.Bitmap about {
get {
object obj = ResourceManager.GetObject("about", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap avatar_default {
get {
object obj = ResourceManager.GetObject("avatar_default", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap avatar_default_16 {
get {
object obj = ResourceManager.GetObject("avatar_default_16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap avatar_default_22 {
get {
object obj = ResourceManager.GetObject("avatar_default_22", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap avatar_default_24 {
get {
object obj = ResourceManager.GetObject("avatar_default_24", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap avatar_default_32 {
get {
object obj = ResourceManager.GetObject("avatar_default_32", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap avatar_default_48 {
get {
object obj = ResourceManager.GetObject("avatar_default_48", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap dialog_error_16 {
get {
object obj = ResourceManager.GetObject("dialog_error_16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap dialog_error_24 {
get {
object obj = ResourceManager.GetObject("dialog_error_24", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap document_added_12 {
get {
object obj = ResourceManager.GetObject("document_added_12", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap document_deleted_12 {
get {
object obj = ResourceManager.GetObject("document_deleted_12", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap document_edited_12 {
get {
object obj = ResourceManager.GetObject("document_edited_12", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap document_moved_12 {
get {
object obj = ResourceManager.GetObject("document_moved_12", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap folder_sparkleshare_16 {
get {
object obj = ResourceManager.GetObject("folder_sparkleshare_16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap folder_sparkleshare_22 {
get {
object obj = ResourceManager.GetObject("folder_sparkleshare_22", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap folder_sparkleshare_24 {
get {
object obj = ResourceManager.GetObject("folder_sparkleshare_24", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap folder_sparkleshare_256 {
get {
object obj = ResourceManager.GetObject("folder_sparkleshare_256", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap folder_sparkleshare_32 {
get {
object obj = ResourceManager.GetObject("folder_sparkleshare_32", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap folder_sparkleshare_48 {
get {
object obj = ResourceManager.GetObject("folder_sparkleshare_48", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap list_point_16 {
get {
object obj = ResourceManager.GetObject("list_point_16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap process_syncing_sparkleshare_24 {
get {
object obj = ResourceManager.GetObject("process_syncing_sparkleshare_24", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap process_syncing_sparkleshare_i_24 {
get {
object obj = ResourceManager.GetObject("process_syncing_sparkleshare_i_24", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap process_syncing_sparkleshare_ii_24 {
get {
object obj = ResourceManager.GetObject("process_syncing_sparkleshare_ii_24", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap process_syncing_sparkleshare_iii_24 {
get {
object obj = ResourceManager.GetObject("process_syncing_sparkleshare_iii_24", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap process_syncing_sparkleshare_iiii_24 {
get {
object obj = ResourceManager.GetObject("process_syncing_sparkleshare_iiii_24", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap process_syncing_sparkleshare_iiiii_24 {
get {
object obj = ResourceManager.GetObject("process_syncing_sparkleshare_iiiii_24", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap process_working_22 {
get {
object obj = ResourceManager.GetObject("process_working_22", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap side_splash {
get {
object obj = ResourceManager.GetObject("side_splash", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Icon sparkleshare {
get {
object obj = ResourceManager.GetObject("sparkleshare", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
internal static System.Drawing.Bitmap sparkleshare_syncing_error_24 {
get {
object obj = ResourceManager.GetObject("sparkleshare_syncing_error_24", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap tutorial_slide_1 {
get {
object obj = ResourceManager.GetObject("tutorial_slide_1", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap tutorial_slide_2 {
get {
object obj = ResourceManager.GetObject("tutorial_slide_2", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap tutorial_slide_3 {
get {
object obj = ResourceManager.GetObject("tutorial_slide_3", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap tutorial_slide_4 {
get {
object obj = ResourceManager.GetObject("tutorial_slide_4", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

View file

@ -1,223 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="avatar_default_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\data\icons\avatar-default-16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="avatar_default_22" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\data\icons\avatar-default-22.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="avatar_default_24" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\data\icons\avatar-default-24.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="avatar_default_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\data\icons\avatar-default-32.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="avatar_default_48" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\data\icons\avatar-default-48.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="avatar_default" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\data\icons\avatar-default.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="dialog_error_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\data\icons\dialog-error-16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="dialog_error_24" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\data\icons\dialog-error-24.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="document_added_12" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\data\icons\document-added-12.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="document_deleted_12" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\data\icons\document-deleted-12.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="document_edited_12" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\data\icons\document-edited-12.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="document_moved_12" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\data\icons\document-moved-12.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="folder_sparkleshare_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\data\icons\folder-sparkleshare-16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="folder_sparkleshare_22" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\data\icons\folder-sparkleshare-22.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="folder_sparkleshare_24" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\data\icons\folder-sparkleshare-24.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="folder_sparkleshare_256" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\data\icons\folder-sparkleshare-256.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="folder_sparkleshare_32" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\data\icons\folder-sparkleshare-32.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="folder_sparkleshare_48" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\data\icons\folder-sparkleshare-48.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="list_point_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\data\icons\list-point-16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="process_syncing_sparkleshare_24" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\data\icons\process-syncing-sparkleshare-24.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="process_syncing_sparkleshare_i_24" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\data\icons\process-syncing-sparkleshare-i-24.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="process_syncing_sparkleshare_ii_24" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\data\icons\process-syncing-sparkleshare-ii-24.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="process_syncing_sparkleshare_iii_24" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\data\icons\process-syncing-sparkleshare-iii-24.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="process_syncing_sparkleshare_iiii_24" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\data\icons\process-syncing-sparkleshare-iiii-24.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="process_syncing_sparkleshare_iiiii_24" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\data\icons\process-syncing-sparkleshare-iiiii-24.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="process_working_22" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\data\icons\process-working-22.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="sparkleshare_syncing_error_24" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\data\icons\sparkleshare-syncing-error-24.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="sparkleshare" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\data\icons\sparkleshare.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="about" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\data\about.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="side_splash" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\data\side-splash.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="tutorial_slide_1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\data\tutorial-slide-1.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="tutorial_slide_2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\data\tutorial-slide-2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="tutorial_slide_3" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\data\tutorial-slide-3.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="tutorial_slide_4" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\data\tutorial-slide-4.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View file

@ -1,168 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<#@ template language="C#v3.5" HostSpecific="true" #>
<#@ output extension="resx" #>
<#@ import namespace="System" #>
<#@ import namespace="System.IO" #>
<#@ import namespace="System.Diagnostics" #>
<#@ import namespace="System.Text.RegularExpressions" #>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<#
string RelativeDir = @"..\..\data\icons";
DirectoryInfo dir = new DirectoryInfo(RelativeDir);
foreach (FileInfo f in dir.GetFiles("*.png"))
{
string DataName = Regex.Replace(Path.ChangeExtension(f.Name, null), "[^a-zA-Z0-9_]", "_");
string FileName = Path.Combine(RelativeDir, f.Name);
#>
<data name="<#= DataName #>" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value><#= FileName #>;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<#
}
foreach (FileInfo f in dir.GetFiles("*.ico"))
{
string DataName = Regex.Replace(Path.ChangeExtension(f.Name, null), "[^a-zA-Z0-9_]", "_");
string FileName = Path.Combine(RelativeDir, f.Name);
#>
<data name="<#= DataName #>" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value><#= FileName #>;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<#
}
RelativeDir = @"..\..\data";
dir = new DirectoryInfo(RelativeDir);
foreach (FileInfo f in dir.GetFiles("*.png"))
{
string DataName = Regex.Replace(Path.ChangeExtension(f.Name, null), "[^a-zA-Z0-9_]", "_");
string FileName = Path.Combine(RelativeDir, f.Name);
#>
<data name="<#= DataName #>" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value><#= FileName #>;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<#
}
#>
</root>

View file

@ -0,0 +1,115 @@
{\rtf1\ansi\ansicpg1252\deff0\deflang2077{\fonttbl{\f0\froman\fcharset0 Times New Roman;}{\f1\fnil\fcharset0 Calibri;}{\f2\fnil\fcharset2 Symbol;}}
{\colortbl ;\red0\green0\blue255;}
{\*\generator Msftedit 5.41.21.2510;}\viewkind4\uc1\pard\keepn\sb100\sa100\lang1053\b\f0\fs28 GNU GENERAL PUBLIC LICENSE\par
\pard\sb100\sa100\b0\fs24 Version 3, 29 June 2007\par
Copyright \'a9 2007 Free Software Foundation, Inc. <{\field{\*\fldinst{HYPERLINK "http://fsf.org/"}}{\fldrslt{\ul\cf1 http://fsf.org/}}}\f0\fs24 >\par
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.\par
\pard\keepn\sb100\sa100\b\fs28 Preamble\par
\pard\sb100\sa100\b0\fs24 The GNU General Public License is a free, copyleft license for software and other kinds of works.\par
The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.\par
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.\par
To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.\par
For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.\par
Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.\par
For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.\par
Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.\par
Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.\par
The precise terms and conditions for copying, distribution and modification follow.\par
\pard\keepn\sb100\sa100\b\fs28 TERMS AND CONDITIONS\par
\fs24 0. Definitions.\par
\pard\sb100\sa100\b0\ldblquote This License\rdblquote refers to version 3 of the GNU General Public License.\par
\ldblquote Copyright\rdblquote also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.\par
\ldblquote The Program\rdblquote refers to any copyrightable work licensed under this License. Each licensee is addressed as \ldblquote you\rdblquote . \ldblquote Licensees\rdblquote and \ldblquote recipients\rdblquote may be individuals or organizations.\par
To \ldblquote modify\rdblquote a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a \ldblquote modified version\rdblquote of the earlier work or a work \ldblquote based on\rdblquote the earlier work.\par
A \ldblquote covered work\rdblquote means either the unmodified Program or a work based on the Program.\par
To \ldblquote propagate\rdblquote a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.\par
To \ldblquote convey\rdblquote a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.\par
An interactive user interface displays \ldblquote Appropriate Legal Notices\rdblquote to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.\par
\pard\keepn\sb100\sa100\b 1. Source Code.\par
\pard\sb100\sa100\b0 The \ldblquote source code\rdblquote for a work means the preferred form of the work for making modifications to it. \ldblquote Object code\rdblquote means any non-source form of a work.\par
A \ldblquote Standard Interface\rdblquote means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.\par
The \ldblquote System Libraries\rdblquote of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A \ldblquote Major Component\rdblquote , in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.\par
The \ldblquote Corresponding Source\rdblquote for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.\par
The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.\par
The Corresponding Source for a work in source code form is that same work.\par
\pard\keepn\sb100\sa100\b 2. Basic Permissions.\par
\pard\sb100\sa100\b0 All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.\par
You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.\par
Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.\par
\pard\keepn\sb100\sa100\b 3. Protecting Users' Legal Rights From Anti-Circumvention Law.\par
\pard\sb100\sa100\b0 No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.\par
When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.\par
\pard\keepn\sb100\sa100\b 4. Conveying Verbatim Copies.\par
\pard\sb100\sa100\b0 You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.\par
You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.\par
\pard\keepn\sb100\sa100\b 5. Conveying Modified Source Versions.\par
\pard\sb100\sa100\b0 You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:\par
\pard{\pntext\f2\'B7\tab}{\*\pn\pnlvlblt\pnf2\pnindent360{\pntxtb\'B7}}\fi-360\li720\sb100\sa100 a) The work must carry prominent notices stating that you modified it, and giving a relevant date. \par
{\pntext\f2\'B7\tab}b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to \ldblquote keep intact all notices\rdblquote . \par
{\pntext\f2\'B7\tab}c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. \par
{\pntext\f2\'B7\tab}d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. \par
\pard\sb100\sa100 A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an \ldblquote aggregate\rdblquote if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.\par
\pard\keepn\sb100\sa100\b 6. Conveying Non-Source Forms.\par
\pard\sb100\sa100\b0 You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:\par
\pard{\pntext\f2\'B7\tab}{\*\pn\pnlvlblt\pnf2\pnindent360{\pntxtb\'B7}}\fi-360\li720\sb100\sa100 a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. \par
{\pntext\f2\'B7\tab}b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. \par
{\pntext\f2\'B7\tab}c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. \par
{\pntext\f2\'B7\tab}d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. \par
{\pntext\f2\'B7\tab}e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. \par
\pard\sb100\sa100 A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.\par
A \ldblquote User Product\rdblquote is either (1) a \ldblquote consumer product\rdblquote , which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, \ldblquote normally used\rdblquote refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.\par
\ldblquote Installation Information\rdblquote for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.\par
If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).\par
The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.\par
Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.\par
\pard\keepn\sb100\sa100\b 7. Additional Terms.\par
\pard\sb100\sa100\b0\ldblquote Additional permissions\rdblquote are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.\par
When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.\par
Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:\par
\pard{\pntext\f2\'B7\tab}{\*\pn\pnlvlblt\pnf2\pnindent360{\pntxtb\'B7}}\fi-360\li720\sb100\sa100 a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or \par
{\pntext\f2\'B7\tab}b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or \par
{\pntext\f2\'B7\tab}c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or \par
{\pntext\f2\'B7\tab}d) Limiting the use for publicity purposes of names of licensors or authors of the material; or \par
{\pntext\f2\'B7\tab}e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or \par
{\pntext\f2\'B7\tab}f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. \par
\pard\sb100\sa100 All other non-permissive additional terms are considered \ldblquote further restrictions\rdblquote within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.\par
If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.\par
Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.\par
\pard\keepn\sb100\sa100\b 8. Termination.\par
\pard\sb100\sa100\b0 You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).\par
However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.\par
Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.\par
Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.\par
\pard\keepn\sb100\sa100\b 9. Acceptance Not Required for Having Copies.\par
\pard\sb100\sa100\b0 You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.\par
\pard\keepn\sb100\sa100\b 10. Automatic Licensing of Downstream Recipients.\par
\pard\sb100\sa100\b0 Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.\par
An \ldblquote entity transaction\rdblquote is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.\par
You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.\par
\pard\keepn\sb100\sa100\b 11. Patents.\par
\pard\sb100\sa100\b0 A \ldblquote contributor\rdblquote is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's \ldblquote contributor version\rdblquote .\par
A contributor's \ldblquote essential patent claims\rdblquote are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, \ldblquote control\rdblquote includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.\par
Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.\par
In the following three paragraphs, a \ldblquote patent license\rdblquote is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To \ldblquote grant\rdblquote such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.\par
If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. \ldblquote Knowingly relying\rdblquote means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.\par
If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.\par
A patent license is \ldblquote discriminatory\rdblquote if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.\par
Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.\par
\pard\keepn\sb100\sa100\b 12. No Surrender of Others' Freedom.\par
\pard\sb100\sa100\b0 If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.\par
\pard\keepn\sb100\sa100\b 13. Use with the GNU Affero General Public License.\par
\pard\sb100\sa100\b0 Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.\par
\pard\keepn\sb100\sa100\b 14. Revised Versions of this License.\par
\pard\sb100\sa100\b0 The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.\par
Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License \ldblquote or any later version\rdblquote applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.\par
If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.\par
Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.\par
\pard\keepn\sb100\sa100\b 15. Disclaimer of Warranty.\par
\pard\sb100\sa100\b0 THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \ldblquote AS IS\rdblquote WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\par
\pard\keepn\sb100\sa100\b 16. Limitation of Liability.\par
\pard\sb100\sa100\b0 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\par
\pard\keepn\sb100\sa100\b 17. Interpretation of Sections 15 and 16.\par
\pard\sb100\sa100\b0 If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.\par
END OF TERMS AND CONDITIONS\lang29\f1\fs22\par
}

View file

@ -1,150 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.3053
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace SparkleShare.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SparkleShare.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized string similar to &lt;div class=&apos;day-entry&apos;&gt;
/// &lt;div class=&apos;day-entry-header&apos;&gt;
/// &lt;!-- $day-entry-header --&gt;
/// &lt;/div&gt;
/// &lt;div class=&apos;day-entry-content&apos;&gt;
/// &lt;!-- $day-entry-content --&gt;
/// &lt;/div&gt;
///&lt;/div&gt;
///.
/// </summary>
internal static string day_entry_html {
get {
return ResourceManager.GetString("day_entry_html", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to &lt;div class=&apos;event-entry&apos; style=&apos;background-image: url(&quot;&lt;!-- $event-avatar-url --&gt;&quot;);&apos;&gt;
/// &lt;div class=&apos;event-user-name&apos;&gt;&lt;!-- $event-user-name --&gt;&lt;/div&gt;
/// &lt;div class=&apos;event-folder&apos;&gt;&lt;!-- $event-folder --&gt;&lt;/div&gt;
///
/// &lt;!-- $event-entry-content --&gt;
///
/// &lt;div class=&quot;clearer&quot;&gt;&lt;/div&gt;
/// &lt;div class=&quot;event-timestamp&quot;&gt;&lt;!-- $event-time --&gt;&lt;/div&gt;
/// &lt;div class=&quot;action note&quot;&gt;Add note&lt;/div&gt;
/// &lt;div class=&quot;action show&quot;&gt;Show all&lt;/div&gt;
///
/// &lt;div class=&quot;clearer&quot;&gt;&lt;/div&gt;
///
/// &lt;div class=&quot;comments-section&quot;&gt;
/// [rest of string was truncated]&quot;;.
/// </summary>
internal static string event_entry_html {
get {
return ResourceManager.GetString("event_entry_html", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to &lt;!doctype html&gt;
///&lt;html&gt;
/// &lt;head&gt;
/// &lt;title&gt;SparkleShare Event Log&lt;/title&gt;
/// &lt;script type=&quot;text/javascript&quot; src=&quot;&lt;!-- $jquery-url --&gt;&quot;&gt;&lt;/script&gt;
/// &lt;script type=&quot;text/javascript&quot;&gt;
/// $(document).ready(function () {
/// $(&apos;.comments-section&apos;).each (function () {
/// if ($(this).find (&apos;.comments&apos;).children ().size () &lt; 1) {
/// $(this).hide ();
/// }
/// });
///
/// $(&apos;.buddy-icon&apos;).each (function () {
/// [rest of string was truncated]&quot;;.
/// </summary>
internal static string event_log_html {
get {
return ResourceManager.GetString("event_log_html", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to /*!
/// * jQuery JavaScript Library v1.6.1
/// * http://jquery.com/
/// *
/// * Copyright 2011, John Resig
/// * Dual licensed under the MIT or GPL Version 2 licenses.
/// * http://jquery.org/license
/// *
/// * Includes Sizzle.js
/// * http://sizzlejs.com/
/// * Copyright 2011, The Dojo Foundation
/// * Released under the MIT, BSD, and GPL Licenses.
/// *
/// * Date: Thu May 12 15:04:36 2011 -0400
/// */
///(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!cj[a]){var [rest of string was truncated]&quot;;.
/// </summary>
internal static string jquery_js {
get {
return ResourceManager.GetString("jquery_js", resourceCulture);
}
}
}
}

View file

@ -1,133 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="day_entry_html" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\..\data\html\day-entry.html;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
<data name="event_entry_html" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\..\data\html\event-entry.html;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
<data name="event_log_html" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\..\data\html\event-log.html;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
<data name="jquery_js" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\..\..\data\html\jquery.js;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
</root>

View file

@ -21,6 +21,7 @@ using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Xaml;
namespace SparkleShare {
@ -108,7 +109,7 @@ namespace SparkleShare {
this.updates = new Label () {
Content = "Checking for updates...",
FontSize = 11,
Foreground = new SolidColorBrush (Color.FromRgb (45, 62, 81)) // TODO: color looks off
Foreground = new SolidColorBrush (Color.FromRgb (135, 178, 227))
};
TextBlock credits = new TextBlock () {

View file

@ -26,7 +26,6 @@ using System.Text.RegularExpressions;
using System.Threading;
using System.Windows.Forms;
using CefSharp;
using Microsoft.Win32;
using SparkleLib;
@ -55,20 +54,6 @@ namespace SparkleShare {
public override void Initialize ()
{
Settings settings = new Settings ();
BrowserSettings browser_settings = new BrowserSettings ();
if (!CEF.Initialize (settings, browser_settings)) {
Console.WriteLine ("Could not initialise CEF");
return;
}
CEF.RegisterScheme ("application", "sparkleshare", new ApplicationSchemeHandlerFactory ());
CEF.RegisterScheme ("application", "file", new FileSchemeHandlerFactory ());
Application.EnableVisualStyles ();
Application.SetCompatibleTextRenderingDefault (false);
// Add msysgit to path, as we cannot asume it is added to the path
// Asume it is installed in @"<exec dir>\msysgit\bin"
string executable_dir = Path.GetDirectoryName (Application.ExecutablePath);
@ -94,8 +79,9 @@ namespace SparkleShare {
public override string EventLogHTML
{
get {
string html = Properties.Resources.event_log_html;
html = html.Replace ("<!-- $jquery-url -->", "application://sparkleshare/jquery.js");
string html = SparkleUIHelpers.GetHTML ("event-log.html");
html = html.Replace ("<!-- $jquery -->", SparkleUIHelpers.GetHTML ("jquery.js"));
return html;
}
}
@ -104,7 +90,7 @@ namespace SparkleShare {
public override string DayEntryHTML
{
get {
return Properties.Resources.day_entry_html;
return SparkleUIHelpers.GetHTML ("day-entry.html");
}
}
@ -112,7 +98,7 @@ namespace SparkleShare {
public override string EventEntryHTML
{
get {
return Properties.Resources.event_entry_html;
return SparkleUIHelpers.GetHTML ("event-entry.html");
}
}
@ -125,6 +111,8 @@ namespace SparkleShare {
public override void InstallProtocolHandler()
{
/* FIXME: Need to find a way to do this without administrator privilidges (or move to the installer)
// Get assembly location
string location = System.Reflection.Assembly.GetExecutingAssembly ().Location;
string folder = Path.GetDirectoryName (location);
@ -141,6 +129,7 @@ namespace SparkleShare {
string action_key = "HKEY_CLASSES_ROOT\\sparkleshare\\shell\\open\\command";
Registry.SetValue (action_key, "", "\"" + invite_exe + "\" \"%1\"");
*/
}
@ -171,11 +160,7 @@ namespace SparkleShare {
public override void OpenFile (string url)
{
Process process = new Process ();
process.StartInfo.FileName = "start";
process.StartInfo.Arguments = "\"" + url + "\"";
process.Start ();
Process.Start (url);
}
@ -183,8 +168,7 @@ namespace SparkleShare {
{
Process process = new Process ();
process.StartInfo.FileName = "explorer";
process.StartInfo.Arguments = ",/root," +
Path.Combine (SparkleConfig.DefaultConfig.FoldersPath, subfolder);
process.StartInfo.Arguments = Path.Combine (SparkleConfig.DefaultConfig.FoldersPath, subfolder);
process.Start();
}

View file

@ -17,13 +17,16 @@
using System;
using System.ComponentModel;
using System.IO;
using System.Runtime.InteropServices;
using System.Security.Permissions;
using System.Threading;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Windows.Navigation;
using Shapes = System.Windows.Shapes;
namespace SparkleShare {
@ -36,6 +39,7 @@ namespace SparkleShare {
private Label history_label_value;
private ComboBox combo_box;
private WebBrowser web_browser;
private SparkleSpinner spinner;
// Short alias for the translations
@ -44,91 +48,103 @@ namespace SparkleShare {
return Program._(s);
}
public SparkleEventLog ()
{
Title = "Recent Changes";
Height = 640;
Width = 480;
ResizeMode = ResizeMode.NoResize;
Background = new SolidColorBrush (Color.FromRgb (240, 240, 240));
{
Title = "Recent Changes";
Height = 640;
Width = 480;
ResizeMode = ResizeMode.NoResize;
Background = new SolidColorBrush (Color.FromRgb (240, 240, 240));
AllowsTransparency = false;
WindowStartupLocation = WindowStartupLocation.CenterScreen;
Closing += Close;
WriteOutImages ();
Label size_label = new Label () {
Content = "Size:"
Content = "Size:",
FontWeight = FontWeights.Bold
};
this.size_label_value = new Label () {
Content = Controller.Size,
FontWeight = FontWeights.Bold
Content = Controller.Size
};
size_label.Measure (new Size (Double.PositiveInfinity, Double.PositiveInfinity));
Rect size_label_rect = new Rect (size_label.DesiredSize);
Label history_label = new Label () {
Content = "History:"
Content = "History:",
FontWeight = FontWeights.Bold
};
this.history_label_value = new Label () {
Content = Controller.HistorySize,
FontWeight = FontWeights.Bold
};
history_label.Measure (new Size (Double.PositiveInfinity, Double.PositiveInfinity));
Rect history_label_rect = new Rect (history_label.DesiredSize);
Rectangle line = new Rectangle () {
Width = Width,
Shapes.Rectangle line = new Shapes.Rectangle () {
Width = Width,
Height = 1,
Fill = new SolidColorBrush (Color.FromRgb (223, 223, 223))
Fill = new SolidColorBrush (Color.FromRgb (223, 223, 223))
};
Shapes.Rectangle background = new Shapes.Rectangle () {
Width = Width,
Height = Height,
Fill = new SolidColorBrush (Color.FromRgb (250, 250, 250))
};
this.web_browser = new WebBrowser () {
Width = Width - 7,
Height = Height - 36 - 12
};
this.web_browser.Navigating += delegate (object sender, NavigatingCancelEventArgs e) {
string url = e.Uri.ToString ();
Controller.LinkClicked (url);
};
this.web_browser.ObjectForScripting = new SparkleScriptingObject ();;
spinner = new SparkleSpinner (22);
// Disable annoying IE clicking sound
CoInternetSetFeatureEnabled (21, 0x00000002, true);
this.canvas = new Canvas ();
Content = this.canvas;
Content = this.canvas;
this.canvas.Children.Add (size_label);
Canvas.SetLeft (size_label, 12);
Canvas.SetLeft (size_label, 24);
Canvas.SetTop (size_label, 4);
this.canvas.Children.Add (this.size_label_value);
Canvas.SetLeft (this.size_label_value, 12 + size_label_rect.Width);
Canvas.SetLeft (this.size_label_value, 22 + size_label_rect.Width);
Canvas.SetTop (this.size_label_value, 4);
this.canvas.Children.Add (history_label);
Canvas.SetLeft (history_label, 120);
Canvas.SetLeft (history_label, 130);
Canvas.SetTop (history_label, 4);
this.canvas.Children.Add (this.history_label_value);
Canvas.SetLeft (this.history_label_value, 120 + history_label_rect.Width);
Canvas.SetLeft (this.history_label_value, 130 + history_label_rect.Width);
Canvas.SetTop (this.history_label_value, 4);
this.canvas.Children.Add (background);
Canvas.SetLeft (background, 0);
Canvas.SetTop (background, 36);
this.canvas.Children.Add (spinner);
Canvas.SetLeft (spinner, (Width / 2) - 15);
Canvas.SetTop (spinner, (Height / 2) - 22);
this.canvas.Children.Add (line);
Canvas.SetLeft (line, 0);
Canvas.SetTop (line, 35);
Closing += Close;
Controller.ShowWindowEvent += delegate {
Dispatcher.Invoke ((Action) delegate {
Show ();
@ -143,6 +159,9 @@ namespace SparkleShare {
Controller.HideWindowEvent += delegate {
Dispatcher.Invoke ((Action) delegate {
Hide ();
if (this.canvas.Children.Contains (this.web_browser))
this.canvas.Children.Remove (this.web_browser);
});
};
@ -169,10 +188,10 @@ namespace SparkleShare {
};
Controller.ContentLoadingEvent += delegate {
if (this.canvas.Children.Contains (this.web_browser))
this.canvas.Children.Remove (this.web_browser);
// ContentView.AddSubview (this.progress_indicator); //TODO spinner
this.spinner.Start ();
if (this.canvas.Children.Contains (this.web_browser))
this.canvas.Children.Remove (this.web_browser);
};
}
@ -194,15 +213,22 @@ namespace SparkleShare {
};
this.combo_box.Items.Add (item);
this.combo_box.SelectedItem = combo_box.Items [0];
this.combo_box.Items.Add (new Separator ());
this.combo_box.SelectedItem = combo_box.Items [0];
int row = 2;
foreach (string folder in folders) {
this.combo_box.Items.Add (
new ComboBoxItem () { Content = folder }
);
if (folder.Equals (Controller.SelectedFolder))
this.combo_box.SelectedItem = combo_box.Items [row];
row++;
}
this.combo_box.SelectionChanged += delegate {
Dispatcher.Invoke ((Action) delegate {
int index = this.combo_box.SelectedIndex;
@ -216,7 +242,7 @@ namespace SparkleShare {
};
this.canvas.Children.Add (combo_box);
Canvas.SetLeft (this.combo_box, Width - 18 - this.combo_box.Width);
Canvas.SetLeft (this.combo_box, Width - 24 - this.combo_box.Width);
Canvas.SetTop (this.combo_box, 6);
}
@ -226,41 +252,42 @@ namespace SparkleShare {
Thread thread = new Thread (new ThreadStart (delegate {
if (html == null)
html = Controller.HTML;
html = html.Replace ("<!-- $body-font-family -->", "sans-serif");
html = html.Replace ("<!-- $day-entry-header-font-size -->", "13.6px");
html = html.Replace ("<!-- $body-font-size -->", "13.4px");
string pixmaps_path = Path.Combine (
SparkleLib.SparkleConfig.DefaultConfig.TmpPath, "Pixmaps");
pixmaps_path = pixmaps_path.Replace ("\\", "/");
html = html.Replace ("<a href=", "<a class='windows' href=");
html = html.Replace ("<!-- $body-font-family -->", "'Segoe UI', sans-serif");
html = html.Replace ("<!-- $day-entry-header-font-size -->", "13px");
html = html.Replace ("<!-- $body-font-size -->", "12px");
html = html.Replace ("<!-- $secondary-font-color -->", "#bbb");
html = html.Replace ("<!-- $small-color -->", "#ddd");
html = html.Replace ("<!-- $day-entry-header-background-color -->", "#f5f5f5");
html = html.Replace ("<!-- $a-color -->", "#0085cf");
html = html.Replace ("<!-- $a-hover-color -->", "#009ff8");
// html = html.Replace ("<!-- $pixmaps-path -->",
// "file://" + Path.Combine (NSBundle.MainBundle.ResourcePath,
// "Pixmaps"));
// html = html.Replace ("<!-- $document-added-background-image -->",
// "file://" + Path.Combine (NSBundle.MainBundle.ResourcePath,
// "Pixmaps", "document-added-12.png"));
// html = html.Replace ("<!-- $document-deleted-background-image -->",
// "file://" + Path.Combine (NSBundle.MainBundle.ResourcePath,
// "Pixmaps", "document-deleted-12.png"));
//html = html.Replace ("<!-- $document-edited-background-image -->",
// "file://" + Path.Combine (NSBundle.MainBundle.ResourcePath,
//"Pixmaps", "document-edited-12.png"));
//html = html.Replace ("<!-- $document-moved-background-image -->",
// "file://" + Path.Combine (NSBundle.MainBundle.ResourcePath,
//"Pixmaps", "document-moved-12.png"));
html = html.Replace ("<!-- $pixmaps-path -->", pixmaps_path);
html = html.Replace ("<!-- $document-added-background-image -->",
pixmaps_path + "/document-added-12.png");
html = html.Replace ("<!-- $document-edited-background-image -->",
pixmaps_path + "/document-edited-12.png");
html = html.Replace ("<!-- $document-deleted-background-image -->",
pixmaps_path + "/document-deleted-12.png");
html = html.Replace ("<!-- $document-moved-background-image -->",
pixmaps_path + "/document-moved-12.png");
Dispatcher.Invoke ((Action) delegate {
//if (this.progress_indicator.Superview == ContentView) TODO: spinner
// this.progress_indicator.RemoveFromSuperview ();
this.web_browser.NavigateToString (html);
this.spinner.Stop ();
this.web_browser.NavigateToString (html);
if (!this.canvas.Children.Contains (this.web_browser)) {
this.canvas.Children.Add (this.web_browser);
Canvas.SetLeft (this.web_browser, 0);
@ -272,11 +299,71 @@ namespace SparkleShare {
thread.Start ();
}
private void WriteOutImages ()
{
string pixmaps_path = Path.Combine (
SparkleLib.SparkleConfig.DefaultConfig.TmpPath,
"Pixmaps"
);
if (!Directory.Exists (pixmaps_path))
Directory.CreateDirectory (pixmaps_path);
char [] letters = new char [] {'a', 'b', 'c',
'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k'};
foreach (char letter in letters) {
BitmapSource image = SparkleUIHelpers.GetImageSource ("avatar-" + letter);
string file_path = Path.Combine (pixmaps_path, "avatar-" + letter + ".png");
using (FileStream stream = new FileStream (file_path, FileMode.Create))
{
BitmapEncoder encoder = new PngBitmapEncoder ();
encoder.Frames.Add (BitmapFrame.Create (image));
encoder.Save (stream);
}
}
string [] actions = new string [] {"added",
"deleted", "edited", "moved"};
foreach (string action in actions) {
BitmapSource image = SparkleUIHelpers.GetImageSource ("document-" + action + "-12");
string file_path = Path.Combine (pixmaps_path, "document-" + action + "-12.png");
using (FileStream stream = new FileStream (file_path, FileMode.Create))
{
BitmapEncoder encoder = new PngBitmapEncoder ();
encoder.Frames.Add (BitmapFrame.Create (image));
encoder.Save (stream);
}
}
}
private void Close (object sender, CancelEventArgs args)
{
Controller.WindowClosed ();
args.Cancel = true;
}
[DllImport ("urlmon.dll")]
[PreserveSig]
[return:MarshalAs (UnmanagedType.Error)]
static extern int CoInternetSetFeatureEnabled (
int feature, [MarshalAs (UnmanagedType.U4)] int flags, bool enable);
}
[PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
[ComVisible(true)]
public class SparkleScriptingObject {
public void LinkClicked (string url)
{
SparkleUI.EventLog.Controller.LinkClicked (url);
}
}
}

View file

@ -0,0 +1,343 @@
// 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.ComponentModel;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Input;
using System.Windows.Markup;
using Drawing = System.Drawing;
using Forms = System.Windows.Forms;
namespace SparkleShare {
[ContentProperty("Text")]
[DefaultEvent("MouseDoubleClick")]
public class SparkleNotifyIcon : FrameworkElement, IAddChild {
[DllImport("kernel32.dll", CharSet = CharSet.Auto)]
private static extern IntPtr GetModuleHandle(string module_name);
[DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
private static extern int CallNextHookEx (int hook_id, int code, int param, IntPtr data_pointer);
[DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
private static extern int SetWindowsHookEx (int hook_id, HookProc function, IntPtr instance, int thread_id);
[DllImport("user32.dll", EntryPoint = "DestroyIcon")]
static extern bool DestroyIcon (IntPtr hIcon);
[DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall, SetLastError = true)]
private static extern int UnhookWindowsHookEx (int hook_id);
[StructLayout (LayoutKind.Sequential)]
private struct MouseLLHook
{
internal int X;
internal int Y;
internal int MouseData;
internal int Flags;
internal int Time;
internal int Info;
}
public Drawing.Bitmap Icon {
set {
this.notify_icon.Icon = GetIconFromBitmap (value);
}
}
public string HeaderText {
get {
return header_text;
}
set {
header_text = value;
}
}
public string Text {
get {
return (string) GetValue (TextProperty);
}
set {
string text = value;
if (!string.IsNullOrEmpty (header_text))
text = header_text + "\n" + text;
SetValue (TextProperty, text);
}
}
public event MouseButtonEventHandler MouseClick {
add {
AddHandler (MouseClickEvent, value);
}
remove {
RemoveHandler (MouseClickEvent, value);
}
}
public event MouseButtonEventHandler MouseDoubleClick {
add {
AddHandler (MouseDoubleClickEvent, value);
}
remove {
RemoveHandler (MouseDoubleClickEvent, value);
}
}
public readonly RoutedEvent MouseClickEvent = EventManager.RegisterRoutedEvent (
"MouseClick", RoutingStrategy.Bubble, typeof (MouseButtonEventHandler), typeof (SparkleNotifyIcon));
public readonly RoutedEvent MouseDoubleClickEvent = EventManager.RegisterRoutedEvent(
"MouseDoubleClick", RoutingStrategy.Bubble, typeof (MouseButtonEventHandler), typeof (SparkleNotifyIcon));
public readonly DependencyProperty TextProperty = DependencyProperty.Register(
"Text", typeof(string), typeof (SparkleNotifyIcon), new PropertyMetadata (OnTextChanged));
private string header_text;
private Forms.NotifyIcon notify_icon;
private HookProc hook_proc_ref;
private int mouse_hook_handle;
private delegate int HookProc (int code, int param, IntPtr struct_pointer);
public SparkleNotifyIcon ()
{
VisibilityProperty.OverrideMetadata (typeof (SparkleNotifyIcon),
new PropertyMetadata (OnVisibilityChanged));
this.notify_icon = new Forms.NotifyIcon () {
Text = Text,
Visible = true
};
this.notify_icon.MouseDown += OnMouseDown;
this.notify_icon.MouseUp += OnMouseUp;
this.notify_icon.MouseClick += OnMouseClick;
this.notify_icon.MouseDoubleClick += OnMouseDoubleClick;
this.hook_proc_ref = OnMouseEventProc;
}
public void ShowBalloonTip (string title, string subtext, string image_path)
{
// TODO:
// - Use the image pointed to by image_path
// - Find a way to use the prettier (Win7?) balloons
this.notify_icon.ShowBalloonTip (5 * 1000, title, subtext, Forms.ToolTipIcon.Info);
}
public void Dispose()
{
this.notify_icon.Dispose();
}
void IAddChild.AddChild (object value)
{
throw new InvalidOperationException ();
}
void IAddChild.AddText (string text)
{
if (text == null)
throw new ArgumentNullException ();
Text = text;
}
private static MouseButtonEventArgs CreateMouseButtonEventArgs(
RoutedEvent handler, Forms.MouseButtons button)
{
MouseButton mouse_button;
if (button == Forms.MouseButtons.Left) {
mouse_button = MouseButton.Left;
} else if (button == Forms.MouseButtons.Right) {
mouse_button = MouseButton.Right;
} else if (button == Forms.MouseButtons.Middle) {
mouse_button = MouseButton.Middle;
} else if (button == Forms.MouseButtons.XButton1) {
mouse_button = MouseButton.XButton1;
} else if (button == Forms.MouseButtons.XButton2) {
mouse_button = MouseButton.XButton2;
} else {
throw new InvalidOperationException ();
}
return new MouseButtonEventArgs (InputManager.Current.PrimaryMouseDevice, 0, mouse_button) {
RoutedEvent = handler
};
}
private void ShowContextMenu ()
{
if (ContextMenu != null) {
ContextMenu.Opened += OnContextMenuOpened;
ContextMenu.Closed += OnContextMenuClosed;
ContextMenu.Placement = PlacementMode.Mouse;
ContextMenu.IsOpen = true;
}
}
private Rect GetContextMenuRect (ContextMenu menu)
{
Point start_point = menu.PointToScreen (new Point (0, 0));
Point end_point = menu.PointToScreen (new Point (menu.ActualWidth, menu.ActualHeight));
return new Rect (start_point, end_point);
}
private Point GetHitPoint (IntPtr struct_pointer)
{
MouseLLHook mouse_hook = (MouseLLHook) Marshal.PtrToStructure (
struct_pointer, typeof (MouseLLHook));
return new Point (mouse_hook.X, mouse_hook.Y);
}
private int OnMouseEventProc (int code, int button, IntPtr data_pointer)
{
int left_button_down = 0x201;
int right_button_down = 0x204;
if (button == left_button_down || button == right_button_down) {
Rect context_menu_rect = GetContextMenuRect (ContextMenu);
Point hit_point = GetHitPoint (data_pointer);
if (!context_menu_rect.Contains (hit_point))
ContextMenu.IsOpen = false;
}
return CallNextHookEx (this.mouse_hook_handle, code, button, data_pointer);
}
private void OnContextMenuOpened (object sender, RoutedEventArgs args)
{
using (Process process = Process.GetCurrentProcess ())
using (ProcessModule module = process.MainModule)
{
this.mouse_hook_handle = SetWindowsHookEx (14, this.hook_proc_ref,
GetModuleHandle (module.ModuleName), 0);
}
if (this.mouse_hook_handle == 0)
throw new Win32Exception (Marshal.GetLastWin32Error ());
}
private void OnContextMenuClosed (object sender, RoutedEventArgs args)
{
UnhookWindowsHookEx (this.mouse_hook_handle);
ContextMenu.Opened -= OnContextMenuOpened;
ContextMenu.Closed -= OnContextMenuClosed;
}
private void OnVisibilityChanged (DependencyObject target,
DependencyPropertyChangedEventArgs args)
{
SparkleNotifyIcon control = (SparkleNotifyIcon) target;
control.notify_icon.Visible = (control.Visibility == Visibility.Visible);
}
private void OnMouseDown(object sender, Forms.MouseEventArgs args)
{
RaiseEvent (CreateMouseButtonEventArgs (MouseDownEvent, args.Button));
}
private void OnMouseClick (object sender, Forms.MouseEventArgs args)
{
RaiseEvent (CreateMouseButtonEventArgs (MouseClickEvent, args.Button));
}
private void OnMouseDoubleClick (object sender, Forms.MouseEventArgs args)
{
RaiseEvent (CreateMouseButtonEventArgs (MouseDoubleClickEvent, args.Button));
}
private void OnMouseUp (object sender, Forms.MouseEventArgs args)
{
if (args.Button == Forms.MouseButtons.Left ||
args.Button == Forms.MouseButtons.Right) {
ShowContextMenu ();
}
RaiseEvent (CreateMouseButtonEventArgs (MouseUpEvent, args.Button));
}
protected override void OnVisualParentChanged (DependencyObject parent)
{
base.OnVisualParentChanged (parent);
}
private static void OnTextChanged (DependencyObject target,
DependencyPropertyChangedEventArgs args)
{
SparkleNotifyIcon control = (SparkleNotifyIcon) target;
control.notify_icon.Text = control.Text;
}
private Drawing.Icon GetIconFromBitmap (Drawing.Bitmap bitmap)
{
IntPtr unmanaged_icon = bitmap.GetHicon ();
Drawing.Icon icon = (Drawing.Icon) Drawing.Icon.FromHandle (unmanaged_icon).Clone ();
DestroyIcon (unmanaged_icon);
return icon;
}
}
}

View file

@ -1,868 +0,0 @@
namespace SparkleShare {
partial class SparkleSetup {
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing) {
if (disposing && (components != null)) {
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent() {
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SparkleSetup));
this.pictureBox = new System.Windows.Forms.PictureBox();
this.tabControl = new SparkleShare.controls.TablessControl();
this.setupPage = new System.Windows.Forms.TabPage();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.EmailEntry = new System.Windows.Forms.TextBox();
this.buttonNext = new System.Windows.Forms.Button();
this.NameEntry = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label();
this.addPage = new System.Windows.Forms.TabPage();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.label4 = new System.Windows.Forms.Label();
this.panel_server_selection = new System.Windows.Forms.Panel();
this.FolderEntry = new SparkleShare.controls.ExampleTextBox();
this.label14 = new System.Windows.Forms.Label();
this.ServerEntry = new SparkleShare.controls.ExampleTextBox();
this.label5 = new System.Windows.Forms.Label();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.buttonSync = new System.Windows.Forms.Button();
this.buttonCancel = new System.Windows.Forms.Button();
this.syncingPage = new System.Windows.Forms.TabPage();
this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
this.flowLayoutPanel4 = new System.Windows.Forms.FlowLayoutPanel();
this.syncFinishButton = new System.Windows.Forms.Button();
this.syncCancelButton = new System.Windows.Forms.Button();
this.label6 = new System.Windows.Forms.Label();
this.syncingProgressBar = new System.Windows.Forms.ProgressBar();
this.label16 = new System.Windows.Forms.Label();
this.label15 = new System.Windows.Forms.Label();
this.errorPage = new System.Windows.Forms.TabPage();
this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel();
this.buttonTryAgain = new System.Windows.Forms.Button();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.finishedPage = new System.Windows.Forms.TabPage();
this.tableLayoutPanel5 = new System.Windows.Forms.TableLayoutPanel();
this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel();
this.buttonOpenFolder = new System.Windows.Forms.Button();
this.buttonFinished = new System.Windows.Forms.Button();
this.label9 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.invitePage = new System.Windows.Forms.TabPage();
this.tableLayoutPanel6 = new System.Windows.Forms.TableLayoutPanel();
this.flowLayoutPanel3 = new System.Windows.Forms.FlowLayoutPanel();
this.InviteAddButton = new System.Windows.Forms.Button();
this.InviteCancelButton = new System.Windows.Forms.Button();
this.InviteFolderEntry = new System.Windows.Forms.TextBox();
this.InviteAddressEntry = new System.Windows.Forms.TextBox();
this.label19 = new System.Windows.Forms.Label();
this.label18 = new System.Windows.Forms.Label();
this.label17 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit();
this.tabControl.SuspendLayout();
this.setupPage.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
this.addPage.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
this.flowLayoutPanel1.SuspendLayout();
this.syncingPage.SuspendLayout();
this.tableLayoutPanel3.SuspendLayout();
this.flowLayoutPanel4.SuspendLayout();
this.errorPage.SuspendLayout();
this.tableLayoutPanel4.SuspendLayout();
this.finishedPage.SuspendLayout();
this.tableLayoutPanel5.SuspendLayout();
this.flowLayoutPanel2.SuspendLayout();
this.invitePage.SuspendLayout();
this.tableLayoutPanel6.SuspendLayout();
this.flowLayoutPanel3.SuspendLayout();
this.SuspendLayout();
//
// pictureBox
//
this.pictureBox.Dock = System.Windows.Forms.DockStyle.Left;
this.pictureBox.Location = new System.Drawing.Point(0, 0);
this.pictureBox.Name = "pictureBox";
this.pictureBox.Size = new System.Drawing.Size(150, 396);
this.pictureBox.TabIndex = 1;
this.pictureBox.TabStop = false;
//
// tabControl
//
this.tabControl.Controls.Add(this.setupPage);
this.tabControl.Controls.Add(this.addPage);
this.tabControl.Controls.Add(this.syncingPage);
this.tabControl.Controls.Add(this.errorPage);
this.tabControl.Controls.Add(this.finishedPage);
this.tabControl.Controls.Add(this.invitePage);
this.tabControl.Dock = System.Windows.Forms.DockStyle.Right;
this.tabControl.Location = new System.Drawing.Point(150, 0);
this.tabControl.Name = "tabControl";
this.tabControl.SelectedIndex = 0;
this.tabControl.Size = new System.Drawing.Size(514, 396);
this.tabControl.TabIndex = 0;
this.tabControl.TabStop = false;
//
// setupPage
//
this.setupPage.Controls.Add(this.tableLayoutPanel1);
this.setupPage.Location = new System.Drawing.Point(4, 22);
this.setupPage.Name = "setupPage";
this.setupPage.Padding = new System.Windows.Forms.Padding(3);
this.setupPage.Size = new System.Drawing.Size(506, 370);
this.setupPage.TabIndex = 0;
this.setupPage.Text = "Setup";
this.setupPage.UseVisualStyleBackColor = true;
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 2;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Controls.Add(this.EmailEntry, 1, 4);
this.tableLayoutPanel1.Controls.Add(this.buttonNext, 1, 6);
this.tableLayoutPanel1.Controls.Add(this.NameEntry, 1, 3);
this.tableLayoutPanel1.Controls.Add(this.label10, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.label13, 0, 4);
this.tableLayoutPanel1.Controls.Add(this.label11, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.label12, 0, 3);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 3);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.Padding = new System.Windows.Forms.Padding(5);
this.tableLayoutPanel1.RowCount = 7;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 30F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 70F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(500, 364);
this.tableLayoutPanel1.TabIndex = 8;
//
// EmailEntry
//
this.EmailEntry.Dock = System.Windows.Forms.DockStyle.Fill;
this.EmailEntry.Location = new System.Drawing.Point(81, 153);
this.EmailEntry.Name = "EmailEntry";
this.EmailEntry.Size = new System.Drawing.Size(411, 20);
this.EmailEntry.TabIndex = 10;
this.EmailEntry.TextChanged += new System.EventHandler(this.CheckSetupPage);
//
// buttonNext
//
this.buttonNext.Dock = System.Windows.Forms.DockStyle.Right;
this.buttonNext.Enabled = false;
this.buttonNext.Location = new System.Drawing.Point(417, 331);
this.buttonNext.Name = "buttonNext";
this.buttonNext.Size = new System.Drawing.Size(75, 25);
this.buttonNext.TabIndex = 3;
this.buttonNext.Text = "Continue";
this.buttonNext.UseVisualStyleBackColor = true;
this.buttonNext.Click += new System.EventHandler(this.SetupNextClicked);
//
// NameEntry
//
this.NameEntry.Dock = System.Windows.Forms.DockStyle.Fill;
this.NameEntry.Location = new System.Drawing.Point(81, 128);
this.NameEntry.Name = "NameEntry";
this.NameEntry.Size = new System.Drawing.Size(411, 20);
this.NameEntry.TabIndex = 9;
this.NameEntry.TextChanged += new System.EventHandler(this.CheckSetupPage);
//
// label10
//
this.label10.AutoSize = true;
this.tableLayoutPanel1.SetColumnSpan(this.label10, 2);
this.label10.Dock = System.Windows.Forms.DockStyle.Fill;
this.label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label10.Location = new System.Drawing.Point(8, 5);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(484, 25);
this.label10.TabIndex = 1;
this.label10.Text = "Welcome to SparkleShare!";
//
// label13
//
this.label13.AutoSize = true;
this.label13.Dock = System.Windows.Forms.DockStyle.Fill;
this.label13.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label13.Location = new System.Drawing.Point(8, 150);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(67, 25);
this.label13.TabIndex = 8;
this.label13.Text = "Email:";
this.label13.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label11
//
this.tableLayoutPanel1.SetColumnSpan(this.label11, 2);
this.label11.Dock = System.Windows.Forms.DockStyle.Fill;
this.label11.Location = new System.Drawing.Point(8, 30);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(484, 30);
this.label11.TabIndex = 2;
this.label11.Text = "Before we get started, what\'s your name and email?\r\nDon\'t worry, this information" +
" is only visible to your team members.";
//
// label12
//
this.label12.AutoSize = true;
this.label12.Dock = System.Windows.Forms.DockStyle.Fill;
this.label12.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label12.Location = new System.Drawing.Point(8, 125);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(67, 25);
this.label12.TabIndex = 7;
this.label12.Text = "Full Name:";
this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// addPage
//
this.addPage.Controls.Add(this.tableLayoutPanel2);
this.addPage.Location = new System.Drawing.Point(4, 22);
this.addPage.Name = "addPage";
this.addPage.Padding = new System.Windows.Forms.Padding(3);
this.addPage.Size = new System.Drawing.Size(506, 370);
this.addPage.TabIndex = 1;
this.addPage.Text = "Add";
this.addPage.UseVisualStyleBackColor = true;
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.ColumnCount = 2;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.Controls.Add(this.label4, 0, 0);
this.tableLayoutPanel2.Controls.Add(this.panel_server_selection, 0, 2);
this.tableLayoutPanel2.Controls.Add(this.FolderEntry, 1, 5);
this.tableLayoutPanel2.Controls.Add(this.label14, 0, 4);
this.tableLayoutPanel2.Controls.Add(this.ServerEntry, 0, 5);
this.tableLayoutPanel2.Controls.Add(this.label5, 1, 4);
this.tableLayoutPanel2.Controls.Add(this.flowLayoutPanel1, 1, 7);
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 3);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.Padding = new System.Windows.Forms.Padding(10);
this.tableLayoutPanel2.RowCount = 8;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 32F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(500, 364);
this.tableLayoutPanel2.TabIndex = 18;
//
// label4
//
this.label4.AutoSize = true;
this.tableLayoutPanel2.SetColumnSpan(this.label4, 2);
this.label4.Dock = System.Windows.Forms.DockStyle.Fill;
this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label4.Location = new System.Drawing.Point(13, 10);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(474, 30);
this.label4.TabIndex = 0;
this.label4.Text = "Where\'s your project hosted?";
//
// panel_server_selection
//
this.tableLayoutPanel2.SetColumnSpan(this.panel_server_selection, 2);
this.panel_server_selection.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel_server_selection.Location = new System.Drawing.Point(13, 63);
this.panel_server_selection.Name = "panel_server_selection";
this.panel_server_selection.Size = new System.Drawing.Size(474, 171);
this.panel_server_selection.TabIndex = 12;
//
// FolderEntry
//
this.FolderEntry.Dock = System.Windows.Forms.DockStyle.Fill;
this.FolderEntry.ExampleText = "";
this.FolderEntry.ForeColor = System.Drawing.SystemColors.InactiveCaptionText;
this.FolderEntry.Location = new System.Drawing.Point(253, 280);
this.FolderEntry.Name = "FolderEntry";
this.FolderEntry.Size = new System.Drawing.Size(234, 20);
this.FolderEntry.TabIndex = 17;
this.FolderEntry.TextChanged += new System.EventHandler(this.CheckAddPage);
//
// label14
//
this.label14.AutoSize = true;
this.label14.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label14.Location = new System.Drawing.Point(13, 257);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(67, 17);
this.label14.TabIndex = 14;
this.label14.Text = "Address";
//
// ServerEntry
//
this.ServerEntry.Dock = System.Windows.Forms.DockStyle.Fill;
this.ServerEntry.ExampleText = "";
this.ServerEntry.ForeColor = System.Drawing.SystemColors.InactiveCaptionText;
this.ServerEntry.Location = new System.Drawing.Point(13, 280);
this.ServerEntry.Name = "ServerEntry";
this.ServerEntry.Size = new System.Drawing.Size(234, 20);
this.ServerEntry.TabIndex = 16;
this.ServerEntry.TextChanged += new System.EventHandler(this.CheckAddPage);
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label5.Location = new System.Drawing.Point(253, 257);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(101, 17);
this.label5.TabIndex = 15;
this.label5.Text = "Remote Path";
//
// flowLayoutPanel1
//
this.flowLayoutPanel1.Controls.Add(this.buttonSync);
this.flowLayoutPanel1.Controls.Add(this.buttonCancel);
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Right;
this.flowLayoutPanel1.Location = new System.Drawing.Point(328, 322);
this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(0);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(162, 32);
this.flowLayoutPanel1.TabIndex = 18;
//
// buttonSync
//
this.buttonSync.Enabled = false;
this.buttonSync.Location = new System.Drawing.Point(3, 3);
this.buttonSync.Name = "buttonSync";
this.buttonSync.Size = new System.Drawing.Size(75, 25);
this.buttonSync.TabIndex = 9;
this.buttonSync.Text = "Add";
this.buttonSync.UseVisualStyleBackColor = true;
this.buttonSync.Click += new System.EventHandler(this.AddButtonClicked);
//
// buttonCancel
//
this.buttonCancel.Dock = System.Windows.Forms.DockStyle.Right;
this.buttonCancel.Location = new System.Drawing.Point(84, 3);
this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(75, 25);
this.buttonCancel.TabIndex = 8;
this.buttonCancel.Text = "Cancel";
this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.CancelButtonClicked);
//
// syncingPage
//
this.syncingPage.Controls.Add(this.tableLayoutPanel3);
this.syncingPage.Location = new System.Drawing.Point(4, 22);
this.syncingPage.Name = "syncingPage";
this.syncingPage.Size = new System.Drawing.Size(506, 370);
this.syncingPage.TabIndex = 2;
this.syncingPage.Text = "Syncing";
this.syncingPage.UseVisualStyleBackColor = true;
//
// tableLayoutPanel3
//
this.tableLayoutPanel3.ColumnCount = 1;
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel3.Controls.Add(this.flowLayoutPanel4, 0, 6);
this.tableLayoutPanel3.Controls.Add(this.label6, 0, 0);
this.tableLayoutPanel3.Controls.Add(this.syncingProgressBar, 0, 4);
this.tableLayoutPanel3.Controls.Add(this.label16, 0, 2);
this.tableLayoutPanel3.Controls.Add(this.label15, 0, 1);
this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel3.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel3.Name = "tableLayoutPanel3";
this.tableLayoutPanel3.Padding = new System.Windows.Forms.Padding(10);
this.tableLayoutPanel3.RowCount = 7;
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 15F));
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 15F));
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 80F));
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
this.tableLayoutPanel3.Size = new System.Drawing.Size(506, 370);
this.tableLayoutPanel3.TabIndex = 6;
//
// flowLayoutPanel4
//
this.flowLayoutPanel4.Controls.Add(this.syncFinishButton);
this.flowLayoutPanel4.Controls.Add(this.syncCancelButton);
this.flowLayoutPanel4.Dock = System.Windows.Forms.DockStyle.Right;
this.flowLayoutPanel4.Location = new System.Drawing.Point(334, 330);
this.flowLayoutPanel4.Margin = new System.Windows.Forms.Padding(0);
this.flowLayoutPanel4.Name = "flowLayoutPanel4";
this.flowLayoutPanel4.Size = new System.Drawing.Size(162, 30);
this.flowLayoutPanel4.TabIndex = 19;
//
// syncFinishButton
//
this.syncFinishButton.Enabled = false;
this.syncFinishButton.Location = new System.Drawing.Point(3, 3);
this.syncFinishButton.Name = "syncFinishButton";
this.syncFinishButton.Size = new System.Drawing.Size(75, 25);
this.syncFinishButton.TabIndex = 9;
this.syncFinishButton.Text = "Finish";
this.syncFinishButton.UseVisualStyleBackColor = true;
//
// syncCancelButton
//
this.syncCancelButton.Dock = System.Windows.Forms.DockStyle.Right;
this.syncCancelButton.Location = new System.Drawing.Point(84, 3);
this.syncCancelButton.Name = "syncCancelButton";
this.syncCancelButton.Size = new System.Drawing.Size(75, 25);
this.syncCancelButton.TabIndex = 8;
this.syncCancelButton.Text = "Cancel";
this.syncCancelButton.UseVisualStyleBackColor = true;
this.syncCancelButton.Click += new System.EventHandler(this.syncCancelClicked);
//
// label6
//
this.label6.AutoSize = true;
this.label6.Dock = System.Windows.Forms.DockStyle.Fill;
this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold);
this.label6.Location = new System.Drawing.Point(13, 10);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(480, 25);
this.label6.TabIndex = 0;
this.label6.Text = "Syncing…";
//
// syncingProgressBar
//
this.syncingProgressBar.Location = new System.Drawing.Point(13, 115);
this.syncingProgressBar.Name = "syncingProgressBar";
this.syncingProgressBar.Size = new System.Drawing.Size(480, 23);
this.syncingProgressBar.TabIndex = 3;
//
// label16
//
this.label16.AutoSize = true;
this.label16.Dock = System.Windows.Forms.DockStyle.Fill;
this.label16.Location = new System.Drawing.Point(13, 50);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(480, 15);
this.label16.TabIndex = 5;
this.label16.Text = "Are you sure its not coffee o\'clock?";
//
// label15
//
this.label15.AutoSize = true;
this.label15.Dock = System.Windows.Forms.DockStyle.Fill;
this.label15.Location = new System.Drawing.Point(13, 35);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(480, 15);
this.label15.TabIndex = 4;
this.label15.Text = "This may take a while.";
//
// errorPage
//
this.errorPage.Controls.Add(this.tableLayoutPanel4);
this.errorPage.Location = new System.Drawing.Point(4, 22);
this.errorPage.Name = "errorPage";
this.errorPage.Size = new System.Drawing.Size(506, 370);
this.errorPage.TabIndex = 3;
this.errorPage.Text = "Error";
this.errorPage.UseVisualStyleBackColor = true;
//
// tableLayoutPanel4
//
this.tableLayoutPanel4.ColumnCount = 1;
this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel4.Controls.Add(this.buttonTryAgain, 0, 5);
this.tableLayoutPanel4.Controls.Add(this.label2, 0, 1);
this.tableLayoutPanel4.Controls.Add(this.label3, 0, 3);
this.tableLayoutPanel4.Controls.Add(this.label1, 0, 0);
this.tableLayoutPanel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel4.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel4.Name = "tableLayoutPanel4";
this.tableLayoutPanel4.Padding = new System.Windows.Forms.Padding(10);
this.tableLayoutPanel4.RowCount = 6;
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40F));
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 70F));
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 80F));
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
this.tableLayoutPanel4.Size = new System.Drawing.Size(506, 370);
this.tableLayoutPanel4.TabIndex = 4;
//
// buttonTryAgain
//
this.buttonTryAgain.Dock = System.Windows.Forms.DockStyle.Right;
this.buttonTryAgain.Location = new System.Drawing.Point(418, 333);
this.buttonTryAgain.Name = "buttonTryAgain";
this.buttonTryAgain.Size = new System.Drawing.Size(75, 24);
this.buttonTryAgain.TabIndex = 3;
this.buttonTryAgain.Text = "Try Again…";
this.buttonTryAgain.UseVisualStyleBackColor = true;
this.buttonTryAgain.Click += new System.EventHandler(this.buttonTryAgain_Click);
//
// label2
//
this.label2.Dock = System.Windows.Forms.DockStyle.Fill;
this.label2.Location = new System.Drawing.Point(13, 30);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(480, 40);
this.label2.TabIndex = 1;
this.label2.Text = "We don\'t know exactly what the problem is, but we can try to help you pinpoint it" +
".";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label3
//
this.label3.Dock = System.Windows.Forms.DockStyle.Fill;
this.label3.Location = new System.Drawing.Point(13, 108);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(480, 70);
this.label3.TabIndex = 2;
this.label3.Text = resources.GetString("label3.Text");
//
// label1
//
this.label1.AutoSize = true;
this.label1.Dock = System.Windows.Forms.DockStyle.Fill;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold);
this.label1.Location = new System.Drawing.Point(13, 10);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(480, 20);
this.label1.TabIndex = 0;
this.label1.Text = "Something went wrong";
//
// finishedPage
//
this.finishedPage.Controls.Add(this.tableLayoutPanel5);
this.finishedPage.Location = new System.Drawing.Point(4, 22);
this.finishedPage.Name = "finishedPage";
this.finishedPage.Size = new System.Drawing.Size(506, 370);
this.finishedPage.TabIndex = 4;
this.finishedPage.Text = "Finished";
this.finishedPage.UseVisualStyleBackColor = true;
//
// tableLayoutPanel5
//
this.tableLayoutPanel5.ColumnCount = 1;
this.tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel5.Controls.Add(this.flowLayoutPanel2, 0, 3);
this.tableLayoutPanel5.Controls.Add(this.label9, 0, 1);
this.tableLayoutPanel5.Controls.Add(this.label8, 0, 0);
this.tableLayoutPanel5.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel5.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel5.Name = "tableLayoutPanel5";
this.tableLayoutPanel5.Padding = new System.Windows.Forms.Padding(10);
this.tableLayoutPanel5.RowCount = 4;
this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 15F));
this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
this.tableLayoutPanel5.Size = new System.Drawing.Size(506, 370);
this.tableLayoutPanel5.TabIndex = 4;
//
// flowLayoutPanel2
//
this.flowLayoutPanel2.Controls.Add(this.buttonOpenFolder);
this.flowLayoutPanel2.Controls.Add(this.buttonFinished);
this.flowLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Right;
this.flowLayoutPanel2.Location = new System.Drawing.Point(334, 330);
this.flowLayoutPanel2.Margin = new System.Windows.Forms.Padding(0);
this.flowLayoutPanel2.Name = "flowLayoutPanel2";
this.flowLayoutPanel2.Size = new System.Drawing.Size(162, 30);
this.flowLayoutPanel2.TabIndex = 0;
//
// buttonOpenFolder
//
this.buttonOpenFolder.Location = new System.Drawing.Point(3, 3);
this.buttonOpenFolder.Name = "buttonOpenFolder";
this.buttonOpenFolder.Size = new System.Drawing.Size(75, 23);
this.buttonOpenFolder.TabIndex = 0;
this.buttonOpenFolder.Text = "Open Folder";
this.buttonOpenFolder.UseVisualStyleBackColor = true;
this.buttonOpenFolder.Click += new System.EventHandler(this.buttonOpenFolder_Click);
//
// buttonFinished
//
this.buttonFinished.Location = new System.Drawing.Point(84, 3);
this.buttonFinished.Name = "buttonFinished";
this.buttonFinished.Size = new System.Drawing.Size(75, 23);
this.buttonFinished.TabIndex = 1;
this.buttonFinished.Text = "Finish";
this.buttonFinished.UseVisualStyleBackColor = true;
this.buttonFinished.Click += new System.EventHandler(this.buttonFinished_Click);
//
// label9
//
this.label9.Location = new System.Drawing.Point(13, 35);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(307, 15);
this.label9.TabIndex = 3;
this.label9.Text = "Access the files from your SparkleShare folder.";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold);
this.label8.Location = new System.Drawing.Point(13, 10);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(227, 20);
this.label8.TabIndex = 2;
this.label8.Text = "Project successfully added!";
//
// invitePage
//
this.invitePage.Controls.Add(this.tableLayoutPanel6);
this.invitePage.Location = new System.Drawing.Point(4, 22);
this.invitePage.Name = "invitePage";
this.invitePage.Padding = new System.Windows.Forms.Padding(3);
this.invitePage.Size = new System.Drawing.Size(506, 370);
this.invitePage.TabIndex = 5;
this.invitePage.Text = "Invite";
this.invitePage.UseVisualStyleBackColor = true;
//
// tableLayoutPanel6
//
this.tableLayoutPanel6.ColumnCount = 2;
this.tableLayoutPanel6.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel6.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel6.Controls.Add(this.flowLayoutPanel3, 1, 6);
this.tableLayoutPanel6.Controls.Add(this.InviteFolderEntry, 1, 4);
this.tableLayoutPanel6.Controls.Add(this.InviteAddressEntry, 1, 3);
this.tableLayoutPanel6.Controls.Add(this.label19, 0, 4);
this.tableLayoutPanel6.Controls.Add(this.label18, 0, 3);
this.tableLayoutPanel6.Controls.Add(this.label17, 0, 1);
this.tableLayoutPanel6.Controls.Add(this.label7, 0, 0);
this.tableLayoutPanel6.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel6.Location = new System.Drawing.Point(3, 3);
this.tableLayoutPanel6.Name = "tableLayoutPanel6";
this.tableLayoutPanel6.RowCount = 7;
this.tableLayoutPanel6.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
this.tableLayoutPanel6.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel6.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 30F));
this.tableLayoutPanel6.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
this.tableLayoutPanel6.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
this.tableLayoutPanel6.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 70F));
this.tableLayoutPanel6.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 32F));
this.tableLayoutPanel6.Size = new System.Drawing.Size(500, 364);
this.tableLayoutPanel6.TabIndex = 0;
//
// flowLayoutPanel3
//
this.flowLayoutPanel3.Controls.Add(this.InviteAddButton);
this.flowLayoutPanel3.Controls.Add(this.InviteCancelButton);
this.flowLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Right;
this.flowLayoutPanel3.Location = new System.Drawing.Point(338, 331);
this.flowLayoutPanel3.Margin = new System.Windows.Forms.Padding(0);
this.flowLayoutPanel3.Name = "flowLayoutPanel3";
this.flowLayoutPanel3.Size = new System.Drawing.Size(162, 33);
this.flowLayoutPanel3.TabIndex = 19;
//
// InviteAddButton
//
this.InviteAddButton.Enabled = false;
this.InviteAddButton.Location = new System.Drawing.Point(3, 3);
this.InviteAddButton.Name = "InviteAddButton";
this.InviteAddButton.Size = new System.Drawing.Size(75, 25);
this.InviteAddButton.TabIndex = 9;
this.InviteAddButton.Text = "Add";
this.InviteAddButton.UseVisualStyleBackColor = true;
this.InviteAddButton.Click += new System.EventHandler(this.InviteAddButtonClicked);
//
// InviteCancelButton
//
this.InviteCancelButton.Dock = System.Windows.Forms.DockStyle.Right;
this.InviteCancelButton.Location = new System.Drawing.Point(84, 3);
this.InviteCancelButton.Name = "InviteCancelButton";
this.InviteCancelButton.Size = new System.Drawing.Size(75, 25);
this.InviteCancelButton.TabIndex = 8;
this.InviteCancelButton.Text = "Cancel";
this.InviteCancelButton.UseVisualStyleBackColor = true;
this.InviteCancelButton.Click += new System.EventHandler(this.InviteCancelButtonClicked);
//
// InviteFolderEntry
//
this.InviteFolderEntry.Dock = System.Windows.Forms.DockStyle.Fill;
this.InviteFolderEntry.Location = new System.Drawing.Point(93, 144);
this.InviteFolderEntry.Name = "InviteFolderEntry";
this.InviteFolderEntry.ReadOnly = true;
this.InviteFolderEntry.Size = new System.Drawing.Size(404, 20);
this.InviteFolderEntry.TabIndex = 11;
//
// InviteAddressEntry
//
this.InviteAddressEntry.Dock = System.Windows.Forms.DockStyle.Fill;
this.InviteAddressEntry.Location = new System.Drawing.Point(93, 119);
this.InviteAddressEntry.Name = "InviteAddressEntry";
this.InviteAddressEntry.ReadOnly = true;
this.InviteAddressEntry.Size = new System.Drawing.Size(404, 20);
this.InviteAddressEntry.TabIndex = 10;
//
// label19
//
this.label19.AutoSize = true;
this.label19.Dock = System.Windows.Forms.DockStyle.Fill;
this.label19.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label19.Location = new System.Drawing.Point(3, 141);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(84, 25);
this.label19.TabIndex = 9;
this.label19.Text = "Remote Path:";
this.label19.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label18
//
this.label18.AutoSize = true;
this.label18.Dock = System.Windows.Forms.DockStyle.Fill;
this.label18.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label18.Location = new System.Drawing.Point(3, 116);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(84, 25);
this.label18.TabIndex = 8;
this.label18.Text = "Address:";
this.label18.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label17
//
this.tableLayoutPanel6.SetColumnSpan(this.label17, 2);
this.label17.Dock = System.Windows.Forms.DockStyle.Fill;
this.label17.Location = new System.Drawing.Point(3, 25);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(494, 20);
this.label17.TabIndex = 3;
this.label17.Text = "Do you want to add this project to SparkleShare?";
//
// label7
//
this.label7.AutoSize = true;
this.tableLayoutPanel6.SetColumnSpan(this.label7, 2);
this.label7.Dock = System.Windows.Forms.DockStyle.Fill;
this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label7.Location = new System.Drawing.Point(3, 0);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(494, 25);
this.label7.TabIndex = 2;
this.label7.Text = "You\'ve received an invite!";
//
// SparkleSetup
//
this.ClientSize = new System.Drawing.Size(664, 396);
this.Controls.Add(this.tabControl);
this.Controls.Add(this.pictureBox);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.Name = "SparkleSetup";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "SparkleShare Setup";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.SparkleSetup_FormClosing);
((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit();
this.tabControl.ResumeLayout(false);
this.setupPage.ResumeLayout(false);
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.addPage.ResumeLayout(false);
this.tableLayoutPanel2.ResumeLayout(false);
this.tableLayoutPanel2.PerformLayout();
this.flowLayoutPanel1.ResumeLayout(false);
this.syncingPage.ResumeLayout(false);
this.tableLayoutPanel3.ResumeLayout(false);
this.tableLayoutPanel3.PerformLayout();
this.flowLayoutPanel4.ResumeLayout(false);
this.errorPage.ResumeLayout(false);
this.tableLayoutPanel4.ResumeLayout(false);
this.tableLayoutPanel4.PerformLayout();
this.finishedPage.ResumeLayout(false);
this.tableLayoutPanel5.ResumeLayout(false);
this.tableLayoutPanel5.PerformLayout();
this.flowLayoutPanel2.ResumeLayout(false);
this.invitePage.ResumeLayout(false);
this.tableLayoutPanel6.ResumeLayout(false);
this.tableLayoutPanel6.PerformLayout();
this.flowLayoutPanel3.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private SparkleShare.controls.TablessControl tabControl;
private System.Windows.Forms.TabPage setupPage;
private System.Windows.Forms.TabPage addPage;
private System.Windows.Forms.TabPage syncingPage;
private System.Windows.Forms.TabPage errorPage;
private System.Windows.Forms.TabPage finishedPage;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Button buttonSync;
private System.Windows.Forms.Button buttonCancel;
private System.Windows.Forms.PictureBox pictureBox;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.ProgressBar syncingProgressBar;
private System.Windows.Forms.Button buttonTryAgain;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Button buttonFinished;
private System.Windows.Forms.Button buttonOpenFolder;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Panel panel_server_selection;
private System.Windows.Forms.TextBox EmailEntry;
private System.Windows.Forms.TextBox NameEntry;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label14;
private SparkleShare.controls.ExampleTextBox FolderEntry;
private SparkleShare.controls.ExampleTextBox ServerEntry;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Button buttonNext;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel4;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel5;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2;
private System.Windows.Forms.TabPage invitePage;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel6;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label19;
private System.Windows.Forms.Label label18;
private System.Windows.Forms.TextBox InviteFolderEntry;
private System.Windows.Forms.TextBox InviteAddressEntry;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel3;
private System.Windows.Forms.Button InviteAddButton;
private System.Windows.Forms.Button InviteCancelButton;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel4;
private System.Windows.Forms.Button syncFinishButton;
private System.Windows.Forms.Button syncCancelButton;
}
}

View file

@ -16,17 +16,21 @@
using System;
using System.IO;
using System.Collections.Generic;
using System.ComponentModel;
using System.Windows.Forms.Integration;
using System.IO;
using System.Media;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Data;
using System.Media;
using Drawing = System.Drawing;
using Imaging = System.Windows.Interop.Imaging;
using WPF = System.Windows.Controls;
namespace SparkleShare {
@ -119,9 +123,11 @@ namespace SparkleShare {
Buttons.Add (continue_button);
Buttons.Add (cancel_button);
name_box.Focus ();
name_box.Select (name_box.Text.Length, 0);
Controller.UpdateSetupContinueButtonEvent += delegate (bool enabled) {
Dispatcher.Invoke ((Action) delegate {
Dispatcher.Invoke ((Action) delegate {
continue_button.IsEnabled = enabled;
});
};
@ -232,29 +238,52 @@ namespace SparkleShare {
SelectionMode = SelectionMode.Single
};
GridView grid_view = new GridView ();
grid_view.Columns.Add (
new GridViewColumn {
DisplayMemberBinding = new Binding ("Text")
}
);
// TODO:
// - Disable column headers
// - Add plugin images
// - Nicer markup: <b>Name</b>\n<small>Description</small>
GridView grid_view = new GridView () {
AllowsColumnReorder = false
};
grid_view.Columns.Add (new GridViewColumn ());
string xaml =
"<DataTemplate xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"" +
" xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\">" +
" <Grid>" +
" <StackPanel Orientation=\"Horizontal\">" +
" <Image Margin=\"5,0,0,0\" Source=\"{Binding Image}\" Height=\"24\" Width=\"24\"/>" +
" <StackPanel>" +
" <TextBlock Padding=\"10,4,0,0\" FontWeight=\"Bold\" Text=\"{Binding Name}\">" +
" </TextBlock>" +
" <TextBlock Padding=\"10,0,0,4\" Opacity=\"0.5\" Text=\"{Binding Description}\">" +
" </TextBlock>" +
" </StackPanel>" +
" </StackPanel>" +
" </Grid>" +
"</DataTemplate>";
grid_view.Columns [0].CellTemplate = (DataTemplate) XamlReader.Parse (xaml);
Style header_style = new Style(typeof (GridViewColumnHeader));
header_style.Setters.Add (new Setter (GridViewColumnHeader.VisibilityProperty, Visibility.Collapsed));
grid_view.ColumnHeaderContainerStyle = header_style;
foreach (SparklePlugin plugin in Controller.Plugins) {
BitmapFrame image = BitmapFrame.Create (
new Uri (plugin.ImagePath)
);
list_view.Items.Add (
new {
Text = plugin.Name + "\n" + plugin.Description
});
Name = plugin.Name,
Description = plugin.Description,
Image = image
}
);
}
list_view.View = grid_view;
list_view.SelectedIndex = Controller.SelectedPluginIndex;
TextBlock address_label = new TextBlock () {
Text = "Address:",
FontWeight = FontWeights.Bold
@ -288,8 +317,7 @@ namespace SparkleShare {
Width = 200,
Foreground = new SolidColorBrush (Color.FromRgb (128, 128, 128))
};
Button cancel_button = new Button () {
Content = "Cancel"
};
@ -327,12 +355,13 @@ namespace SparkleShare {
Canvas.SetTop (path_help_label, 330);
Canvas.SetRight (path_help_label, 30);
Buttons.Add (add_button);
Buttons.Add (cancel_button);
Controller.ChangeAddressFieldEvent += delegate (string text,
address_box.Focus ();
address_box.Select (address_box.Text.Length, 0);
Controller.ChangeAddressFieldEvent += delegate (string text,
string example_text, FieldState state) {
Dispatcher.Invoke ((Action) delegate {
@ -342,7 +371,6 @@ namespace SparkleShare {
});
};
Controller.ChangePathFieldEvent += delegate (string text,
string example_text, FieldState state) {
@ -353,7 +381,7 @@ namespace SparkleShare {
});
};
Controller.UpdateAddProjectButtonEvent += delegate (bool button_enabled) {
Controller.UpdateAddProjectButtonEvent += delegate (bool button_enabled) {
Dispatcher.Invoke ((Action) delegate {
add_button.IsEnabled = button_enabled;
});
@ -429,7 +457,7 @@ namespace SparkleShare {
Buttons.Add (finish_button);
Buttons.Add (cancel_button);
Controller.UpdateProgressBarEvent += delegate (double percentage) {
Dispatcher.Invoke ((Action) delegate {
@ -449,9 +477,22 @@ namespace SparkleShare {
Header = "Something went wrong…";
Description = "Please check the following:";
// TODO: Bullet points
TextBlock help_block = new TextBlock () {
TextWrapping = TextWrapping.Wrap,
Width = 310
};
help_block.Inlines.Add ("Is the host online?\n\n");
help_block.Inlines.Add (new Bold (new Run (Controller.PreviousUrl)));
help_block.Inlines.Add (" is the address we've compiled. Does this look alright?\n\n");
help_block.Inlines.Add ("The host needs to know who you are. Did you upload the key that's in your SparkleShare folder?");
TextBlock bullets_block = new TextBlock () {
Text = "•\n\n•\n\n\n•"
};
Button cancel_button = new Button () {
Content = "Cancel"
};
@ -461,6 +502,16 @@ namespace SparkleShare {
};
ContentCanvas.Children.Add (bullets_block);
Canvas.SetLeft (bullets_block, 195);
Canvas.SetTop (bullets_block, 100);
ContentCanvas.Children.Add (help_block);
Canvas.SetLeft (help_block, 210);
Canvas.SetTop (help_block, 100);
Buttons.Add (try_again_button);
Buttons.Add (cancel_button);
@ -483,8 +534,6 @@ namespace SparkleShare {
Description = "Access the files from your SparkleShare folder.";
// TODO: warnings
Button finish_button = new Button () {
Content = "Finish"
};
@ -492,8 +541,28 @@ namespace SparkleShare {
Button open_folder_button = new Button () {
Content = "Open folder"
};
if (warnings != null) {
Image warning_image = new Image () {
Source = Imaging.CreateBitmapSourceFromHIcon (Drawing.SystemIcons.Warning.Handle,
Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions ())
};
TextBlock warning_block = new TextBlock () {
Text = warnings [0],
Width = 310,
TextWrapping = TextWrapping.Wrap
};
ContentCanvas.Children.Add (warning_image);
Canvas.SetLeft (warning_image, 193);
Canvas.SetTop (warning_image, 100);
ContentCanvas.Children.Add (warning_block);
Canvas.SetLeft (warning_block, 240);
Canvas.SetTop (warning_block, 100);
}
Buttons.Add (finish_button);
Buttons.Add (open_folder_button);

View file

@ -1,126 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="label3.Text" xml:space="preserve">
<value>First, have you tried turning it off and on again? is the address we've compiled {Controller.SyncingFolder} from the information you entered. Does this look correct?
The host needs to know who you are. Have you uploaded the key that sits in your SparkleShare folder?
</value>
</data>
</root>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -15,7 +15,6 @@
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<IsWebBootstrapper>false</IsWebBootstrapper>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
@ -70,9 +69,7 @@
<HintPath>..\..\bin\Gettext.Cs.dll</HintPath>
</Reference>
<Reference Include="WindowsFormsIntegration" />
<Reference Include="CefSharp">
<HintPath>..\..\bin\CefSharp.dll</HintPath>
</Reference>
<Reference Include="System.Xaml" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\SparkleLib\windows\GlobalAssemblyInfo.cs">
@ -102,19 +99,7 @@
<Compile Include="..\SparkleStatusIconController.cs">
<Link>SparkleStatusIconController.cs</Link>
</Compile>
<Compile Include="ApplicationSchemeHandler.cs" />
<Compile Include="AssemblyInfo.cs" />
<Compile Include="FileSchemeHandler.cs" />
<Compile Include="Icons.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Icons.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="..\SparkleSetupController.cs" />
<Compile Include="SparkleUI.cs" />
<Compile Include="..\SparkleAboutController.cs" />
@ -137,6 +122,8 @@
<Compile Include="..\Program.cs">
<Link>Program.cs</Link>
</Compile>
<Compile Include="SparkleNotifyIcon.cs" />
<Compile Include="SparkleSpinner.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\SparkleLib\windows\SparkleLib.csproj">
@ -192,19 +179,6 @@
<PreBuildEvent>$(ProjectDir)transform_tt.cmd</PreBuildEvent>
</PropertyGroup>
<ItemGroup>
<EmbeddedResource Include="Icons.resx">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Icons.tt</DependentUpon>
<SubType>Designer</SubType>
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Icons.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="..\..\data\about.png">
<Link>Pixmaps\about.png</Link>
</EmbeddedResource>
@ -251,12 +225,66 @@
<EmbeddedResource Include="..\..\data\icons\folder-windows-16.png">
<Link>Pixmaps\folder-windows-16.png</Link>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="Icons.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>Icons.resx</LastGenOutput>
</None>
<EmbeddedResource Include="..\..\data\html\day-entry.html">
<Link>HTML\day-entry.html</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\data\html\event-entry.html">
<Link>HTML\event-entry.html</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\data\html\event-log.html">
<Link>HTML\event-log.html</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\data\html\jquery.js">
<Link>HTML\jquery.js</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\data\avatar-a.png">
<Link>Pixmaps\avatar-a.png</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\data\avatar-b.png">
<Link>Pixmaps\avatar-b.png</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\data\avatar-c.png">
<Link>Pixmaps\avatar-c.png</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\data\avatar-d.png">
<Link>Pixmaps\avatar-d.png</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\data\avatar-e.png">
<Link>Pixmaps\avatar-e.png</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\data\avatar-f.png">
<Link>Pixmaps\avatar-f.png</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\data\avatar-g.png">
<Link>Pixmaps\avatar-g.png</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\data\avatar-h.png">
<Link>Pixmaps\avatar-h.png</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\data\avatar-i.png">
<Link>Pixmaps\avatar-i.png</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\data\avatar-j.png">
<Link>Pixmaps\avatar-j.png</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\data\avatar-k.png">
<Link>Pixmaps\avatar-k.png</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\data\icons\document-added-12.png">
<Link>Pixmaps\document-added-12.png</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\data\icons\document-deleted-12.png">
<Link>Pixmaps\document-deleted-12.png</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\data\icons\document-edited-12.png">
<Link>Pixmaps\document-edited-12.png</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\data\icons\document-moved-12.png">
<Link>Pixmaps\document-moved-12.png</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\data\icons\process-working-22.png">
<Link>Pixmaps\process-working-22.png</Link>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="..\..\data\plugins\github.png">
@ -423,5 +451,6 @@
</ItemGroup>
<ItemGroup>
<Folder Include="Pixmaps\" />
<Folder Include="HTML\" />
</ItemGroup>
</Project>

View file

@ -1,6 +1,6 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SparkleShare", "SparkleShare.csproj", "{728483AA-E34B-4441-BF2C-C8BC2901E4E0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SparkleLib", "..\..\SparkleLib\windows\SparkleLib.csproj", "{2C914413-B31C-4362-93C7-1AE34F09112A}"

View file

@ -2,18 +2,16 @@
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
<Product Name='SparkleShare' Id='184950D5-67F6-4D06-9717-7E2F1607A7B0' UpgradeCode='D3DF1D99-87F5-47A7-A349-863DD6E4B73A'
Language='1033' Codepage='1252' Version='0.8.1' Manufacturer='sparkleshare.org'>
Language='1033' Codepage='1252' Version='0.8.1' Manufacturer='SparkleShare'>
<Package Id='*' Keywords='Installer' Description="SparkleShare Installer"
Comments='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.' Manufacturer='sparkleshare.org'
<Package Id='*' Keywords='Installer' Description="SparkleShare Setup" Manufacturer='SparkleShare'
InstallerVersion='100' Languages='1033' Compressed='yes' SummaryCodepage='1252' />
<Media Id='1' Cabinet='SparkleShare.cab' EmbedCab='yes' DiskPrompt='SparkleShare CAB' />
<Property Id='DiskPrompt' Value="sparkleshare.org Bundle CAB Installation" />
<Property Id='DiskPrompt' Value="SparkleShare Bundle CAB Installation" />
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='ProgramFilesFolder' Name='PFiles'>
<Directory Id='sparkleshareDotOrgDir' Name='sparkleshare.org'>
<Directory Id='INSTALLDIR' Name='SparkleShare'>
<Component Id='SparkleShare.exe' Guid='0DA582D5-4ABE-4251-9F62-E7DEA76F10E1'>
<File Id='SparkleShare.exe' Name='SparkleShare.exe' Source='!(wix.root)\bin\SparkleShare.exe' KeyPath='yes' DiskId='1' />
@ -23,14 +21,8 @@
</Component>
<Component Id='Libraries' Guid='0DA692D5-4DBE-4251-9F62-E7C1A76F10E1'>
<File Id='SparkleLib.Git.dll' Name='SparkleLib.Git.dll' Source='!(wix.root)\bin\SparkleLib.Git.dll' DiskId='1' />
<File Id='CefSharp.dll' Name='CefSharp.dll' Source='!(wix.root)\bin\CefSharp.dll' DiskId='1' />
<File Id='Gettext.Cs.dll' Name='Gettext.Cs.dll' Source='!(wix.root)\bin\Gettext.Cs.dll' DiskId='1' />
<File Id='SparkleLib.dll' Name='SparkleLib.dll' Source='!(wix.root)\bin\SparkleLib.dll' DiskId='1' />
<File Id='avcodec52.dll' Name='avcodec-52.dll' Source='!(wix.root)\bin\avcodec-52.dll' DiskId='1' />
<File Id='avformat52.dll' Name='avformat-52.dll' Source='!(wix.root)\bin\avformat-52.dll' DiskId='1' />
<File Id='avutil50.dll' Name='avutil-50.dll' Source='!(wix.root)\bin\avutil-50.dll' DiskId='1' />
<File Id='icudt42.dll' Name='icudt42.dll' Source='!(wix.root)\bin\icudt42.dll' DiskId='1' />
<File Id='libcef.dll' Name='libcef.dll' Source='!(wix.root)\bin\libcef.dll' DiskId='1' />
<File Id='sparkleshare.ico' Name='sparkleshare.ico' Source='!(wix.root)\data\icons\sparkleshare.ico' DiskId='1' />
</Component>
<Directory Id='MSYSGIT_DIR' Name='msysgit'>
@ -39,62 +31,36 @@
</Directory>
<Directory Id='PLUGINS_DIR' Name='plugins'>
</Directory>
</Directory>
</Directory>
</Directory>
<Directory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="SparkleShare">
<Component Id="ApplicationShortcut" Guid="468550D5-67F6-4D06-97A2-7E2F1607A7B0">
<Shortcut Id="ApplicationStartMenuShortcut"
Name="SparkleShare"
Description="Collaboration and sharing tool that is designed to keep things simple"
Target="[INSTALLDIR]SparkleShare.exe"
WorkingDirectory="INSTALLDIR"/>
<RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/>
<RegistryValue Root="HKCU" Key="Software\Microsoft\SparkleShare" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</Directory>
</Directory>
<Component Id="Autostart" Guid="468321D5-6AB6-248E-97A2-7E2F162447B0">
<RegistryValue Root="HKMU" Key="Software\Microsoft\Windows\CurrentVersion\Run" Name="SparkleShare" Type="string" Value="[INSTALLDIR]SparkleShare.exe" KeyPath="yes" />
</Component>
</Directory>
<Feature Id='SparkleShareFeature' Title='SparkleShare' Description='This is the SparkleShare executables.' Level='1' AllowAdvertise='no'>
<Feature Id='SparkleShareFeature' Title='SparkleShare' Description='SparkleShare' Level='1' AllowAdvertise='no'>
<ComponentRef Id="SparkleShare.exe" />
<ComponentRef Id="SparkleShareInviteOpener.exe" />
<ComponentRef Id="Libraries" />
<ComponentRef Id="ApplicationShortcut" />
<ComponentRef Id="Autostart" />
<ComponentGroupRef Id='msysGitComponentGroup' />
<ComponentGroupRef Id='poComponentGroup' />
<ComponentGroupRef Id='pluginsComponentGroup' />
</Feature>
<WixVariable Id="WixUILicenseRtf" Value="LICENSE.rtf" />
<UI>
<UIRef Id="WixUI_InstallDir" />
<!-- <Publish Dialog="ExitDialog"
Control="Finish"
Event="DoAction"
Value="LaunchApplication">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed</Publish> -->
</UI>
<!-- <Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Launch SparkleShare" /> -->
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
<WixVariable Id="WixUILicenseRtf" Value="..\..\LICENSE" />
<WixVariable Id="WixUIBannerBmp" Value="..\..\data\install\bannrbmp.bmp" />
<WixVariable Id="WixUIDialogBmp" Value="..\..\data\install\dlgbmp.bmp" />
<Property Id="WixShellExecTarget" Value="[#SparkleShare.exe]" />
<CustomAction Id="LaunchApplication" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="yes" />
<InstallExecuteSequence>
<Custom Action="LaunchApplication" After="InstallFinalize">Not Installed</Custom>
</InstallExecuteSequence>
<!-- <CustomAction Id='LaunchProduct' FileKey='ApplicationExe' ExeCommand='' Return="asyncNoWait" /> -->
</Product>
</Wix>
</Wix>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>

View file

@ -0,0 +1,122 @@
// 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.Timers;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media.Imaging;
namespace SparkleShare {
// TODO: cleanup
// This is a close implementation of GtkSpinner
public class SparkleSpinner : Image {
public bool Active;
private Image [] Images;
private Timer Timer;
private int CycleDuration;
private int CurrentStep;
private int NumSteps;
private int Size;
public SparkleSpinner (int size) : base ()
{
Width = size;
Height = size;
Size = size;
CycleDuration = 400;
CurrentStep = 0;
BitmapSource spinner_gallery = SparkleUIHelpers.GetImageSource ("process-working-22");
int frames_in_width = spinner_gallery.PixelWidth / Size;
int frames_in_height = spinner_gallery.PixelHeight / Size;
NumSteps = frames_in_width * frames_in_height;
Images = new Image [NumSteps - 1];
int i = 0;
for (int y = 0; y < frames_in_height; y++) {
for (int x = 0; x < frames_in_width; x++) {
if (!(y == 0 && x == 0)) {
CroppedBitmap crop = new CroppedBitmap (
spinner_gallery,
new Int32Rect (x*Size, y*Size, Size, Size));
Images [i] = new Image ();
Images [i].Source = crop;
i++;
}
}
}
Timer = new Timer () {
Interval = CycleDuration / NumSteps
};
Timer.Elapsed += delegate {
NextImage ();
};
Start ();
}
private void NextImage ()
{
if (CurrentStep < NumSteps - 2)
CurrentStep++;
else
CurrentStep = 0;
Dispatcher.Invoke ((Action)delegate { SetImage (); });
}
private void SetImage ()
{
Source = Images [CurrentStep].Source;
}
public bool IsActive ()
{
return Active;
}
public void Start ()
{
CurrentStep = 0;
Active = true;
Timer.Start ();
}
public void Stop ()
{
Active = false;
Timer.Stop ();
}
}
}

View file

@ -19,8 +19,10 @@ using System;
using System.Drawing;
using System.Runtime.InteropServices;
using System.Windows;
using System.Windows.Media;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using Forms = System.Windows.Forms;
namespace SparkleShare {
@ -30,19 +32,16 @@ namespace SparkleShare {
public SparkleStatusIconController Controller = new SparkleStatusIconController();
private Forms.Timer Animation;
private Icon [] AnimationFrames;
private Icon ErrorIcon;
private Bitmap [] AnimationFrames;
private Bitmap ErrorIcon;
private int FrameNumber;
private string StateText;
private ContextMenu context_menu;
private SparkleMenuItem status_item;
private SparkleMenuItem exit_item;
private Forms.NotifyIcon notify_icon = new Forms.NotifyIcon () {
Text = "SparkleShare",
Visible = true
};
private SparkleNotifyIcon notify_icon = new SparkleNotifyIcon ();
// Short alias for the translations
public static string _ (string s)
@ -52,23 +51,20 @@ namespace SparkleShare {
public SparkleStatusIcon ()
{
{
AnimationFrames = CreateAnimationFrames ();
Animation = CreateAnimation ();
this.notify_icon.Icon = AnimationFrames [0];
ErrorIcon = GetIconFromBitmap (SparkleUIHelpers.GetBitmap ("sparkleshare-syncing-error-windows"));
Animation = CreateAnimation ();
ErrorIcon = SparkleUIHelpers.GetBitmap ("sparkleshare-syncing-error-windows");
this.notify_icon.MouseClick += delegate {
this.context_menu.Placement = PlacementMode.Mouse;
this.context_menu.IsOpen = true;
};
this.notify_icon.Icon = AnimationFrames [0];
this.notify_icon.HeaderText = "SparkleShare";
if (Controller.Folders.Length == 0)
StateText = _("Welcome to SparkleShare!");
else
StateText = _("Files up to date") + Controller.FolderSize;
StateText = _("Welcome to SparkleShare!");
else
this.notify_icon.Text = StateText = _("Files up to date") + Controller.FolderSize;
CreateMenu ();
CreateMenu ();
Controller.UpdateQuitItemEvent += delegate (bool enable) {
@ -77,7 +73,7 @@ namespace SparkleShare {
this.exit_item.UpdateLayout ();
});
};
Controller.UpdateMenuEvent += delegate (IconState state) {
Dispatcher.Invoke ((Action) delegate {
@ -87,9 +83,9 @@ namespace SparkleShare {
Animation.Stop ();
if (Controller.Folders.Length == 0)
StateText = "Welcome to SparkleShare!";
this.notify_icon.Text = StateText = "Welcome to SparkleShare!";
else
StateText = "Files up to date" + Controller.FolderSize;
this.notify_icon.Text = StateText = "Files up to date" + Controller.FolderSize;
this.status_item.Header = StateText;
@ -102,9 +98,9 @@ namespace SparkleShare {
case IconState.Syncing: {
StateText = "Syncing… " +
Controller.ProgressPercentage + "% " +
Controller.ProgressSpeed;
this.notify_icon.Text = StateText = "Syncing… " +
Controller.ProgressPercentage + "% " +
Controller.ProgressSpeed;
this.status_item.Header = StateText;
@ -118,11 +114,11 @@ namespace SparkleShare {
Animation.Stop ();
StateText = _("Not everything is synced");
this.notify_icon.Text = StateText = _("Not everything is synced");
this.status_item.Header = StateText;
CreateMenu ();
this.status_item.Icon = ErrorIcon;
this.notify_icon.Icon = ErrorIcon;
break;
}
@ -134,19 +130,15 @@ namespace SparkleShare {
}
// Slices up the graphic that contains the
// animation frames.
private Icon [] CreateAnimationFrames ()
private Bitmap [] CreateAnimationFrames ()
{
Icon [] animation_frames = new Icon [5];
animation_frames [0] = GetIconFromBitmap (SparkleUIHelpers.GetBitmap ("process-syncing-sparkleshare-windows-i"));
animation_frames [1] = GetIconFromBitmap (SparkleUIHelpers.GetBitmap ("process-syncing-sparkleshare-windows-ii"));
animation_frames [2] = GetIconFromBitmap (SparkleUIHelpers.GetBitmap ("process-syncing-sparkleshare-windows-iii"));
animation_frames [3] = GetIconFromBitmap (SparkleUIHelpers.GetBitmap ("process-syncing-sparkleshare-windows-iiii"));
animation_frames [4] = GetIconFromBitmap (SparkleUIHelpers.GetBitmap ("process-syncing-sparkleshare-windows-iiiii"));
return animation_frames;
return new Bitmap [] {
SparkleUIHelpers.GetBitmap ("process-syncing-sparkleshare-windows-i"),
SparkleUIHelpers.GetBitmap ("process-syncing-sparkleshare-windows-ii"),
SparkleUIHelpers.GetBitmap ("process-syncing-sparkleshare-windows-iii"),
SparkleUIHelpers.GetBitmap ("process-syncing-sparkleshare-windows-iiii"),
SparkleUIHelpers.GetBitmap ("process-syncing-sparkleshare-windows-iiiii")
};
}
@ -261,7 +253,7 @@ namespace SparkleShare {
i2.Width = 16;
i2.Height = 16;
subfolder_item.Icon = i2;
/*
/* TODO
if (Program.Controller.UnsyncedFolders.Contains (folder_name))
subfolder_item.Icon = Icons.dialog_error_16;
else
@ -289,15 +281,14 @@ namespace SparkleShare {
this.context_menu.Items.Add (about_item);
this.context_menu.Items.Add (new Separator ());
this.context_menu.Items.Add (this.exit_item);
this.notify_icon.ContextMenu = this.context_menu;
}
public void ShowBalloon (string title, string subtext, string image_path)
{
// TODO:
// - Use the image pointed to by image_path
// - Find a way to use the prettier (Win7?) balloons
this.notify_icon.ShowBalloonTip (5 * 1000, title, subtext, Forms.ToolTipIcon.Info);
this.notify_icon.ShowBalloonTip (title, subtext, image_path);
}
@ -315,20 +306,6 @@ namespace SparkleShare {
Controller.SubfolderClicked (folder_name);
};
}
private Icon GetIconFromBitmap (Bitmap bitmap)
{
IntPtr unmanaged_icon = bitmap.GetHicon ();
Icon icon = (Icon) Icon.FromHandle (unmanaged_icon).Clone ();
DestroyIcon (unmanaged_icon);
return icon;
}
[DllImport("user32.dll", EntryPoint = "DestroyIcon")]
static extern bool DestroyIcon (IntPtr hIcon);
}

View file

@ -30,7 +30,10 @@ namespace SparkleShare {
public SparkleUI ()
{
{
// FIXME: The second time windows are shown, the windows
// don't have the smooth ease in animation, but appear abruptly.
// The ease out animation always seems to work
Setup = new SparkleSetup ();
EventLog = new SparkleEventLog ();
About = new SparkleAbout ();

View file

@ -37,13 +37,22 @@ namespace SparkleShare {
Stream image_stream = assembly.GetManifestResourceStream ("SparkleShare.Pixmaps." + name + ".png");
return BitmapFrame.Create (image_stream);
}
public static Bitmap GetBitmap (string name)
{
Assembly assembly = Assembly.GetExecutingAssembly ();
Stream image_stream = assembly.GetManifestResourceStream ("SparkleShare.Pixmaps." + name + ".png");
return (Bitmap) Bitmap.FromStream (image_stream);
}
public static string GetHTML (string name)
{
Assembly assembly = Assembly.GetExecutingAssembly ();
StreamReader html_reader = new StreamReader (
assembly.GetManifestResourceStream ("SparkleShare.HTML." + name));
return html_reader.ReadToEnd ();
}
}
}

View file

@ -3,13 +3,10 @@
call %~dp0\..\..\data\plugins\build.cmd
set WinDirNet=%WinDir%\Microsoft.NET\Framework
set msbuild="%WinDirNet%\v3.5\msbuild.exe"
set msbuild="%WinDirNet%\v4.0\msbuild.exe"
if not exist %msbuild% set msbuild="%WinDirNet%\v4.0.30319\msbuild.exe"
set wixBinDir=%WIX%\bin
cd lib
copy * ..\..\..\bin
cd ..
copy ..\..\data\icons\sparkleshare.ico ..\..\bin

Binary file not shown.

Binary file not shown.

View file

@ -6,17 +6,7 @@
<div class="clearer"></div>
<div class="event-timestamp"><!-- $event-time --></div>
<div class="action note">Add note</div>
<div class="action show">Show all</div>
<div class="clearer"></div>
<div class="comments-section">
<!-- $event-comments -->
<textarea class="comment-textarea"></textarea>
<input class="comment-button" type="button" value="Add note"
id="<!-- $event-folder -->~<!-- $event-revision -->">
<div style='clear: both'></div>
</div>
<div class="clearer"></div>
</div>

View file

@ -1,6 +1,7 @@
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>SparkleShare Event Log</title>
<script type="text/javascript">
<!-- $jquery -->
@ -8,6 +9,12 @@
<script type="text/javascript">
$(document).ready(function () {
$('dl dd:nth-child(-n+10)').css('display', 'block');
$('.day-entry-content .event-entry:last-child').css('border', 'none');
$('dd a.windows').click(function () {
window.external.LinkClicked($(this).attr("href"));
});
// Update the Today and Yesterday labels after midnight
var midnight_interval = setInterval (function(){
@ -21,24 +28,12 @@
}
}, 60 * 1000);
$('.comments-section').each (function () {
if ($(this).find ('.comments').children ().size () < 1) {
$(this).hide ();
}
});
$('.buddy-icon').each (function () {
if ($(this).css('backgroundImage').indexOf ('@') != -1) {
$(this).css ('backgroundColor', '#fff');
}
});
// Show the form when 'Add note' is clicked
$('.note').click(function () {
$(this).parent ().find ('.comments-section').show ();
});
// Hide the 'Show all' link when there are less than 10 events
$('.show').each (function () {
var entries = $(this).parent ().find ('dl').children ().length;
@ -56,33 +51,6 @@
$(this).parent ().find ('dl').children ().show ();
$(this).hide ();
});
$("input").click(function () {
textarea = $(this).parent ().find ('textarea');
text = textarea.val ();
if (text == '')
return;
// Clear the textarea
textarea.val ('');
table = $(this).parent ().find (".comments");
comments = table.html ();
// Add the note to the html
comments += '<div class="comment-text">' +
'<p class="comment-author"' +
' style="background-image: url(\'<!-- $user-avatar-url -->\');">' +
'<!-- $username --></p>' +
text +
'</div>';
table.html (comments);
// Feed the note to the backend
location = this.id + '~' + text;
});
});
</script>
@ -111,13 +79,6 @@
color: <!-- $secondary-font-color -->;
}
.comment-text {
font-size: 90%;
padding: 12px;
background-color: #FFF4DB;
margin-bottom: 2px;
}
.day-entry-header {
color: #aaa;
margin-left: auto;
@ -127,14 +88,11 @@
margin-bottom: 36px;
font-weight: bold;
}
.day-entry-content .event-entry:last-child {
border: none;
}
a {
color: <!-- $a-color -->;
text-decoration: none;
outline: 0;
}
a:hover {
@ -176,19 +134,18 @@
border-radius: 5px;
font-family: sans-serif;
font-size: 12px;
float:right;
float: right;
}
.event-entry {
margin-bottom: 24px;
padding-bottom: 24px;
border-bottom: 1px #ddd solid;
width: 99%;
width: 100%;
margin-left: auto;
margin-right: auto;
padding-left: 72px;
padding-right: 12px;
padding-right: 24px;
background-repeat: no-repeat;
background-position: 12px top;
display: block;
@ -228,6 +185,7 @@
margin-bottom: 12px;
padding-top: 6px;
clear: both;
table-layout: fixed;
}
dd {
@ -245,10 +203,6 @@
background-position: center left;
}
dl dd:nth-child(-n+10) {
display: block;
}
.document {
text-overflow: ellipsis;
width: 100%;
@ -287,60 +241,6 @@
width: 48px;
height: 48px;
}
.comments {
width: 100%;
font-size: 90%;
margin-bottom: 9px;
}
.comment-author {
font-size: 90%;
font-weight: bold;
margin: 0;
margin-bottom: 9px;
background-repeat: no-repeat;
background-position: bottom left;
background-size: 24px;
height: 24px;
padding-left: 30px;
line-height: 24px;
}
.comment-timestamp {
color: <!-- $secondary-font-color -->;
text-align: right;
}
.comment-button {
float:right;
margin-top: 6px;
}
.comment-textarea {
box-sizing: border-box;
-webkit-box-sizing: border-box;
width: 100%;
height: 3em;
padding-bottom: 6px;
}
.comments-section {
box-sizing: border-box;
-webkit-box-sizing: border-box;
width: 100%;
}
.comments-wrapper {
box-sizing: border-box;
-webkit-box-sizing: border-box;
width: 100%;
margin-top: 12px;
}
.comment-text {
padding-bottom: 15px;
}
</style>
</head>
<body>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 744 B

After

Width:  |  Height:  |  Size: 741 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 68 KiB

View file

@ -621,8 +621,8 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1"
inkscape:cx="6.5546478"
inkscape:cy="11.465966"
inkscape:cx="16.709944"
inkscape:cy="10.037034"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
@ -637,7 +637,9 @@
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0">
fit-margin-bottom="0"
showguides="true"
inkscape:guide-bbox="true">
<inkscape:grid
type="xygrid"
id="grid2996"
@ -645,6 +647,10 @@
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
<sodipodi:guide
orientation="0,1"
position="-0.97227183,31.377863"
id="guide3920" />
</sodipodi:namedview>
<metadata
id="metadata7">
@ -837,23 +843,23 @@
<path
sodipodi:nodetypes="cccccc"
id="path10372"
d="m 225.02287,711.88807 0.98835,-1.03125 c 1.38713,-10e-6 4.47783,-0.0221 4.47783,-0.0221 0,0 1.06986,-0.10063 1.06133,1.03839 0.95546,-0.002 0.94901,1.04242 0.94901,1.04242 l -0.0442,7.41004"
d="m 225.02287,711.88807 0.98835,-1.03125 c 1.38713,-10e-6 4.47783,-0.0221 4.47783,-0.0221 0,0.83969 1.06133,1.03839 1.06133,1.03839 0.95546,-0.002 0.94901,1.04242 0.94901,1.04242 l -0.0442,7.41004"
style="fill:#fbc264;fill-opacity:1;fill-rule:evenodd;stroke:#ee9845;stroke-width:0.99999964;stroke-miterlimit:4;stroke-opacity:1;display:inline;enable-background:new"
inkscape:connector-curvature="0"
inkscape:export-filename="C:\Users\Hylke\Code\SparkleShare\data\src\rect7965.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
sodipodi:nodetypes="cccccccccscc"
sodipodi:nodetypes="cccccccccsccc"
id="path10374"
d="m 231.5177,720.32557 c -1e-5,0.11468 -0.0728,0.18749 -0.1875,0.1875 l -12.71875,0 c -0.11468,-10e-6 -0.18749,-0.0728 -0.1875,-0.1875 l 0,-6.3125 c 1e-5,-0.11468 0.0728,-0.18749 0.1875,-0.1875 10.97759,2.74489 6.68711,-0.79219 6.68711,-0.79219 0,0 1.06767,-1.15396 1.12857,-1.15436 l 4.11008,-0.0471 c 0,0 -0.41496,0.86719 0.0159,0.90906 l 0.96468,0.0937 c 0,0 0.33967,5.78287 -4e-5,7.49085 z"
style="fill:none;stroke:#fdd999;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;display:inline;enable-background:new;stroke-dasharray:none;stroke-linejoin:round"
d="m 231.5177,720.32557 c -1e-5,0.11468 -0.0728,0.18749 -0.1875,0.1875 l -12.71875,0 c -0.11468,-10e-6 -0.18749,-0.0728 -0.1875,-0.1875 l 0,-6.3125 c 1e-5,-0.11468 0.0728,-0.18749 0.1875,-0.1875 10.97759,2.74489 6.68711,-0.79219 6.68711,-0.79219 0,0 1.06767,-1.15396 1.12857,-1.15436 l 3.37525,-0.0471 c 0,0 0.31987,0.86719 0.75073,0.90906 l 0.96468,0.0937 c 0,0 0.33967,5.78287 -4e-5,7.49085 z"
style="fill:none;stroke:#fdd999;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline;enable-background:new"
inkscape:connector-curvature="0"
inkscape:export-filename="C:\Users\Hylke\Code\SparkleShare\data\src\rect7965.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="fill:url(#linearGradient7924);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient7643);stroke-width:0.99999970000000005;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new"
style="fill:url(#linearGradient7924);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient7643);stroke-width:0.9999997;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new"
d="m 224.2052,711.85682 c 0.2554,0 0.45965,0.13987 0.59375,0.34375 0.43264,0.54853 1.12354,1.65625 1.65625,1.65625 l 4.6875,0 c 0.83807,0 1.34374,0.5428 1.34375,1.46875 l 0,6.53125 0.0312,1 -15.03125,0 0,-0.96875 0,-9.04263 c 0,-0.73174 0.25868,-0.98862 1.04955,-0.98862 z"
id="path10377"
sodipodi:nodetypes="cccccccccccc"
@ -861,24 +867,24 @@
inkscape:export-filename="C:\Users\Hylke\Code\SparkleShare\data\src\rect7965.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="C:\Users\Hylke\Code\SparkleShare\data\src\rect7965.png"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc"
id="path3926"
d="m 224.23645,711.88807 c 0.2554,0 0.4284,0.10862 0.5625,0.3125 0.43264,0.54853 1.12354,1.65625 1.65625,1.65625 l 5.03125,0"
style="fill:none;stroke:#f2b274;stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new" />
<path
style="opacity:0.3;fill:none;stroke:#ffffff;stroke-width:0.9999997;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new"
d="m 224.04895,712.85682 c 0.74659,0.74659 1.60864,2 2.40625,2 l 4.6875,0 c 0.20314,0 0.22418,0.0344 0.25,0.0625 0.0258,0.0281 0.0937,0.12531 0.0937,0.40625 l 0,6.53125 -13,0 0,-9 5.5625,0 z"
d="m 224.04895,712.85682 c 0.83498,1.23273 1.60864,2 2.40625,2 l 4.6875,0 c 0.20314,0 0.22418,0.0344 0.25,0.0625 0.0258,0.0281 0.0937,0.12531 0.0937,0.40625 l 0,6.53125 -13,0 0,-9 5.5625,0 z"
id="path10379"
sodipodi:nodetypes="cccscccccc"
inkscape:connector-curvature="0"
inkscape:export-filename="C:\Users\Hylke\Code\SparkleShare\data\src\rect7965.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc"
id="path7974"
d="m 224.2052,711.85682 c 0.2554,0 0.45965,0.13987 0.59375,0.34375 0.43264,0.54853 1.12354,1.65625 1.65625,1.65625 l 5.84532,0"
style="fill:none;stroke:url(#radialGradient7986);stroke-width:0.9999997;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new"
inkscape:export-filename="C:\Users\Hylke\Code\SparkleShare\data\src\rect7965.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<path
style="fill:none;stroke:#e76600;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new"
d="m 224.96875,713.59375 c -0.0213,0.009 -0.0422,0.0198 -0.0625,0.0312 -0.45072,0.0582 -0.78429,0.36943 -0.90625,0.78125 -0.004,0.0146 -0.0275,0.0165 -0.0312,0.0312 l -0.59375,1.71875 -1.78125,0 c -0.34167,0 -0.64438,0.1751 -0.84375,0.40625 -0.007,0.008 0.007,0.0229 0,0.0312 -0.42168,0.49851 -0.37023,1.22543 0.1875,1.625 l 1.46875,1.0625 -0.87549,1.78125 c -2.3e-4,0.0104 -2.3e-4,0.0208 0,0.0312 -0.14763,0.51709 0.43079,0.96117 0.75049,1.1875 0.3197,0.22633 0.8028,0.34444 1.25,0.0625 0.0107,-0.0101 0.0211,-0.0205 0.0312,-0.0312 l 1.40625,-0.54687 1.5625,0.54687 c 0.0101,0.0107 0.0205,0.0211 0.0312,0.0312 0.44893,0.294 0.94974,0.28658 1.375,-0.0937 0.31891,-0.29486 0.66606,-0.74282 0.53125,-1.1875 l -0.89063,-1.78125 1.46875,-1.0625 c 0.5589,-0.39926 0.60839,-1.12707 0.1875,-1.625 -0.003,-0.004 0.003,-0.0275 0,-0.0312 -0.20581,-0.23869 -0.49986,-0.39614 -0.8125,-0.40625 -0.0104,-2.3e-4 -0.0208,-2.3e-4 -0.0312,0 l -1.70312,0 -0.5625,-1.71875 c -0.003,-0.0106 0.003,-0.0209 0,-0.0312 l -0.0312,0 c -0.0683,-0.21067 -0.18574,-0.37605 -0.28125,-0.46875 -0.009,-0.009 -0.0217,-0.0225 -0.0312,-0.0312 -0.20473,-0.18619 -0.48518,-0.33041 -0.8125,-0.3125 z"

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB