示例#1
0
        private static UpdateSourceBase[] GetUpdateSources(string[] sourceArgs)
        {
            if (sourceArgs.Length > 0)
            {
                return(UpdateSourceManager.GetUpdateSources(sourceArgs));
            }

            var updateSources = UpdateSourceManager.FindUpdateSources(_exeDirectory);

            if (updateSources == null || updateSources.Length == 0)
            {
                MessageBox.Show("No links to update sources have been provided in arguments and the UpdateSources file is missing or has no valid sources.\n\nAdd one or more links to update sources as arguments or edit the UpdateSources file.", "Invalid arguments", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            return(updateSources);
        }
示例#2
0
        private static UpdateSourceBase[] GetUpdateSources(string[] sourceArgs)
        {
            if (sourceArgs.Length > 0)
            {
                return(UpdateSourceManager.GetUpdateSources(sourceArgs));
            }

            var updateSources = UpdateSourceManager.FindUpdateSources(_exeDirectory);

            if (updateSources == null || updateSources.Length == 0)
            {
                ShowArgError("No links to update sources have been provided in arguments and the UpdateSources file is missing or has no valid sources.\n\n" +
                             "Add one or more links to update sources as arguments or edit the UpdateSources file.");
            }
            return(updateSources);
        }
示例#3
0
 public UpdateSourceBase[] GetUpdateSources() => _updateSources ?? (_updateSources = UpdateSourceManager.FindUpdateSources(Program.ProgramLocation));