예제 #1
0
파일: Client.cs 프로젝트: dbrgn/pi-vote
 /// <summary>
 /// Download the whole voting from the server and
 /// store it in files.
 /// </summary>
 /// <param name="votingId">Id of the voting.</param>
 /// <param name="votingId">Path where program data is stored.</param>
 /// <param name="callBack">Callback upon completion.</param>
 public void DownloadVoting(Guid votingId, string dataPath, DownloadVotingCallBack callBack)
 {
     lock (this.operations)
       {
     this.operations.Enqueue(new DownloadVotingOperation(votingId, dataPath, callBack));
       }
 }
예제 #2
0
            /// <summary>
            /// Create a new result get operation.
            /// </summary>
            /// <param name="votingId">Id of the voting.</param>
            /// <param name="votingId">Path where program data is stored.</param>
            /// <param name="callBack">Callback upon completion.</param>
            public DownloadVotingOperation(Guid votingId, string dataPath, DownloadVotingCallBack callBack)
            {
                this.votingId = votingId;
                this.callBack = callBack;

                this.offlinePath = Path.Combine(dataPath, votingId.ToString());
            }