コード例 #1
0
ファイル: Program.cs プロジェクト: NovaDelta/mcskin3d
        private static void MainCore()
        {
            MainThread = Thread.CurrentThread;

#if !DEBUG
            Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
            Application.ThreadException += Application_ThreadException;
#endif

            Version          = new Version(Application.ProductVersion);
            Version.Revision = Repository.Revision;

#if !DEBUG
            try
            {
#endif
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new MCSkin3DAppContext());
#if !DEBUG
        }
        catch (Exception ex)
        {
            RaiseException(ex);
        }
#endif
        }
コード例 #2
0
        public bool CheckForUpdates()
        {
            try
            {
                WebClient wc = new WebClient();
                wc.Proxy = null;
                var version = new Version(wc.DownloadString(_file));

                return(version > Program.Version);
            }
            catch (Exception)
            {
                return(false);
            }
        }
コード例 #3
0
ファイル: Updater.cs プロジェクト: NovusTheory/mcskin3d
		public bool CheckForUpdates()
		{
			try
			{
				WebClient wc = new WebClient();
				wc.Proxy = null;
				var version = new Version(wc.DownloadString(_file));

				return (version > Program.Version);
			}
			catch (Exception)
			{
				return false;
			}
		}
コード例 #4
0
ファイル: Program.cs プロジェクト: rmbzlib/mcskin3d
        private static void MainCore()
        {
            MainThread = Thread.CurrentThread;

            #if !DEBUG
            Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
            Application.ThreadException += Application_ThreadException;
            #endif

            Version = new Version(Application.ProductVersion);
            Version.Revision = Repository.Revision;

            #if !DEBUG
            try
            {
            #endif
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new MCSkin3DAppContext());
            #if !DEBUG
            }
            catch (Exception ex)
            {
                RaiseException(ex);
            }
            #endif
        }