예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="FormMain"/> class.
        /// </summary>
        public FormMain()
        {
            InitializeComponent();
            settings = new Settings();

            if (Debugger.IsAttached && !overrideDebugCheck)  // different settings when debugging..
            {
                VersionCheck.ApiKey   = settings.ApiKeyTest; // a random string and a random file on the server...
                VersionCheck.CheckUri = settings.CheckUriTest;
            }
            else
            {
                VersionCheck.ApiKey   = settings.ApiKey; // a random string and a random file on the server...
                VersionCheck.CheckUri = settings.CheckUri;
            }
            VersionCheck.TimeOutMs = settings.TimeOutMs;

            tstbLocationURI.Text = VersionCheck.CheckUri;
            tstbAPIKey.Text      = VersionCheck.ApiKey;
            nudTimeOutMS.Value   = settings.TimeOutMs;

            // update the database to the newest version..
            VersionCheck.UpdateDatabase();

            // the application dead-locks if the "self-assembly" check is made in the debug mode..
            mnuThisAssemblyVersion.Enabled = !Debugger.IsAttached;
            mnuThisAssemblyVersion.Visible = !Debugger.IsAttached;

            ListVersions();
        }
    public static CustomEnvironmentInfoSaveData DeserializeFromJSONString(string stringData)
    {
        VersionCheck versionCheck = null;

        try
        {
            versionCheck = JsonConvert.DeserializeObject <VersionCheck>(stringData);
        }
        catch
        { }

        if (versionCheck == null)
        {
            return(null);
        }

        CustomEnvironmentInfoSaveData result = null;

        if (versionCheck.version == "1.0.0")
        {
            try
            {
                return(JsonConvert.DeserializeObject <CustomEnvironmentInfoSaveData>(stringData));
            }
            catch
            {
                return(null);
            }
        }

        return(result);
    }
예제 #3
0
        static void Main(string[] args)
        {
            Console.WriteLine("Enter two software versions separated by comma to check if you have the latest version");
            var v1      = Console.ReadLine();
            var v2      = Console.ReadLine();
            var version = VersionCheck.versionChecker(v1, v2);

            if (version == -1)
            {
                Console.WriteLine($"{v1} is older");
            }

            else if (version == 1)
            {
                Console.WriteLine($"{v2} is older");
            }

            else if (version == 0)
            {
                Console.WriteLine("Version is up to date");
            }
            else
            {
                Console.WriteLine("Empty string");
            }
        }
예제 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UpdateWindow"/> class.
 /// </summary>
 /// <param name="verCheck">The verCheck<see cref="VersionCheck"/>.</param>
 public UpdateWindow(VersionCheck verCheck)
 {
     InitializeComponent();
     this.verCheck    = verCheck;
     this.DataContext = verCheck;
     WpfHelper.CenterChildWindow(this);
 }
예제 #5
0
        public async Task CheckVersion()
        {
            try
            {
                GithubVersion latest = await VersionCheck.GetLatestVersionAsync("Zingabopp", "MultiplayerExtensions");

                Log?.Debug($"Latest version is {latest}, released on {latest.ReleaseDate.ToShortDateString()}");
                if (PluginMetadata != null)
                {
                    SemVer.Version currentVer      = PluginMetadata.Version;
                    SemVer.Version latestVersion   = new SemVer.Version(latest.ToString());
                    bool           updateAvailable = new SemVer.Range($">{currentVer}").IsSatisfied(latestVersion);
                    if (updateAvailable)
                    {
                        Log?.Info($"An update is available!\nNew mod version: {latestVersion}\nCurrent mod version: {currentVer}");
                    }
                }
            }
            catch (ReleaseNotFoundException ex)
            {
                Log?.Warn(ex.Message);
            }
            catch (Exception ex)
            {
                Log?.Warn($"Error checking latest version: {ex.Message}");
                Log?.Debug(ex);
            }
        }
 public AccuracyIndicator()
 {
     lastSongTime  = -5.0;
     VersionCheck  = new VersionCheck(187002999);
     ChangelogRect = new Rect(400.0f, 400.0f, 100.0f, 100.0f);
     version       = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).ProductVersion;
 }
