コード例 #1
0
 private void recieveSubmission(TargettedSubmission submission)
 {
     if (String.IsNullOrEmpty(submission.target) || submission.target != "submission") return;
     Dispatcher.adopt(delegate
     {
         submissions.Add(load(submission));
     });
 }
コード例 #2
0
 public void timeTest()
 {
     TargettedSubmission target = new TargettedSubmission(); // TODO: Initialize to an appropriate value
     long expected = 0; // TODO: Initialize to an appropriate value
     long actual;
     target.time = expected;
     actual = target.time;
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
コード例 #3
0
        public PrivacyWrapper(TargettedSubmission sub, Dictionary<string, string> userMapping)
        {
            targettedSubmission = sub;

            var labelIndex = 1;
            foreach (var user in sub.blacklisted)
            {
                privateusers.Add(new PrivateUser(user.UserName, GenerateDisplayName(userMapping, user.UserName, ref labelIndex), MeTLStanzas.Ink.stringToColor(user.Color)));
            }
        }
コード例 #4
0
 private DisplayableSubmission load(TargettedSubmission submission)
 {
     var uri = App.controller.config.getResource(submission.url);
     var bitmap = new BitmapImage();
     bitmap.BeginInit();
     bitmap.StreamSource = new System.IO.MemoryStream(App.controller.client.resourceProvider.secureGetData(uri));
     bitmap.EndInit();
     return new DisplayableSubmission
     {
         Image = bitmap,
         Source = submission.url,
         Url = uri,
         Identity = submission.identity,
         Author = submission.author,
         Message = submission.title,
         Date = SandRibbonObjects.DateTimeFactory.FromMilis(submission.timestamp).ToString()
     };
 }
コード例 #5
0
 private void SendSubmission(TargettedSubmission ts)
 {
     client.SendSubmission(ts);
 }
 public void receiveSubmission(TargettedSubmission ts) { }
コード例 #7
0
 public void TargettedSubmissionConstructorTest()
 {
     TargettedSubmission target = new TargettedSubmission();
     Assert.Inconclusive("TODO: Implement code to verify target");
 }
コード例 #8
0
ファイル: Client.cs プロジェクト: StackableRegiments/metl2011
 public void SendSubmission(TargettedSubmission ts)
 {
     Trace.TraceInformation("Beginning Submission send: " + ts.url);
     Action work = delegate
     {
         wire.SendScreenshotSubmission(ts);
     };
     tryIfConnected(work);
 }
コード例 #9
0
 private bool IHaveThisSubmission(TargettedSubmission submission)
 {
     if (submissionList.Where(s => s.time == submission.time && s.author == submission.author && s.url == submission.url).ToList().Count > 0)
         return true;
     return false;
 }
コード例 #10
0
 void IReceiveEvents.receiveSubmission(TargettedSubmission ts)
 {
     SubmissionAvailable(this, new SubmissionAvailableEventArgs { submission = ts });
 }
コード例 #11
0
 private void ReceiveSubmission(TargettedSubmission sub)
 {
     if (sub.target == "bannedcontent")
     {
         foreach (var historicallyBannedUser in sub.blacklisted)
         {
             constructPersonFromUsername(historicallyBannedUser.UserName);
         }
     }
     RegisterAction(sub.author);
     RegisterSubmission(sub.author);
 }
コード例 #12
0
 private void ReceiveSubmission(TargettedSubmission submission)
 {
     if (submission.target != "bannedcontent")
         return;
     Dispatcher.adopt(delegate
     {
         submissionList.Add(new PrivacyWrapper(submission, userMapping));
     });
     }
コード例 #13
0
 public ScreenshotSubmission(TargettedSubmission submission)
     : this()
 {
     this.parameters = submission;
 }