diff --git a/svnsync/Program.cs b/svnsync/Program.cs index 27faaf5..bb5133d 100644 --- a/svnsync/Program.cs +++ b/svnsync/Program.cs @@ -13,48 +13,40 @@ namespace svnsync /// /// Der Haupteinstiegspunkt für die Anwendung. /// - [STAThread] - static void Main(string[] args) - { - if (!cmd(args)) - { - return; - } - ControllersTray t = null; - try - { - Svn.getInstance().setDirectory(CmdArgs.getInstance().GetArgumentData("-d")); - t = new ControllersTray(); - t.execute(); - } - catch (Exception e) - { - t.hideToolTip(); - string text = e.Message+"\n\n"+e.StackTrace; - string title = "Exception in SVNSync: " + CmdArgs.getInstance().GetArgumentData("-d"); - System.Windows.Forms.MessageBox.Show(text, title, MessageBoxButtons.OK, MessageBoxIcon.Error); - - return; - } - Application.Run(); - return; - /*Application.Run();*/ - Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); - try - { - Application.Run(new Form1(args)); - } - catch (NotImplementedException e) - { - System.Windows.Forms.MessageBox.Show("In: " + e.Source + "\n\n" + e.Message, "Fehler!", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - catch (Exception /*e*/) - { - //System.Windows.Forms.MessageBox.Show("In: " + e.Source + "\n\n" + e.Message, "Fehler!", MessageBoxButtons.OK, MessageBoxIcon.Error); - Application.Exit(); - } + [STAThread] + static void Main(string[] args) { + if(!cmd(args)) { + return; } + ControllersTray t = null; + try { + Svn.getInstance().setDirectory(CmdArgs.getInstance().GetArgumentData("-d")); + t = new ControllersTray(); + t.execute(); + } catch(Exception e) { + t.hideToolTip(); + string text = e.Message + "\n\n" + e.StackTrace; + string title = "Exception in SVNSync: " + CmdArgs.getInstance().GetArgumentData("-d"); + System.Windows.Forms.MessageBox.Show(text, title, MessageBoxButtons.OK, MessageBoxIcon.Error); + + return; + } + if(!CmdArgs.getInstance().HasArgumentType("-cron")) { + Application.Run(); + } + return; + /*Application.Run();*/ + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + try { + Application.Run(new Form1(args)); + } catch(NotImplementedException e) { + System.Windows.Forms.MessageBox.Show("In: " + e.Source + "\n\n" + e.Message, "Fehler!", MessageBoxButtons.OK, MessageBoxIcon.Error); + } catch(Exception /*e*/) { + //System.Windows.Forms.MessageBox.Show("In: " + e.Source + "\n\n" + e.Message, "Fehler!", MessageBoxButtons.OK, MessageBoxIcon.Error); + Application.Exit(); + } + } private static bool cmd(string[] args) { diff --git a/svnsync/bin/Release/SvnSync.exe b/svnsync/bin/Release/SvnSync.exe index 19e27b5..72903ba 100644 Binary files a/svnsync/bin/Release/SvnSync.exe and b/svnsync/bin/Release/SvnSync.exe differ diff --git a/svnsync/svnsync.csproj.user b/svnsync/svnsync.csproj.user index eabcac3..83eb743 100644 --- a/svnsync/svnsync.csproj.user +++ b/svnsync/svnsync.csproj.user @@ -1,7 +1,7 @@  - -d "C:\\Users\\netz\\Documents\\Bastelleien" -cron -autoadd -autodelete + -d "E:\Eigene Dateien\Doc%27s\Basteleien" -cron -autoadd -autodelete false Project