예제 #7
0
        public Options()
        {
            var versionInfo = VersionCheck.LatestVersion();

            this.CurrentVersion = versionInfo.Item1;
            this.NewVersion     = versionInfo.Item2;
        }
예제 #8
0
        /// <summary>
        /// The OnContentRendered.
        /// </summary>
        /// <param name="e">The e<see cref="EventArgs"/>.</param>
        protected override void OnContentRendered(EventArgs e)
        {
            base.OnContentRendered(e);

            if (AppSettings.Default.VersionAutoCheck)
            {
                var version = Application.Current.MainWindow.GetType()
                              .Assembly
                              .GetCustomAttribute <AssemblyInformationalVersionAttribute>()
                              .InformationalVersion;
                try
                {
                    var verCheck = new VersionCheck(version, AppSettings.Default.PackageUrl);
                    if (verCheck.DoesUpdateExist && (AppSettings.Default.IncludePrereleaseVersions || verCheck.LastestVersionIsPrerelease == false))
                    {
                        var win = new UpdateWindow(verCheck);
                        WpfHelper.SetWindowSettings(this);
                        win.ShowDialog();
                    }
                }
                catch
                {
                    // Ignore exceptions here.
                }
            }
        }
        public TaskNotifictionMediaReport(IActivityManager activity,
                                          ILogManager logger,
                                          IServerConfigurationManager config,
                                          IFileSystem fileSystem,
                                          IServerApplicationHost appHost,
                                          INotificationManager notificationManager,
                                          IUserManager userManager,
                                          ILibraryManager libraryManager,
                                          IUserViewManager userViewManager)
        {
            _logger              = logger.GetLogger("NewMediaReportNotification - TaskNotifictionReport");
            _activity            = activity;
            _config              = config;
            _fileSystem          = fileSystem;
            _notificationManager = notificationManager;
            _userManager         = userManager;
            _libraryManager      = libraryManager;
            _userViewManager     = userViewManager;
            _appHost             = appHost;

            if (VersionCheck.IsVersionValid(_appHost.ApplicationVersion, _appHost.SystemUpdateLevel) == false)
            {
                _logger.Info("ERROR : Plugin not compatible with this server version");
                throw new NotImplementedException("This task is not available on this version of Emby");
            }

            _logger.Info("NewMediaReportNotification Loaded");
        }
        private void pbDeleteSelectedCulture_Click(object sender, EventArgs e)
        {
            var localizeEntry = (LocalizeChangeHistoryResponse)listLocalizedCultures.SelectedItem;

            VersionCheck.DeleteLocalizedVersionData(Convert.ToInt32(localizeEntry.ID));
            tbChangesDescription.Clear();
            ListLocalizedCultures();
        }
예제 #11
0
        public void UpdateMe(IUiInteraction uiProvider)
        {
            var updateNeeded = new VersionCheck().Check(uiProvider);

            if (updateNeeded)
            {
            }
        }
 public SplashTextEditor()
 {
     VersionCheck         = new VersionCheck(187004999);
     ChangelogRect        = new Rect(500.0f, 500.0f, 100.0f, 100.0f);
     randomGenerator      = new System.Random();
     splashTextComponent  = null;
     currentSplashMessage = string.Empty;
 }
