windows eventlog: position on right side of screen

This commit is contained in:
Hylke Bons 2012-06-24 23:31:06 +01:00
parent 330e80c22b
commit 49fb72ec71
2 changed files with 25 additions and 14 deletions

View file

@ -54,12 +54,17 @@ namespace SparkleShare {
Title = "Recent Changes";
Height = 640;
Width = 480;
ResizeMode = ResizeMode.NoResize;
ResizeMode = ResizeMode.NoResize; // TODO
Background = new SolidColorBrush (Color.FromRgb (240, 240, 240));
AllowsTransparency = false;
Icon = SparkleUIHelpers.GetImageSource("sparkleshare-app", "ico");
// TODO: right side of screen and 90% of height like on Mac
WindowStartupLocation = WindowStartupLocation.CenterScreen;
int x = (int) (SystemParameters.PrimaryScreenWidth * 0.61);
int y = (int) (SystemParameters.PrimaryScreenHeight * 0.5 - (Height * 0.5));
WindowStartupLocation = WindowStartupLocation.Manual;
Left = x;
Top = y;
WriteOutImages ();

View file

@ -37,9 +37,15 @@ namespace SparkleShare {
public static BitmapFrame GetImageSource (string name)
{
Assembly assembly = Assembly.GetExecutingAssembly ();
Stream image_stream = assembly.GetManifestResourceStream ("SparkleShare.Pixmaps." + name + ".png");
return BitmapFrame.Create (image_stream);
return GetImageSource (name, "png");
}
public static BitmapFrame GetImageSource (string name, string type)
{
Assembly assembly = Assembly.GetExecutingAssembly();
Stream image_stream = assembly.GetManifestResourceStream("SparkleShare.Pixmaps." + name + "." + type);
return BitmapFrame.Create(image_stream);
}