コード例 #1
0
        public static void Initialize()
        {
            VersionSystem version = new VersionSystem();

            if (System.Diagnostics.Debugger.IsAttached)
            {
                version.Major    = DateTime.Today.Year;
                version.Minor    = 5;
                version.Build    = int.Parse(string.Format("{0}{1}", DateTime.Today.Month, DateTime.Today.Day));
                version.Revision = "rc.1";
                Properties.Settings.Default.Version = VersionSystem.ToString(version);
                Properties.Settings.Default.Save();
            }

            Version = VersionSystem.Parse(Properties.Settings.Default.Version);
            StatusBar.SetVersionDisplay(Version.ToString());

            try
            {
                GitHubApp = new GitHub("winterstudios", "MeioMundo");
                VersionSystem OnlineVersion = VersionSystem.Parse(GitHubApp.Releases.GetLastRelease().tag_name);
                bool          update        = VersionSystem.Compare(Version, OnlineVersion);
            }
            catch (Exception ex)
            {
            }
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: WinterStudios/MeioMundo
        static void Main(string[] args)
        {
            Editor.API.GitHub.GitHub gitHub = new Editor.API.GitHub.GitHub("winterstudios", "MeioMundo");

            VersionSystem version = new VersionSystem();

            version = VersionSystem.Parse(gitHub.Releases.GetLastRelease(true).tag_name);
            Console.WriteLine(version);

            Console.ReadLine();
        }
コード例 #3
0
        public Repository(string name, VersionSystem vcs, Uri uri)
        {
            if (name == null)
            {
                throw new ArgumentNullException(nameof(name));
            }
            if (uri == null)
            {
                throw new ArgumentNullException(nameof(uri));
            }

            Name = name;
            Vcs  = vcs;
            Uri  = uri;
        }
コード例 #4
0
 public RepositoryClient GetRepositoryClient(VersionSystem vcs)
 {
     return(_repositoryClients.FirstOrDefault(c => c.Vcs == vcs));
 }