예제 #13
0
        private static void Main()
        {
            //检测.net版本。
            if (!VersionCheck.Check4FromRegistry())
            {
                MessageBox.Show(".net版本过低。本程序需要运行在.net4.0或.net4.0以后的版本!", "提示");
                return;
            }
            App.Instance.ApplicationDirectory = Environment.CurrentDirectory + "\\";

            //同时只能运行一个实例。
            if (SingletonApp.IsMutexExsited)
            {
                SingletonApp.ShowRunningInstance();
                return;
            }
            //指定运行日志要保存的目录
            RunningLog.Start(App.Instance.ApplicationDirectory + "\\history\\");

            //判断当前登录用户是否为管理员
            if (WindowsAuthority.IsAdministrator)
            {
                //设置应用程序退出和异常的事件
                Application.ApplicationExit += App.Instance.RaiseApplicationExist;
                Application.ThreadExit      += App.Instance.RaiseMainThreadExist;
                Application.ThreadException += (o, e) => MessageBox.Show(e.Exception.ToString());

                try
                {
                    //运行应用程序内核
                    App.Instance.BuildModule();
                    App.Instance.Initialize();
                    App.Instance.RaiseStarting();

                    //启动Ui界面
                    IInvoke invoker = ObjectGenerator.Create("FlightViewerUI.dll", "BinHong.FlightViewerUI.UiInvoker") as IInvoke;
                    invoker.Invoke();
                }
                catch (Exception e)
                {
                    string msg = e.Message;
#if DEBUG
                    msg = e.Message + e.StackTrace;
#endif
                    RunningLog.Record(LogType.System, LogLevel.Error, msg);
                    Thread.Sleep(200);
                    MessageBox.Show(msg);
                }
                finally
                {
                    SingletonApp.ReleaseMutex();
                }
            }
            else
            {
                WindowsAuthority.RunAsAdministrator(Application.ExecutablePath);
            }
        }
        public override void Initialize()
        {
            CodeSmith.Engine.Configuration.Instance.EnsureInitialize();

            if (ConfigurationVersion != VersionCheck.GetShortBuild())
            {
                Upgrade();
            }
        }
예제 #15
0
        // a user clicked the link..
        void SimpleLinkLabel_Click(object sender, EventArgs e)
        {
            try
            {
                if (!UseDownloadDialogOnBinaries)
                {
                    System.Diagnostics.Process.Start(LinkUrl);
                }
                else
                {
                    if (VersionCheck.AboutDialogDisplayDownloadDialog)
                    {
                        if (Uri.IsWellFormedUriString(LinkUrl, UriKind.Absolute))
                        {
                            FormCheckVersion.CheckForNewVersion(VersionCheck.CheckUri,
                                                                AboutAssembly == null ? Assembly.GetEntryAssembly() : AboutAssembly,
                                                                CultureInfo.CurrentCulture.Name);
                        }
                        return;
                    }

                    if (VersionCheck.DownloadFile(LinkUrl, TempPath))
                    {
                        VersionCheck.IncreaseDownloadCount(SoftwareName);

                        var processCommand = Path.Combine(TempPath, Path.GetFileName(new Uri(LinkUrl).LocalPath));
                        if (Path.GetExtension(processCommand)
                            ?.Equals(".msi", StringComparison.InvariantCultureIgnoreCase) == true)
                        {
                            System.Diagnostics.Process.Start(new ProcessStartInfo(processCommand)
                            {
                                UseShellExecute = true
                            });
                        }
                        else
                        {
                            System.Diagnostics.Process.Start(processCommand);
                        }
                    }
                    else
                    {
                        try
                        {
                            File.Delete(Path.Combine(TempPath, Path.GetFileName(new Uri(LinkUrl).LocalPath)));
                        }
                        catch
                        {
                            // ignored..
                        }
                    }
                }
            }
            catch
            {
                // ignored..
            }
        }
 public SplashTextEditor()
 {
     versionCheck        = new VersionCheck(187004999);
     changelogRect       = new Rect(500.0f, 500.0f, 100.0f, 100.0f);
     randomGenerator     = new System.Random();
     splashTextComponent = null;
     currentSplashIndex  = 0;
     previewingMessage   = false;
 }
