diff --git a/GitExtensions/Program.cs b/GitExtensions/Program.cs
index 19c5aee4c50..e6a88137121 100644
--- a/GitExtensions/Program.cs
+++ b/GitExtensions/Program.cs
@@ -54,27 +54,22 @@ private static void Main()
}
string[] args = Environment.GetCommandLineArgs();
- FormSplash.ShowSplash();
- //Store here SynchronizationContext.Current, because later sometimes it can be null
- //see http://stackoverflow.com/questions/11621372/synchronizationcontext-current-is-null-in-continuation-on-the-main-ui-thread
- GitUIExtensions.UISynchronizationContext = SynchronizationContext.Current;
- AsyncLoader.DefaultContinuationTaskScheduler = TaskScheduler.FromCurrentSynchronizationContext();
- Application.DoEvents();
+
+ //This form created for obtain UI synchronization context only
+ using (var empFormForSyncContext = new Form())
+ {
+ //Store here SynchronizationContext.Current, because later sometimes it can be null
+ //see http://stackoverflow.com/questions/11621372/synchronizationcontext-current-is-null-in-continuation-on-the-main-ui-thread
+ GitUIExtensions.UISynchronizationContext = SynchronizationContext.Current;
+ AsyncLoader.DefaultContinuationTaskScheduler = TaskScheduler.FromCurrentSynchronizationContext();
+ }
AppSettings.LoadSettings();
if (EnvUtils.RunningOnWindows())
{
- WebBrowserEmulationMode.SetBrowserFeatureControl();
-
- //Quick HOME check:
- FormSplash.SetAction("Checking home path...");
- Application.DoEvents();
-
+ WebBrowserEmulationMode.SetBrowserFeatureControl();
FormFixHome.CheckHomePath();
}
- //Register plugins
- FormSplash.SetAction("Loading plugins...");
- Application.DoEvents();
if (string.IsNullOrEmpty(AppSettings.Translation))
{
@@ -91,9 +86,6 @@ private static void Main()
|| string.IsNullOrEmpty(AppSettings.GitCommandValue)
|| !File.Exists(AppSettings.GitCommandValue)))
{
- FormSplash.SetAction("Checking settings...");
- Application.DoEvents();
-
GitUICommands uiCommands = new GitUICommands(string.Empty);
var commonLogic = new CommonLogic(uiCommands.Module);
var checkSettingsLogic = new CheckSettingsLogic(commonLogic);
@@ -115,8 +107,6 @@ private static void Main()
// TODO: remove catch-all
}
- FormSplash.HideSplash();
-
if (EnvUtils.RunningOnWindows())
MouseWheelRedirector.Active = true;
diff --git a/GitUI/FormSplash.Designer.cs b/GitUI/FormSplash.Designer.cs
deleted file mode 100644
index ee620bc0718..00000000000
--- a/GitUI/FormSplash.Designer.cs
+++ /dev/null
@@ -1,129 +0,0 @@
-namespace GitUI
-{
- partial class FormSplash
- {
- ///
- /// Required designer variable.
- ///
- private System.ComponentModel.IContainer components = null;
-
- ///
- /// Clean up any resources being used.
- ///
- /// true if managed resources should be disposed; otherwise, false.
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region Windows Form Designer generated code
-
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- this.pictureBox1 = new System.Windows.Forms.PictureBox();
- this.panel1 = new System.Windows.Forms.Panel();
- this._NO_TRANSLATE_osLabel = new System.Windows.Forms.Label();
- this._NO_TRANSLATE_versionLabel = new System.Windows.Forms.Label();
- this._NO_TRANSLATE_programTitle = new System.Windows.Forms.Label();
- this._NO_TRANSLATE_actionLabel = new System.Windows.Forms.Label();
- ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
- this.panel1.SuspendLayout();
- this.SuspendLayout();
- //
- // pictureBox1
- //
- this.pictureBox1.Location = new System.Drawing.Point(5, 5);
- this.pictureBox1.Margin = new System.Windows.Forms.Padding(5);
- this.pictureBox1.Name = "pictureBox1";
- this.pictureBox1.Padding = new System.Windows.Forms.Padding(5);
- this.pictureBox1.Size = new System.Drawing.Size(128, 128);
- this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
- this.pictureBox1.TabIndex = 0;
- this.pictureBox1.TabStop = false;
- //
- // panel1
- //
- this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
- this.panel1.Controls.Add(this._NO_TRANSLATE_osLabel);
- this.panel1.Controls.Add(this._NO_TRANSLATE_versionLabel);
- this.panel1.Controls.Add(this._NO_TRANSLATE_programTitle);
- this.panel1.Controls.Add(this._NO_TRANSLATE_actionLabel);
- this.panel1.Controls.Add(this.pictureBox1);
- this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.panel1.Location = new System.Drawing.Point(0, 0);
- this.panel1.Name = "panel1";
- this.panel1.Size = new System.Drawing.Size(256, 138);
- this.panel1.TabIndex = 1;
- //
- // _NO_TRANSLATE_osLabel
- //
- this._NO_TRANSLATE_osLabel.AutoSize = true;
- this._NO_TRANSLATE_osLabel.Location = new System.Drawing.Point(134, 52);
- this._NO_TRANSLATE_osLabel.Name = "_NO_TRANSLATE_osLabel";
- this._NO_TRANSLATE_osLabel.Size = new System.Drawing.Size(22, 13);
- this._NO_TRANSLATE_osLabel.TabIndex = 4;
- this._NO_TRANSLATE_osLabel.Text = "OS";
- //
- // _NO_TRANSLATE_versionLabel
- //
- this._NO_TRANSLATE_versionLabel.AutoSize = true;
- this._NO_TRANSLATE_versionLabel.Location = new System.Drawing.Point(134, 30);
- this._NO_TRANSLATE_versionLabel.Name = "_NO_TRANSLATE_versionLabel";
- this._NO_TRANSLATE_versionLabel.Size = new System.Drawing.Size(59, 13);
- this._NO_TRANSLATE_versionLabel.TabIndex = 3;
- this._NO_TRANSLATE_versionLabel.Text = "Version {0}";
- //
- // _NO_TRANSLATE_programTitle
- //
- this._NO_TRANSLATE_programTitle.AutoSize = true;
- this._NO_TRANSLATE_programTitle.Location = new System.Drawing.Point(134, 8);
- this._NO_TRANSLATE_programTitle.Name = "_NO_TRANSLATE_programTitle";
- this._NO_TRANSLATE_programTitle.Size = new System.Drawing.Size(74, 13);
- this._NO_TRANSLATE_programTitle.TabIndex = 2;
- this._NO_TRANSLATE_programTitle.Text = "Git Extensions";
- //
- // _NO_TRANSLATE_actionLabel
- //
- this._NO_TRANSLATE_actionLabel.AutoSize = true;
- this._NO_TRANSLATE_actionLabel.Location = new System.Drawing.Point(134, 104);
- this._NO_TRANSLATE_actionLabel.Name = "_NO_TRANSLATE_actionLabel";
- this._NO_TRANSLATE_actionLabel.Size = new System.Drawing.Size(54, 13);
- this._NO_TRANSLATE_actionLabel.TabIndex = 1;
- this._NO_TRANSLATE_actionLabel.Text = "Loading...";
- //
- // FormSplash
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
- this.BackColor = System.Drawing.Color.White;
- this.ClientSize = new System.Drawing.Size(256, 138);
- this.ControlBox = false;
- this.Controls.Add(this.panel1);
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
- this.Name = "FormSplash";
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
- ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
- this.panel1.ResumeLayout(false);
- this.panel1.PerformLayout();
- this.ResumeLayout(false);
-
- }
-
- #endregion
-
- private System.Windows.Forms.PictureBox pictureBox1;
- private System.Windows.Forms.Panel panel1;
- private System.Windows.Forms.Label _NO_TRANSLATE_programTitle;
- private System.Windows.Forms.Label _NO_TRANSLATE_actionLabel;
- private System.Windows.Forms.Label _NO_TRANSLATE_versionLabel;
- private System.Windows.Forms.Label _NO_TRANSLATE_osLabel;
- }
-}
\ No newline at end of file
diff --git a/GitUI/FormSplash.cs b/GitUI/FormSplash.cs
deleted file mode 100644
index 07ba2ebf63f..00000000000
--- a/GitUI/FormSplash.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-using System;
-using System.Drawing;
-using System.Windows.Forms;
-using GitCommands;
-using GitCommands.Utils;
-using ResourceManager;
-
-namespace GitUI
-{
- ///
- /// DO NOT INHERIT FORM GITEXTENIONSFORM SINCE THE SETTINGS ARE NOT YET LOADED WHEN THIS
- /// FORM IS SHOWN! TRANSLATIONS AND COLORED APPLICATION ICONS WILL BREAK!!!!
- ///
- public partial class FormSplash : Form
- {
- private readonly TranslationString _version = new TranslationString("Version {0}");
-
- private static FormSplash instance;
-
- public static void ShowSplash()
- {
- instance = new FormSplash();
- instance.Show();
- }
-
- public static void SetAction(string action)
- {
- if (instance != null)
- instance.SetActionText(action);
- }
-
- public static void HideSplash()
- {
- if (instance != null)
- {
- instance.Dispose();
- instance = null;
- }
- }
-
- private FormSplash()
- {
- ShowInTaskbar = false;
-
- InitializeComponent();
-
- SetFont();
- _NO_TRANSLATE_programTitle.Font = new Font(SystemFonts.MessageBoxFont, FontStyle.Bold);
-
- var image = Lemmings.GetPictureBoxImage(DateTime.Now);
- pictureBox1.Image = image ?? Properties.Resources.git_extensions_logo_final_128;
- }
-
- private void SetFont()
- {
- Font = SystemFonts.MessageBoxFont;
- }
-
- private void SetActionText(string action)
- {
- _NO_TRANSLATE_actionLabel.Text = action;
- }
-
- protected override void OnLoad(EventArgs e)
- {
- base.OnLoad(e);
-
- _NO_TRANSLATE_versionLabel.Text = string.Format(_version.Text, AppSettings.ProductVersion);
-
- if (EnvUtils.RunningOnUnix())
- _NO_TRANSLATE_osLabel.Text = "Unix";
- if (EnvUtils.RunningOnMacOSX())
- _NO_TRANSLATE_osLabel.Text = "MacOSX";
- if (EnvUtils.RunningOnWindows())
- _NO_TRANSLATE_osLabel.Text = "Windows";
- }
- }
-}
\ No newline at end of file
diff --git a/GitUI/FormSplash.resx b/GitUI/FormSplash.resx
deleted file mode 100644
index d58980a38d7..00000000000
--- a/GitUI/FormSplash.resx
+++ /dev/null
@@ -1,120 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
\ No newline at end of file
diff --git a/GitUI/GitUI.csproj b/GitUI/GitUI.csproj
index ecdbf379d06..21d1f6c0a3f 100644
--- a/GitUI/GitUI.csproj
+++ b/GitUI/GitUI.csproj
@@ -599,12 +599,6 @@
FormStatus.cs
-
- Form
-
-
- FormSplash.cs
-
Form
@@ -1563,10 +1557,6 @@
FormSettings.cs
Designer
-
- FormSplash.cs
- Designer
-
FormStash.cs
Designer