diff --git a/logotype.svg b/logotype.svg
new file mode 100644
index 00000000..03186ad2
--- /dev/null
+++ b/logotype.svg
@@ -0,0 +1,69 @@
+
+
+
+
diff --git a/src/managed/OpenLiveWriter.CoreServices/Exceptions.Designer.cs b/src/managed/OpenLiveWriter.CoreServices/Exceptions.Designer.cs
new file mode 100644
index 00000000..6ae1cf5c
--- /dev/null
+++ b/src/managed/OpenLiveWriter.CoreServices/Exceptions.Designer.cs
@@ -0,0 +1,162 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace OpenLiveWriter.CoreServices {
+ using System;
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // 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", "16.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Exceptions {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Exceptions() {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [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("OpenLiveWriter.CoreServices.Exceptions", typeof(Exceptions).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The specified path ({0}) is invalid.
+ ///
+ internal static string SiteStorageException_InvalidPath {
+ get {
+ return ResourceManager.GetString("SiteStorageException.InvalidPath", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The specified RootFile value ("{0}") is invalid.
+ ///
+ internal static string SiteStorageException_InvalidRootFileName {
+ get {
+ return ResourceManager.GetString("SiteStorageException.InvalidRootFileName", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Error accessing manifest for site at {0}.
+ ///
+ internal static string SiteStorageException_ManifestAccessError {
+ get {
+ return ResourceManager.GetString("SiteStorageException.ManifestAccessError", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to A RootFile was not specified for the site.
+ ///
+ internal static string SiteStorageException_NoRootFileSpecified {
+ get {
+ return ResourceManager.GetString("SiteStorageException.NoRootFileSpecified", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Error accessing path {0}.
+ ///
+ internal static string SiteStorageException_PathAccessError {
+ get {
+ return ResourceManager.GetString("SiteStorageException.PathAccessError", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Could not locate the path {0}.
+ ///
+ internal static string SiteStorageException_PathNotFound {
+ get {
+ return ResourceManager.GetString("SiteStorageException.PathNotFound", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to A Stream that was written to was not closed prior to attempting to read from it (path = {0}).
+ ///
+ internal static string SiteStorageException_StreamNotClosed {
+ get {
+ return ResourceManager.GetString("SiteStorageException.StreamNotClosed", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Error copying site from {0} to {1}.
+ ///
+ internal static string SiteStorageException_UnableToCopySite {
+ get {
+ return ResourceManager.GetString("SiteStorageException.UnableToCopySite", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Unable to create storage at {0}.
+ ///
+ internal static string SiteStorageException_UnableToCreateStorage {
+ get {
+ return ResourceManager.GetString("SiteStorageException.UnableToCreateStorage", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Error deleting site at {0}.
+ ///
+ internal static string SiteStorageException_UnableToDeleteSite {
+ get {
+ return ResourceManager.GetString("SiteStorageException.UnableToDeleteSite", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Error moving site from {0} to {1}.
+ ///
+ internal static string SiteStorageException_UnableToMoveSite {
+ get {
+ return ResourceManager.GetString("SiteStorageException.UnableToMoveSite", resourceCulture);
+ }
+ }
+ }
+}
diff --git a/src/managed/OpenLiveWriter.CoreServices/Images/NetFoundationLogo - Copy.png b/src/managed/OpenLiveWriter.CoreServices/Images/NetFoundationLogo - Copy.png
new file mode 100644
index 00000000..5d2107b6
Binary files /dev/null and b/src/managed/OpenLiveWriter.CoreServices/Images/NetFoundationLogo - Copy.png differ
diff --git a/src/managed/OpenLiveWriter.CoreServices/Images/NetFoundationLogo.png b/src/managed/OpenLiveWriter.CoreServices/Images/NetFoundationLogo.png
new file mode 100644
index 00000000..e4dcb512
Binary files /dev/null and b/src/managed/OpenLiveWriter.CoreServices/Images/NetFoundationLogo.png differ
diff --git a/src/managed/OpenLiveWriter.CoreServices/Images/SplashScreenLogo.png b/src/managed/OpenLiveWriter.CoreServices/Images/SplashScreenLogo.png
new file mode 100644
index 00000000..d560d636
Binary files /dev/null and b/src/managed/OpenLiveWriter.CoreServices/Images/SplashScreenLogo.png differ
diff --git a/src/managed/OpenLiveWriter.CoreServices/OpenLiveWriter.CoreServices.csproj b/src/managed/OpenLiveWriter.CoreServices/OpenLiveWriter.CoreServices.csproj
index 99a5e7b7..47dfc621 100644
--- a/src/managed/OpenLiveWriter.CoreServices/OpenLiveWriter.CoreServices.csproj
+++ b/src/managed/OpenLiveWriter.CoreServices/OpenLiveWriter.CoreServices.csproj
@@ -134,6 +134,11 @@
+
+ True
+ True
+ Exceptions.resx
+
@@ -325,6 +330,8 @@
Designer
+ ResXFileCodeGenerator
+ Exceptions.Designer.cs
@@ -343,6 +350,10 @@
+
+
+
+
@@ -356,19 +367,14 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/src/managed/OpenLiveWriter.CoreServices/SplashScreen.cs b/src/managed/OpenLiveWriter.CoreServices/SplashScreen.cs
index a84ced80..b6f95b5b 100644
--- a/src/managed/OpenLiveWriter.CoreServices/SplashScreen.cs
+++ b/src/managed/OpenLiveWriter.CoreServices/SplashScreen.cs
@@ -10,6 +10,7 @@ using System.Windows.Forms;
using OpenLiveWriter.Interop.Windows;
using OpenLiveWriter.Localization;
using OpenLiveWriter.Localization.Bidi;
+using System.Diagnostics;
namespace OpenLiveWriter.CoreServices
{
@@ -22,12 +23,14 @@ namespace OpenLiveWriter.CoreServices
/// Required designer variable.
///
private System.ComponentModel.Container components = null;
+ private Label labelStatus;
+ private Bitmap _logoBitmap;
+ private PictureBox pictureBoxLogo;
+ private Bitmap _fdnLogoBitmap;
+ private PictureBox pictureBoxFdnLogo;
+ private System.Windows.Forms.Timer timerAnimation;
- ///
- /// Background image
- ///
- private Bitmap _backgroundImage;
- private Bitmap _logoImage;
+ private int _ticks = 0;
public SplashScreen()
{
@@ -37,168 +40,63 @@ namespace OpenLiveWriter.CoreServices
InitializeComponent();
DisplayHelper.Scale(this);
- // Turn off CS_CLIPCHILDREN.
- User32.SetWindowLong(Handle, GWL.STYLE, User32.GetWindowLong(Handle, GWL.STYLE) & ~WS.CLIPCHILDREN);
-
// Turn on double buffered painting.
- SetStyle(ControlStyles.UserPaint, true);
- SetStyle(ControlStyles.DoubleBuffer, true);
- if (!BidiHelper.IsRightToLeft)
- SetStyle(ControlStyles.AllPaintingInWmPaint, true);
+ //SetStyle(ControlStyles.UserPaint, true);
+ //SetStyle(ControlStyles.DoubleBuffer, true);
+ //if (!BidiHelper.IsRightToLeft)
+ // SetStyle(ControlStyles.AllPaintingInWmPaint, true);
- _backgroundImage = DisplayHelper.ScaleBitmap(new Bitmap(this.GetType(), "Images.SplashScreen.png"));
- _logoImage = DisplayHelper.ScaleBitmap(new Bitmap(this.GetType(), "Images.SplashScreenLogo.jpg"));
-
- if (SystemInformation.HighContrast)
- {
- ImageHelper.ConvertToHighContrast(_backgroundImage);
- ImageHelper.ConvertToHighContrast(_logoImage);
- }
- }
-
- private const int WS_EX_TOOLWINDOW = 0x00000080;
- private const int WS_EX_APPWINDOW = 0x00040000;
- private const int WS_EX_LAYERED = 0x00080000;
- protected override CreateParams CreateParams
- {
- get
- {
- CreateParams cp = base.CreateParams;
- cp.ExStyle &= ~WS_EX_APPWINDOW;
- cp.ExStyle |= WS_EX_TOOLWINDOW;
- cp.ExStyle |= WS_EX_LAYERED;
- return cp;
- }
+ //if (SystemInformation.HighContrast)
+ //{
+ // ImageHelper.ConvertToHighContrast(_backgroundImage);
+ // ImageHelper.ConvertToHighContrast(_logoImage);
+ //}
}
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
- UpdateBitmap();
+ LoadScaledImages();
+
+ // Create the timer
+ timerAnimation = new System.Windows.Forms.Timer();
+ timerAnimation.Interval = 17; // 60 FPS rounded up
+ timerAnimation.Tick += new EventHandler(AnimationTick);
+ timerAnimation.Enabled = true;
+ timerAnimation.Start();
}
- private void UpdateBitmap()
+ private void LoadScaledImages()
{
- using (Bitmap bitmap = CreateBitmap())
- {
- IntPtr screenDC = User32.GetDC(IntPtr.Zero);
- try
- {
- IntPtr memDC = Gdi32.CreateCompatibleDC(screenDC);
- try
- {
- IntPtr hBitmap = bitmap.GetHbitmap(Color.FromArgb(0));
- try
- {
- IntPtr hOrigBitmap = Gdi32.SelectObject(memDC, hBitmap);
- try
- {
- POINT dst = new POINT();
- dst.x = Left;
- dst.y = Top;
+ const float scaleFactor = 2f; // Assume logos are already at 2x scaling
+ var fdnLogoBmp = new Bitmap(this.GetType(), "Images.NetFoundationLogo.png");
+ var logoBmp = new Bitmap(this.GetType(), "Images.SplashScreenLogo.png");
- SIZE size = new SIZE();
- size.cx = bitmap.Width;
- size.cy = bitmap.Height;
+ var fdnLogoSize = new Size(
+ (int)Math.Ceiling(fdnLogoBmp.Width * (DisplayHelper.ScalingFactorX / scaleFactor)),
+ (int)Math.Ceiling(fdnLogoBmp.Height * (DisplayHelper.ScalingFactorY / scaleFactor)));
+ _fdnLogoBitmap = new Bitmap(fdnLogoBmp, fdnLogoSize);
+ pictureBoxFdnLogo.Image = _fdnLogoBitmap;
+ pictureBoxFdnLogo.Size = _fdnLogoBitmap.Size;
- POINT src = new POINT();
- src.x = 0;
- src.y = 0;
-
- User32.BLENDFUNCTION blendFunction = new User32.BLENDFUNCTION();
- blendFunction.BlendOp = 0; // AC_SRC_OVER
- blendFunction.BlendFlags = 0;
- blendFunction.SourceConstantAlpha = 255;
- blendFunction.AlphaFormat = 1; // AC_SRC_ALPHA
-
- User32.UpdateLayeredWindow(Handle, screenDC, ref dst, ref size, memDC, ref src, 0, ref blendFunction, 2);
- }
- finally
- {
- Gdi32.SelectObject(memDC, hOrigBitmap);
- }
- }
- finally
- {
- Gdi32.DeleteObject(hBitmap);
- }
- }
- finally
- {
- Gdi32.DeleteDC(memDC);
- }
- }
- finally
- {
- User32.ReleaseDC(IntPtr.Zero, screenDC);
- }
- }
+ var logoBmpSize = new Size(
+ (int)Math.Ceiling(logoBmp.Width * (DisplayHelper.ScalingFactorX / scaleFactor)),
+ (int)Math.Ceiling(logoBmp.Height * (DisplayHelper.ScalingFactorY / scaleFactor)));
+ _logoBitmap = new Bitmap(logoBmp, logoBmpSize);
+ pictureBoxLogo.Image = _logoBitmap;
+ pictureBoxLogo.Size = _logoBitmap.Size;
}
- private Bitmap CreateBitmap()
+ public void ShowSplashScreen()
{
- Bitmap bitmap = new Bitmap(_backgroundImage.Width, _backgroundImage.Height, PixelFormat.Format32bppArgb);
- using (Graphics graphics = Graphics.FromImage(bitmap))
+ Thread thread = new Thread(() =>
{
- BidiGraphics g = new BidiGraphics(graphics, bitmap.Size);
-
- // draw transparent background image
- g.DrawImage(false, _backgroundImage,
- new Rectangle(0, 0, _backgroundImage.Width, _backgroundImage.Height));
-
- // draw logo image
- g.DrawImage(false, _logoImage, new Rectangle(
- (ClientSize.Width - _logoImage.Width) / 2,
- (int)Math.Ceiling(DisplayHelper.ScaleY(120)) - _logoImage.Height,
- _logoImage.Width,
- _logoImage.Height));
-
- // draw copyright notice
- string splashText = Res.Get(StringId.SplashScreenCopyrightNotice);
- using (Font font = new Font(Font.FontFamily, 7.5f))
- {
- const int TEXT_PADDING_H = 36;
- const int TEXT_PADDING_V = 26;
- int textWidth = Size.Width - 2 * (int)Math.Ceiling(DisplayHelper.ScaleX(TEXT_PADDING_H));
- int textHeight =
- Convert.ToInt32(
- (int)Math.Ceiling(DisplayHelper.ScaleY(
- g.MeasureText(splashText, font, new Size(textWidth, 0), TextFormatFlags.WordBreak).Height
- )),
- CultureInfo.InvariantCulture);
-
- // GDI text can't be drawn on an alpha-blended surface. So we render a black-on-white
- // bitmap, then use a ColorMatrix to effectively turn it into an alpha mask.
-
- using (Bitmap textBitmap = new Bitmap(textWidth, textHeight, PixelFormat.Format32bppRgb))
- {
- using (Graphics tbG = Graphics.FromImage(textBitmap))
- {
- tbG.FillRectangle(Brushes.Black, 0, 0, textWidth, textHeight);
- new BidiGraphics(tbG, textBitmap.Size).
- DrawText(splashText, font, new Rectangle(0, 0, textWidth, textHeight), Color.White, Color.Black, TextFormatFlags.WordBreak);
- }
-
- Rectangle textRect = new Rectangle(
- (int)Math.Ceiling(DisplayHelper.ScaleX(TEXT_PADDING_H)),
- ClientSize.Height - (int)Math.Ceiling(DisplayHelper.ScaleY(TEXT_PADDING_V)) - textHeight, textWidth, textHeight);
- using (ImageAttributes ia = new ImageAttributes())
- {
- ColorMatrix cm = new ColorMatrix(new float[][]
- {
- new float[] {0, 0, 0, 1f/3f, 0},
- new float[] {0, 0, 0, 1f/3f, 0},
- new float[] {0, 0, 0, 1f/3f, 0},
- new float[] {0, 0, 0, 0, 0},
- new float[] {0.9372f, 0.9372f, 0.9372f, 0, 0},
- });
- ia.SetColorMatrix(cm);
- g.DrawImage(false, textBitmap, textRect, 0, 0, textWidth, textHeight, GraphicsUnit.Pixel, ia);
- }
- }
- }
- }
- return bitmap;
+ ShowDialog();
+ });
+ thread.Name = "Splash Screen Animation Thread";
+ thread.IsBackground = true;
+ thread.SetApartmentState(ApartmentState.STA);
+ thread.Start();
}
///
@@ -223,21 +121,116 @@ namespace OpenLiveWriter.CoreServices
///
private void InitializeComponent()
{
- //
+ this.labelStatus = new System.Windows.Forms.Label();
+ this.pictureBoxFdnLogo = new System.Windows.Forms.PictureBox();
+ this.pictureBoxLogo = new System.Windows.Forms.PictureBox();
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBoxFdnLogo)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBoxLogo)).BeginInit();
+ this.SuspendLayout();
+ //
+ // labelStatus
+ //
+ this.labelStatus.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+ this.labelStatus.AutoSize = true;
+ this.labelStatus.ForeColor = System.Drawing.Color.White;
+ this.labelStatus.Location = new System.Drawing.Point(19, 214);
+ this.labelStatus.Margin = new System.Windows.Forms.Padding(10, 0, 0, 10);
+ this.labelStatus.Name = "labelStatus";
+ this.labelStatus.Size = new System.Drawing.Size(57, 15);
+ this.labelStatus.TabIndex = 1;
+ this.labelStatus.Text = "Starting...";
+ //
+ // pictureBoxFdnLogo
+ //
+ this.pictureBoxFdnLogo.ErrorImage = null;
+ this.pictureBoxFdnLogo.InitialImage = null;
+ this.pictureBoxFdnLogo.Location = new System.Drawing.Point(20, 20);
+ this.pictureBoxFdnLogo.Name = "pictureBoxFdnLogo";
+ this.pictureBoxFdnLogo.Size = new System.Drawing.Size(20, 20);
+ this.pictureBoxFdnLogo.TabIndex = 2;
+ this.pictureBoxFdnLogo.TabStop = false;
+ //
+ // pictureBoxLogo
+ //
+ this.pictureBoxLogo.ErrorImage = null;
+ this.pictureBoxLogo.InitialImage = null;
+ this.pictureBoxLogo.Location = new System.Drawing.Point(20, 92);
+ this.pictureBoxLogo.Name = "pictureBoxLogo";
+ this.pictureBoxLogo.Size = new System.Drawing.Size(20, 20);
+ this.pictureBoxLogo.TabIndex = 3;
+ this.pictureBoxLogo.TabStop = false;
+ this.pictureBoxLogo.Visible = false;
+ //
// SplashScreen
- //
- this.AutoScaleMode = AutoScaleMode.None;
- this.AutoScaleBaseSize = new System.Drawing.Size(5, 14);
- this.ClientSize = new System.Drawing.Size(380, 235);
- this.Cursor = Cursors.AppStarting;
+ //
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
+ this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(162)))), ((int)(((byte)(93)))), ((int)(((byte)(162)))));
+ this.ClientSize = new System.Drawing.Size(439, 248);
+ this.Controls.Add(this.pictureBoxLogo);
+ this.Controls.Add(this.pictureBoxFdnLogo);
+ this.Controls.Add(this.labelStatus);
+ this.Cursor = System.Windows.Forms.Cursors.AppStarting;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "SplashScreen";
- //if this inherits Yes from the parent the screenshot of the background is reversed
- this.RightToLeftLayout = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBoxFdnLogo)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBoxLogo)).EndInit();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
}
#endregion
+
+ private void Label1_Click(object sender, EventArgs e)
+ {
+
+ }
+
+ private void AnimationTick(object sender, EventArgs e)
+ {
+ // .NET Foundation Logo linear slide animation
+ const int fdnLogoAnimTicks = 10;
+ const int fdnLogoAnimTarget = 20;
+ pictureBoxFdnLogo.Left = (int)Math.Min(DisplayHelper.ScalingFactorX * _ticks * ((float)fdnLogoAnimTarget / fdnLogoAnimTicks), DisplayHelper.ScalingFactorX * fdnLogoAnimTarget);
+ pictureBoxFdnLogo.Image = ChangeOpacity(_fdnLogoBitmap, (float)Math.Min((float)_ticks / fdnLogoAnimTicks, 1.0));
+
+ const int logoAnimStart = 10;
+ const int logoAnimEnd = logoAnimStart + 20;
+
+ int logoAnimBegin = (Width / 2) - (pictureBoxLogo.Width / 2) - (int)(40 * DisplayHelper.ScalingFactorX);
+ int logoAnimTarget = (Width / 2) - (pictureBoxLogo.Width / 2);
+ if(_ticks > logoAnimStart)
+ {
+ pictureBoxLogo.Visible = true;
+ double x = Math.Min((float)(_ticks - logoAnimStart) / (logoAnimEnd - logoAnimStart) +.1, 1.0);
+ pictureBoxLogo.Left = (int)Math.Min(logoAnimBegin + (Math.Pow(Math.Log10(x), 10) * (logoAnimTarget - logoAnimBegin) * DisplayHelper.ScalingFactorX), logoAnimTarget);
+ // Set logo transparency (float)Math.Min((float)(_ticks - logoAnimStart) / (logoAnimEnd - logoAnimStart), 1.0)
+ pictureBoxLogo.Image = ChangeOpacity(_logoBitmap, (float)x);
+
+ } else
+ {
+ pictureBoxLogo.Visible = false;
+ }
+
+ Update();
+ _ticks++;
+ }
+
+ private static Bitmap ChangeOpacity(Image img, float opacityvalue)
+ {
+ // Example from https://www.codeproject.com/Tips/201129/Change-Opacity-of-Image-in-C
+
+ Bitmap bmp = new Bitmap(img.Width, img.Height); // Determining Width and Height of Source Image
+ Graphics graphics = Graphics.FromImage(bmp);
+ ColorMatrix colormatrix = new ColorMatrix();
+ colormatrix.Matrix33 = opacityvalue;
+ ImageAttributes imgAttribute = new ImageAttributes();
+ imgAttribute.SetColorMatrix(colormatrix, ColorMatrixFlag.Default, ColorAdjustType.Bitmap);
+ graphics.DrawImage(img, new Rectangle(0, 0, bmp.Width, bmp.Height), 0, 0, img.Width, img.Height, GraphicsUnit.Pixel, imgAttribute);
+ graphics.Dispose(); // Releasing all resource used by graphics
+ return bmp;
+ }
}
///
diff --git a/src/managed/OpenLiveWriter.CoreServices/SplashScreen.resx b/src/managed/OpenLiveWriter.CoreServices/SplashScreen.resx
index f7b67c54..d58980a3 100644
--- a/src/managed/OpenLiveWriter.CoreServices/SplashScreen.resx
+++ b/src/managed/OpenLiveWriter.CoreServices/SplashScreen.resx
@@ -3,7 +3,7 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
@@ -89,42 +109,12 @@
text/microsoft-resx
- 1.3
+ 2.0
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
- False
-
-
- (Default)
-
-
- False
-
-
- False
-
-
- 8, 8
-
-
- True
-
-
- 80
-
-
- False
-
-
- Private
-
-
- SplashScreen
-
\ No newline at end of file
diff --git a/src/managed/OpenLiveWriter/ApplicationMain.cs b/src/managed/OpenLiveWriter/ApplicationMain.cs
index bea585f6..1274996e 100644
--- a/src/managed/OpenLiveWriter/ApplicationMain.cs
+++ b/src/managed/OpenLiveWriter/ApplicationMain.cs
@@ -168,8 +168,7 @@ namespace OpenLiveWriter
IDisposable splashScreen = null;
// Show the splash screen.
SplashScreen splashScreenForm = new SplashScreen();
- splashScreenForm.Show();
- splashScreenForm.Update();
+ splashScreenForm.ShowSplashScreen();
splashScreen = new FormSplashScreen(splashScreenForm);
LaunchFirstInstance(splashScreen, args);
@@ -324,23 +323,23 @@ namespace OpenLiveWriter
ApplicationLauncher.LaunchBloggingForm(args, splashScreen, true);
}
- if (splashScreen != null)
- {
- try
- {
- using (Form splashScreenForm = ((FormSplashScreen)splashScreen).Form)
- {
- if (splashScreenForm != null && !splashScreenForm.IsDisposed)
- {
- Application.Run(splashScreenForm);
- }
- }
- }
- catch (Exception e)
- {
- Debug.Fail("Failed to show splash screen: " + e);
- }
- }
+ //if (splashScreen != null)
+ //{
+ // try
+ // {
+ // using (Form splashScreenForm = ((FormSplashScreen)splashScreen).Form)
+ // {
+ // if (splashScreenForm != null && !splashScreenForm.IsDisposed)
+ // {
+ // Application.Run(splashScreenForm);
+ // }
+ // }
+ // }
+ // catch (Exception e)
+ // {
+ // Debug.Fail("Failed to show splash screen: " + e);
+ // }
+ //}
ManualKeepalive.Wait(true);
}
catch (DirectoryException ex)
diff --git a/src/unmanaged/OpenLiveWriter.Ribbon/OpenLiveWriter.Ribbon.vcxproj b/src/unmanaged/OpenLiveWriter.Ribbon/OpenLiveWriter.Ribbon.vcxproj
index 3b0884c0..f4c712a8 100644
--- a/src/unmanaged/OpenLiveWriter.Ribbon/OpenLiveWriter.Ribbon.vcxproj
+++ b/src/unmanaged/OpenLiveWriter.Ribbon/OpenLiveWriter.Ribbon.vcxproj
@@ -15,19 +15,19 @@
{195A60BF-7A4D-42E6-B5F4-FEBC679E19F0}
Win32Proj
OpenLiveWriter.Ribbon
- 10.0.17763.0
+ 10.0
DynamicLibrary
true
- v141
+ v142
Unicode
DynamicLibrary
false
- v141
+ v142
true
Unicode