예제 #17
0
        void Respond(string[] command)
        {
            try {
                if (command.Length == 0)
                {
                    throw new ServerException("Empty command");
                }

                var verb = command[0];
                if (verb == "verify")
                {
                    ServerUtils.checkArgs(command, 0);
                    var payload = ReadPayload();
                    VerificationTask.ReadTask(payload).Run();
                }
                else if (verb == "counterExample")
                {
                    ServerUtils.checkArgs(command, 0);
                    var payload = ReadPayload();
                    VerificationTask.ReadTask(payload).CounterExample();
                }
                else if (verb == "dotgraph")
                {
                    ServerUtils.checkArgs(command, 0);
                    var payload = ReadPayload();
                    VerificationTask.ReadTask(payload).DotGraph();
                }
                else if (verb == "symbols")
                {
                    ServerUtils.checkArgs(command, 0);
                    var payload = ReadPayload();
                    VerificationTask.ReadTask(payload).Symbols();
                }
                else if (verb == "version")
                {
                    ServerUtils.checkArgs(command, 0);
                    ReadPayload();
                    VersionCheck.CurrentVersion();
                }
                else if (verb == "quit")
                {
                    ServerUtils.checkArgs(command, 0);
                    Exit();
                }
                else
                {
                    throw new ServerException("Unknown verb '{0}'", verb);
                }

                Interaction.EOM(Interaction.SUCCESS, "Verification completed successfully!");
            } catch (ServerException ex) {
                Interaction.EOM(Interaction.FAILURE, ex);
            } catch (Exception ex) {
                Interaction.EOM(Interaction.FAILURE, ex, "[FATAL]");
                running = false;
            }
        }
예제 #18
0
        IEnumerator DemoCouroutine()
        {
            Debug.Log(Application.persistentDataPath);

            state = new Model.State();

            statusLabel.text  = "Splash Animation";
            versionLabel.text = "Checking...";

            VersionCheck check = VersionCheck.Checking;

            // Download and compare local and remote versions
            Sheets.version.Check(
                isDifferent =>
            {
                check             = isDifferent ? VersionCheck.Changed : VersionCheck.Identical;
                versionLabel.text = isDifferent ? "NEW!" : "Nothing Changed";
            },
                errorMessage =>
            {
                check             = VersionCheck.Error;
                versionLabel.text = errorMessage;
            }
                );

            // Wait until the splash animation is over
            yield return(new WaitForSeconds(2f));

            statusLabel.text = "Waiting for version check";

            // If the version has changed then download all sheets
            if (check == VersionCheck.Changed)
            {
                yield return(WaitForDownload(() =>
                {
                    // Since all sheet data was downloaded and saved we can now override the version
                    Sheets.version.WriteWithRemoteData();
                },
                                             () =>
                {
                    Debug.LogWarning("Error Downloading!");
                    statusLabel.text = "Error";
                }));
            }

            // Parse data and apply to the state
            state.characters = Sheets.characters.Parse();
            state.languages  = Sheets.languages.Parse();

            statusLabel.text  = "Game";
            versionLabel.text = Sheets.version.Parse().ToString();

            // After a delay show the state
            yield return(new WaitForSeconds(1f));

            statusLabel.text = state.ToString();
        }
예제 #19
0
        internal static void ShowVersionCheck(Form form)
        {
            VersionCheck versionCheckWindow = new VersionCheck {
                Owner = form
            };

            versionCheckWindow.InitializeForm();
            versionCheckWindow.ShowDialog(form);
        }
예제 #20
0
        private void HandleVersionCheck(VersionCheck payload, PayloadWriter writer)
        {
            StatusMsg resultPayload = Payloads.CreatePayload <StatusMsg>();

            resultPayload.Errorcode = 0;
            resultPayload.Errormsg  = null;
            resultPayload.TicketId  = payload.TicketId;
            SendReply(writer, resultPayload);
        }
