public TextTag(TextTag copyTag, long Timestamp) { //copy everything except timestamp author = copyTag.author; id = copyTag.id; privacy = copyTag.privacy; timestamp = Timestamp; }
public TextTag(TextTag copyTag, Privacy newPrivacy) { // copy everything except for privacy author = copyTag.author; id = copyTag.id; timestamp = copyTag.timestamp; privacy = newPrivacy; }
public void tagTest() { PowerpointVideo target = new PowerpointVideo(); // TODO: Initialize to an appropriate value TextTag expected = new TextTag(); // TODO: Initialize to an appropriate value TextTag actual; actual = target.tag(); Assert.AreEqual(expected, actual); Assert.Inconclusive("Verify the correctness of this test method."); }
public void tagTest() { TextBox box = null; // TODO: Initialize to an appropriate value TextTag tag = new TextTag(); // TODO: Initialize to an appropriate value TextTag expected = new TextTag(); // TODO: Initialize to an appropriate value TextTag actual; actual = TextExtensions.tag(box, tag); Assert.AreEqual(expected, actual); Assert.Inconclusive("Verify the correctness of this test method."); }
public static TextTag tag(this TextBox box, TextTag tag) { box.Dispatcher.adopt(delegate { box.Tag = JsonConvert.SerializeObject(tag, new StringEnumConverter()); }); return tag; }
//Image and TextTags are identical, reusing imagetag public static TextTag tag(this TextBox box ) { var texttag = new TextTag(); box.Dispatcher.adopt(delegate { var textInfo = JsonConvert.DeserializeObject<ImageTag>(box.Tag.ToString(), new StringEnumConverter()); texttag = new TextTag { author = textInfo.author, id = textInfo.id, privacy = textInfo.privacy, timestamp = textInfo.timestamp }; }); return texttag; }
public void sendTextWithoutHistory(MeTLTextBox box, string thisPrivacy, int slide) { RemovePrivacyStylingFromElement(box); if (box.tag().privacy != Globals.privacy) dirtyTextBoxWithoutHistory(box); var oldTextTag = box.tag(); var newTextTag = new MeTLLib.DataTypes.TextTag(oldTextTag.author, thisPrivacy, oldTextTag.id); box.tag(newTextTag); var privateRoom = string.Format("{0}{1}", currentSlide, box.tag().author); if(thisPrivacy.ToLower() == "private" && Globals.isAuthor && Globals.me != box.tag().author) Commands.SneakInto.Execute(privateRoom); Commands.SendTextBox.ExecuteAsync(new TargettedTextBox(slide, box.tag().author, target, thisPrivacy, box)); if(thisPrivacy.ToLower() == "private" && Globals.isAuthor && Globals.me != box.tag().author) Commands.SneakOutOf.Execute(privateRoom); }
public TextTag tag() { var newtag = new TextTag(); return newtag; }
private void sendTextWithoutHistory(TextBox box, string thisPrivacy) { RemovePrivacyStylingFromElement(box); if (box.tag().privacy != Globals.privacy) dirtyTextBoxWithoutHistory(box); var oldTextTag = box.tag(); var newTextTag = new MeTLLib.DataTypes.TextTag(oldTextTag.author, thisPrivacy, oldTextTag.id); box.tag(newTextTag); Commands.SendTextBox.ExecuteAsync(new MeTLLib.DataTypes.TargettedTextBox(Globals.location.currentSlide, Globals.me, target, thisPrivacy, box)); }