public UpdateCheckerNewVersionForm(UpdateChecker.Version version, UpdateCheckerSettings settings) { InitializeComponent(); m_settings = settings; Text += ": " + version; changelogBox.Text = version.Changelog; }
private static UpdateCheckerSettings WriteDefaultSettingsFile() { var cfg = UpdateCheckerSettings.CreateDefault(); JsonFile.Write(cfg, FILE_NAME); return(cfg); }
private static UpdateCheckerSettings ComposeCfg( string filePath, VersionKeeperSettings serverCfg, bool updateSelf) { var cfg = new UpdateCheckerSettings { ServerURL = serverCfg.ServerURL, UserAgent = "test client", SharedKey = serverCfg.SharedKey, UpdateSelf = updateSelf, CanExitApp = true, }; if (filePath.IsBlank()) { return(cfg); } var dict = ComposeDict(filePath, serverCfg); if (filePath.EndsWith(".exe")) { cfg.Executables = dict; } else if (filePath.EndsWith(".LiteDB")) { cfg.AppendOnlyDBs = dict; } else { cfg.BinaryFiles = dict; } return(cfg); }
public MainCheckerWindowVM(UpdateCheckerSettings updateCheckerSettings, IMessageBroadcastClient messageBroadcastListener, SharedLogListVM commonLogListVM, StateRequestBroadcastHandler stateRequestBroadcastHandler, CfgEditorHubEventHandler cfgEditorHubEventHandler, TrayContextMenuItems trayContextMenuItems, JobOrderWatcher jobOrderWatcher, NewVersionWatcher newVersionWatcher) { _client = messageBroadcastListener; _reqHandlr = stateRequestBroadcastHandler; _cfgEditHandlr = cfgEditorHubEventHandler; _trayMenu = trayContextMenuItems; _jobWatchr = jobOrderWatcher; _verWatchr = newVersionWatcher; Config = updateCheckerSettings; CommonLogs = commonLogListVM; _client.StateChanged += (s, e) => AppendToCaption(e); _client.BroadcastReceived += (s, e) => CommonLogs.Add($"[{e.Key}] {e.Value}"); if (Config.CanExitApp != true) { ExitCmd.OverrideEnabled = false; } }
public TrayContextMenuItems(UpdateCheckerSettings updateCheckerSettings, IMessageBroadcastClient messageBroadcastClient, ProblemReporter1VM problemReporter1VM) { _cfg = updateCheckerSettings; _client = messageBroadcastClient; _reportr = problemReporter1VM; }
public SimpleUpdateForm(UpdateType type, UpdateCheckerSettings settings) { InitializeComponent(); Icon = Gui.Icon; m_Type = type; m_Settings = settings; extensionVersionLinkLabel.LinkClicked +=ExtensionVersionLinkLabelOnLinkClicked; playerVersionLinkLabel.LinkClicked +=PlayerVersionLinkLabelOnLinkClicked; switch (m_Type) { case UpdateType.Both: EnableExtensionInfo(); EnablePlayerInfo(); break; case UpdateType.Extensions: EnableExtensionInfo(); break; case UpdateType.Player: EnablePlayerInfo(); break; } }
public UpdateCheckerNewExtensionForm(ExtensionUpdateChecker.ExtensionVersion version, UpdateCheckerSettings settings) { InitializeComponent(); Icon = PlayerControl.ApplicationIcon; downloadButton.ContextMenuStrip = new ContextMenuStrip(); _files = version.Files; foreach (var file in _files) { downloadButton.ContextMenuStrip.Items.Add(file.name); } downloadButton.ContextMenuStrip.ItemClicked += delegate(object sender, ToolStripItemClickedEventArgs args) { _chosenDownload = args.ClickedItem.Text; downloadButton_Click(sender, args); }; CancelButton = CloseButton; _settings = settings; Text += ": " + version; changelogBox.Text = version.Changelog; }
private static void SetDefaults(ref UpdateCheckerSettings cfg) { if (!cfg.UpdateSelf.HasValue) { cfg.UpdateSelf = true; } if (!cfg.CanExitApp.HasValue) { cfg.CanExitApp = false; } if (cfg.BinaryFiles == null) { cfg.BinaryFiles = new Dictionary <string, string>(); } if (cfg.AppendOnlyDBs == null) { cfg.AppendOnlyDBs = new Dictionary <string, string>(); } if (cfg.Executables == null) { cfg.Executables = new Dictionary <string, string>(); } }
public UpdateAvailableForm(Version version, UpdateCheckerSettings settings) { InitializeComponent(); downloadProgressBar.DisplayStyle = TextProgressBar.ProgressBarDisplayText.Both; Icon = Gui.Icon; downloadButton.ContextMenuStrip = new ContextMenuStrip(); SplitMenuChoices = version.GenerateSplitButtonItemList(); foreach (var choice in SplitMenuChoices) { downloadButton.ContextMenuStrip.Items.Add(choice); } downloadButton.ContextMenuStrip.ItemClicked += delegate(object sender, ToolStripItemClickedEventArgs args) { m_ChosenDownload = (SplitButtonToolStripItem) args.ClickedItem; DownloadButtonClick(sender, args); }; CancelButton = CloseButton; Settings = settings; Text = "New Player available: " + version; changelogViewerWebBrowser.BeforeLoadPreviousChangelog += ChangelogViewerWebBrowserOnBeforeLoadPreviousChangelog; SetChangelog(version); }
public ExtensionUpdateAvailableForm(Version version, UpdateCheckerSettings settings) : base(version, settings) { Text = "New Extensions available: " + version; }