예제 #21
0
        /// <summary>
        /// Shows the dialog with the assembly data.
        /// </summary>
        /// <param name="assemblyName">The name of the assembly.</param>
        /// <param name="version">The version of the assembly.</param>
        /// <param name="archivePreviousEntry">A value indicating if the user wishes to archive the previous <see cref="VersionInfo"/> entry.</param>
        /// <param name="usePreviousLocalizedData">A value indicating whether to use previous localized version data as a base for the new version.</param>
        /// <returns>An instance to <see cref="VersionInfo"/> class if the operation was successful; otherwise null.</returns>
        public static VersionInfo ShowDialog(string assemblyName, Version version, out bool archivePreviousEntry,
                                             out bool usePreviousLocalizedData)
        {
            int applicationId = -1;

            var info = VersionCheck.GetVersion(assemblyName);

            if (info == null)
            {
                info = VersionInfo.FromVersion(assemblyName, version);
            }
            else
            {
                info.SoftwareVersion = version.ToString();
                applicationId        = info.ID;
            }

            archivePreviousEntry     = false;
            usePreviousLocalizedData = false;
            using (
                var form = new FormDialogAddUpdateAssemblyVersion
            {
                cbDirectDownload = { Checked = info.IsDirectDownload },
                tbSoftwareName = { Text = info.SoftwareName },
                tbSoftwareVersion = { Text = info.SoftwareVersion },
                tbDownloadLink = { Text = info.DownloadLink },
                tbMetaData = { Text = info.MetaData },
                dtpReleaseDate = { Value = info.ReleaseDate },
                dtpReleaseTime = { Value = info.ReleaseDate },
                cbArchivePreviousVersion = { Enabled = applicationId != -1, Checked = applicationId != -1 },
                cbPreservePreviousVersionData = { Enabled = applicationId != -1, Checked = applicationId != -1 },
            })
            {
                if (form.ShowDialog() == DialogResult.OK)
                {
                    info.MetaData = form.tbMetaData.Text;
                    var dt1 = form.dtpReleaseDate.Value;
                    var dt2 = form.dtpReleaseTime.Value;
                    info.IsDirectDownload = form.cbDirectDownload.Checked;
                    info.DownloadLink     = form.tbDownloadLink.Text;
                    info.ReleaseDate      = new DateTime(dt1.Year, dt1.Month, dt1.Day, dt2.Hour, dt2.Minute, dt2.Second,
                                                         DateTimeKind.Utc);
                    if (form.cbArchivePreviousVersion.Checked)
                    {
                        archivePreviousEntry = applicationId != -1;
                    }

                    if (form.cbPreservePreviousVersionData.Checked)
                    {
                        usePreviousLocalizedData = applicationId != -1;
                    }
                }

                return(info);
            }
        }
        static void Functions_OnOnDutyStateChanged(bool onDuty)
        {
            GameFiber.StartNew(delegate
            {
                bool isLoadStarted = false;
                "Loading L.S. Noir".AddLog();
                if (!onDuty)
                {
                    return;
                }

                if (!RageCheck.RPHCheck(0.46f))
                {
                    return;
                }

                if (!RageProRegistration.RegisterRagePro())
                {
                    return;
                }

                if (!VersionCheck.OldLSNCheck())
                {
                    return;
                }

                /*
                 * var readme = new FileChecker(@"Plugins\LSPDFR\LSNoir\Readme.txt", FileChecker.FileType.readme);
                 * readme.StartFileCheck();
                 * while (readme.IsRunning)
                 *  GameFiber.Yield();
                 *
                 * if (!readme.IsSuccessful) return;
                 *
                 * var license = new FileChecker(@"Plugins\LSPDFR\LSNoir\License.txt", FileChecker.FileType.license);
                 * license.StartFileCheck();
                 * while (license.IsRunning)
                 *  GameFiber.Yield();
                 *
                 * if (!license.IsSuccessful) return;
                 *
                 * var ini = new FileChecker(@"Plugins\LSPDFR\LSNoir\Settings.ini", FileChecker.FileType.ini);
                 * ini.StartFileCheck();
                 * while (ini.IsRunning)
                 *  GameFiber.Yield();
                 *
                 * if (!ini.IsSuccessful) return;
                 */
                //VersionCheck.CheckVersion();

                Settings.Settings.IniUpdateCheck();

                "LoadLSN".AddLog();
                LoadLsn();
            });
        }
