public void AddItem(IParagraphBase paraItem) { if ((base.OwnerParagraph != null) && ((this.paragraphItemCollection_1 == null) || !this.paragraphItemCollection_1.Contains(paraItem))) { Paragraph ownerParagraph = base.OwnerParagraph; int index = base.method_5(); if (this.m_format.CommentId == -1) { int num4 = Class323.smethod_0().Next(); this.m_format.CommentId = num4; CommentMark entity = new CommentMark(base.m_doc, num4) { Type = CommentMarkType.CommentStart }; CommentMark mark3 = new CommentMark(base.m_doc, num4) { Type = CommentMarkType.CommentEnd }; ownerParagraph.Items.Insert(index, mark3); ownerParagraph.Items.Insert(index, entity); } index = base.method_5(); if (ownerParagraph.Items[index - 1] is CommentMark) { int commentId = this.m_format.CommentId; if (paraItem.OwnerParagraph == null) { this.method_32(ownerParagraph, index - 1, paraItem); } else if ((ownerParagraph.Items.Count > (index + 1)) && (paraItem == ownerParagraph.Items[index + 1])) { ownerParagraph.Items.RemoveAt(index + 1); this.method_32(ownerParagraph, index - 1, paraItem); } else { CommentMark mark = this.method_33(index, commentId, ownerParagraph.Items); if ((mark != null) && (paraItem == ownerParagraph.Items[mark.method_5() - 1])) { int num = mark.method_5(); ownerParagraph.Items.RemoveAt(num - 1); this.method_32(ownerParagraph, num, paraItem); } else { ParagraphBase base2 = paraItem.Clone() as ParagraphBase; this.method_32(ownerParagraph, index - 1, base2); } } } } }
internal void method_30() { List <Comment> list = new List <Comment>(); foreach (Comment comment2 in this.ReplyCommentItems) { if (Class323.smethod_1().ContainsKey(comment2.Format.CommentId)) { int num = Class323.smethod_1()[comment2.Format.CommentId]; using (IEnumerator enumerator4 = base.OwnerParagraph.ChildObjects.GetEnumerator()) { DocumentObject current; while (enumerator4.MoveNext()) { current = (DocumentObject)enumerator4.Current; if ((current is Comment) && ((current as Comment).Format.CommentId == num)) { goto Label_00A6; } } continue; Label_00A6: list.Add(current as Comment); continue; } } using (IEnumerator enumerator3 = base.OwnerParagraph.ChildObjects.GetEnumerator()) { DocumentObject obj3; while (enumerator3.MoveNext()) { obj3 = (DocumentObject)enumerator3.Current; if ((obj3 is Comment) && ((obj3 as Comment).Format.CommentId == comment2.Format.CommentId)) { goto Label_0125; } } continue; Label_0125: list.Add(obj3 as Comment); } } this.ReplyCommentItems.Clear(); foreach (Comment comment in list) { this.ReplyCommentItems.method_6(comment); comment.ByRepliedComment = this; } }
protected override object CloneImpl() { CommentMark mark = (CommentMark)base.CloneImpl(); if (this.int_4 != -1) { if (this.commentMarkType_0 == CommentMarkType.CommentStart) { mark.CommentId = Class323.smethod_6(this.int_4, true); return(mark); } mark.CommentId = Class323.smethod_6(this.int_4, false); } return(mark); }
private bool method_5(IDocument A_0, int A_1) { foreach (Section section in A_0.Sections) { foreach (Paragraph paragraph in section.Body.Paragraphs) { foreach (IParagraphBase base2 in paragraph.Items) { Comment comment = base2 as Comment; if ((comment != null) && (comment.Format.CommentId == A_1)) { return(true); } } } } return(Class323.smethod_1().ContainsKey(A_1)); }
public CommentFormat Clone(IDocument doc) { CommentFormat format = new CommentFormat { string_4 = this.string_4, string_3 = this.string_3, dateTime_0 = this.dateTime_0, int_6 = this.int_6, int_5 = this.int_5 }; if ((doc != base.Document) && !this.method_5(doc, this.int_7)) { format.int_7 = this.int_7; return(format); } format.int_7 = Class323.smethod_4(this.int_7); return(format); }
internal static Class120.Enum11 smethod_4(string string_1) { Class120.Enum11 @enum = (Class120.Enum11) 0; string_1 = string_1.ToUpper().Trim(); string_1 += "-"; checked { Class120.Enum11 result; if (string_1.Length != 30) { result = @enum; } else { int num = 0; while (true) { IL_9E: int num2 = 0; while (Class323.smethod_13((byte)Strings.Asc(string_1[num * 6 + num2])) | Versioned.IsNumeric(Strings.Asc(string_1[num * 6 + num2]))) { num2++; if (num2 > 4) { if (Operators.CompareString(Conversions.ToString(string_1[num * 6 + 5]), "-", false) != 0) { goto IL_A9; } num++; if (num <= 4) { goto IL_9E; } goto IL_B0; } } break; } result = @enum; return(result); IL_A9: result = @enum; return(result); IL_B0: string_1 = Strings.Left(string_1, string_1.Length - 1); MD5 mD = MD5.Create(); byte[] array = mD.ComputeHash(Encoding.ASCII.GetBytes(string_1)); string text = string.Empty; int num3 = array.Length - 1; for (int i = 0; i <= num3; i++) { text += array[i].ToString("X2"); } text = text.ToLower(); if (Class120.class325_0.method_0(text)) { result = (Class120.Enum11) 1; } else if (Class120.class325_1.method_0(text)) { result = (Class120.Enum11) 2; } else { result = @enum; } } return(result); } }
public abstract void Visit(Class323 c);
public override void Visit(Class323 c) { }
internal void method_6() { this.int_7 = Class323.smethod_0().Next(); }