示例#1
0
 public bool vote(int uid, Voter voter)
 {
     bool success = false;
     if (voter != null)
     {
         success = songs[uid].vote(new Vote(voter, DateTime.Now - createdOn));
         if (success) songspriority[uid] = songs[uid].getPriority();
     }
     return success;
 }
示例#2
0
文件: Vote.cs 项目: needspeed/VotemUp
 public Vote(Voter voter, TimeSpan voteTime)
 {
     this.voter = voter;
     this.voteTime = voteTime;
 }
示例#3
0
文件: Vote.cs 项目: needspeed/VotemUp
 public bool isThisVoter(Voter voter)
 {
     return this.voter.Equals(voter);
 }
示例#4
0
 public bool addUser(Voter voter)
 {
     bool success = !voters.Contains(voter);
     if (success) voters.Add(voter);
     return success;
 }