예제 #23
0
        private static async Task UploadInstallerAsync(DeployScript script, VersionCheck check)
        {
            Console.WriteLine($"Uploading version {check.Version} installer...");
            var uri  = new Uri(GetBlobNameFromFilename(script.InstallerExe, script.StorageAccount));
            var blob = new CloudBlockBlob(uri, new StorageCredentials(script.StorageAccount.Name, script.StorageAccount.Key));
            await blob.UploadFromFileAsync(script.InstallerExe);

            blob.Metadata[VersionCheck.VersionMetadata] = check.Version.ToString();
            await blob.SetMetadataAsync();
        }
예제 #24
0
        protected override void FillDefaulValues()
        {
            if (Id == null)
            {
                Id = Guid.NewGuid().ToString();
            }

            if (VersionCheck == null)
            {
                VersionCheck = new VersionCheck();
            }

            if (Servers == null)
            {
                Servers = new List <ServerConfig2>();
                Servers.Add(ServerConfig2.Default);

                MonitorServer = Servers[0].Name;
            }

            // Convert MSMQ plain to XML, as we now support more then one content serializer
            foreach (var srv in this.Servers)
            {
                if (srv.MessageBus == "NServiceBus")
                {
                    if (srv.MessageBusQueueType == "MSMQ (XML)")
                    {
                        srv.MessageBusQueueType = "MSMQ";
                        CommandContentType      = "XML";
                    }

                    else if (srv.MessageBusQueueType == "MSMQ (JSON)")
                    {
                        srv.MessageBusQueueType = "MSMQ";
                        CommandContentType      = "JSON";
                    }
                }
            }

            if (CommandDefinition == null)
            {
                CommandDefinition = new CommandDefinition();

                // Re-evaluate after suppot for more then NServiceBus is implemented
                if (this.Servers.Count == 0 || this.Servers.First().MessageBus == "NServiceBus")
                {
                    CommandDefinition.InheritsType = "NServiceBus.ICommand, NServiceBus";
                }
            }

            if (!CommandContentType.IsValid())
            {
                CommandContentType = "XML";
            }
        }
예제 #25
0
        public void VersionCheckNoRevision()
        {
            string versionString = "3.8.2";
            var    version       = VersionCheck.ParseVersion(versionString);

            Console.WriteLine($"Current Version: {string.Join(".", version.GetVersionArray())} released on {version.ReleaseDate}");
            Assert.AreEqual(3, version.Major);
            Assert.AreEqual(8, version.Minor);
            Assert.AreEqual(2, version.Build);
            Assert.IsNull(version.Revision);
        }
예제 #26
0
        private async Task AlertIfNewVersionAvailable()
        {
            string       currentVersion   = "2.2.14.0";
            VersionCheck versionCheck     = new VersionCheck(this.LogProvider);
            string       newVersionNumber = await versionCheck.GetAvailableVersion("https://api.migaz.tools/v1/version/AWStoARM", currentVersion);

            if (versionCheck.IsVersionNewer(currentVersion, newVersionNumber))
            {
                DialogResult dialogresult = MessageBox.Show("New version " + newVersionNumber + " is available at http://aka.ms/MigAz", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
예제 #27
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            VersionCheck VersionChecker = new VersionCheck();

            VersionChecker.Show();

            Application.Run();
        }
예제 #28
0
파일: FWindow.cs 프로젝트: siosios/MSniper
        public void Helper(bool withParams)
        {
            Console.WriteLine("\n--------------------------------------------------------");
            Console.WriteLine(Culture.GetTranslation(TranslationString.Description,
                                                     Variables.ProgramName, Variables.CurrentVersion, Variables.By));
            Console.WriteLine(Culture.GetTranslation(TranslationString.GitHubProject,
                                                     Variables.GithubIoUri),
                              Config.Warning);
            Console.WriteLine(Culture.GetTranslation(TranslationString.SnipeWebsite,
                                                     Variables.SnipeWebsite),
                              Config.Warning);
            Console.WriteLine(Culture.GetTranslation(TranslationString.SnipeWebsite,
                                                     "http://mypogosnipers.com/"),
                              Config.Warning);
            Console.Write(Culture.GetTranslation(TranslationString.CurrentVersion,
                                                 Assembly.GetEntryAssembly().GetName().Version.ToString()),
                          Config.Highlight);
            if (Protocol.IsRegistered() == false && withParams == false)
            {
                Console.WriteLine(" ");
                Console.WriteLine(Culture.GetTranslation(TranslationString.ProtocolNotFound,
                                                         "registerProtocol.bat"),
                                  Config.Error);
                Shutdown();
            }

            if (VersionCheck.IsLatest())
            {
                Console.WriteLine($"\t* {Culture.GetTranslation(TranslationString.LatestVersion)} *", Config.Highlight);
            }
            else
            {
                Console.WriteLine(string.Format($"* {Culture.GetTranslation(TranslationString.NewVersion)}: {{0}} *", VersionCheck.RemoteVersion), Config.Success);

                var downloadlink = Variables.GithubProjectUri + "/releases/latest";
                Console.WriteLine(string.Format($"* {Culture.GetTranslation(TranslationString.DownloadLink)}:  {{0}} *", downloadlink), Config.Warning);
                if (Config.DownloadNewVersion && withParams == false)
                {
                    Console.WriteLine(Culture.GetTranslation(TranslationString.AutoDownloadMsg), Config.Notification);
                    Console.Write($"{Culture.GetTranslation(TranslationString.Warning)}:", Config.Error);
                    Console.WriteLine(Culture.GetTranslation(TranslationString.WarningShutdownProcess), Config.Highlight);
                    var c = Console.ReadKey();
                    if (c == 'd' || c == 'D')
                    {
                        Downloader.DownloadNewVersion();
                    }
                    Shutdown();
                }
            }
            Console.WriteLine(Culture.GetTranslation(TranslationString.IntegrateMsg,
                                                     Variables.ProgramName, Variables.MinRequireVersion), Config.Notification);
            Console.WriteLine("--------------------------------------------------------");
        }
예제 #29
0
    void Awake()
    {
        LoadPlayerPrefs();
        SaveToPlayerPrefs();

        versionCheck = gameObject.GetComponent <VersionCheck>();

        //keep it processing even when not in focus.
        Application.runInBackground = true;

        //Set desired frame rate as high as possible.
        Application.targetFrameRate = GlobalState.fps;
    }
예제 #30
0
        private async Task AlertIfNewVersionAvailable()
        {
            string       currentVersion   = "2.4.4.0";
            VersionCheck versionCheck     = new VersionCheck(this.LogProvider);
            string       newVersionNumber = await versionCheck.GetAvailableVersion("https://migaz.azurewebsites.net/api/v2", currentVersion);

            if (versionCheck.IsVersionNewer(currentVersion, newVersionNumber))
            {
                NewVersionAvailableDialog newVersionDialog = new NewVersionAvailableDialog();
                newVersionDialog.Bind(currentVersion, newVersionNumber);
                newVersionDialog.ShowDialog();
            }
        }
예제 #31
0
        private void versionNotice_Load(object sender, EventArgs e)
        {
            //Current Version
            lblCurrentVersionNumber.Text = VersionCheck.CurrentVersion.ToString();

            //Latest Version
            const string downloadUrl = "http://turtlemine.googlecode.com/files/";
            const string changesUrl = "http://code.google.com/p/redmine-projects/issues/list?can=1&q=label%3AMilestone-ReleaseXXXX&colspec=ID+Type+Status+Priority+Milestone+Owner+Summary&cells=tiles";

            var latestVersion = new VersionCheck();
            lnkLatestVersion.Text = latestVersion.LatestVersion.ToString();
            lnkLatestVersion.Tag = downloadUrl + latestVersion.LatestVersionFileName;
            lnkChangeList.Tag = changesUrl.Replace("XXXX", lnkLatestVersion.Text);
        }
예제 #32
0
        protected override void FillDefaulValues()
        {
            if( Id == null )
            Id = Guid.NewGuid().ToString();

              if( VersionCheck == null )
            VersionCheck = new VersionCheck();

              if( Servers == null ) {
            Servers = new List<ServerConfig2>();
            Servers.Add(ServerConfig2.Default);

            MonitorServer = Servers[0].Name;
              }

              // Convert MSMQ plain to XML, as we now support more then one content serializer
              foreach( var srv in this.Servers ) {
            if( srv.MessageBus == "NServiceBus" ) {

              if( srv.MessageBusQueueType == "MSMQ (XML)" ) {
            srv.MessageBusQueueType = "MSMQ";
            CommandContentType = "XML";
              } else if( srv.MessageBusQueueType == "MSMQ (JSON)" ) {
            srv.MessageBusQueueType = "MSMQ";
            CommandContentType = "JSON";
              }

            }
              }

              if( CommandDefinition == null ) {

            CommandDefinition = new CommandDefinition();

            // Re-evaluate after suppot for more then NServiceBus is implemented
            if( this.Servers.Count == 0 || this.Servers.First().MessageBus == "NServiceBus" )
              CommandDefinition.InheritsType = "NServiceBus.ICommand, NServiceBus";

              }

              if( !CommandContentType.IsValid() )
            CommandContentType = "XML";
        }
예제 #33
0
      protected override void FillDefaulValues() {

        if( Id == null ) { // New Installation
          Id = Guid.NewGuid().ToString();
        }

        if( VersionCheck == null )
          VersionCheck = new VersionCheck();

        if( Servers == null ) {
          Servers = new List<ServerConfig3>();
          Servers.Add(ServerConfig3.Default);

          MonitorServerName = Servers[0].Name;
        }

        // Convert MSMQ plain to XML, as we now support more then one content serializer
        foreach( var srv in this.Servers ) {
          if( srv.ServiceBus == "NServiceBus" ) {

            if( srv.ServiceBusQueueType == "MSMQ (XML)" ) {
              srv.ServiceBusQueueType = "MSMQ";
              srv.CommandContentType = "XML";
            } else if( srv.ServiceBusQueueType == "MSMQ (JSON)" ) {
              srv.ServiceBusQueueType = "MSMQ";
              srv.CommandContentType = "JSON";
            }

            if( srv.CommandDefinition == null ) {
              srv.CommandDefinition = new CommandDefinition();
              srv.CommandDefinition.InheritsType = "NServiceBus.ICommand, NServiceBus";
            }

          }

          if( !srv.CommandContentType.IsValid() )
            srv.CommandContentType = "XML";
        }

      }
예제 #34
0
파일: Updates.cs 프로젝트: smst/turtlemine
        private void btnCheckForUpdates_Click(object sender, EventArgs e)
        {
            //Latest Version
            const string downloadUrl = "http://redmine-projects.googlecode.com/files/";
            const string changesUrl = "http://code.google.com/p/redmine-projects/issues/list?can=1&q=label%3AMilestone-ReleaseXXXX&colspec=ID+Type+Status+Priority+Milestone+Owner+Summary&cells=tiles";

            try
            {
                var latestVersion = new VersionCheck();
                lnkLatestVersion.Text = latestVersion.LatestVersion.ToString();
                lnkLatestVersion.Tag = downloadUrl + latestVersion.LatestVersionFileName;
                lnkChangeList.Tag = changesUrl.Replace("XXXX", lnkLatestVersion.Text);
                lnkLatestVersion.Visible = true;
                lnkChangeList.Visible = true;
            }
            catch (Exception ex)
            {
                txtCheckFailed.Text = ex.Message;
                lnkLatestVersion.Visible = false;
                lnkChangeList.Visible = false;
            }

            grpLatestVersion.Visible = true;
        }