public static FormattedParts AddSelectionHighlight(FormattedParts orig) { FormattedParts newParts = Clone(orig); newParts.HasAddrLabelHighlight = true; return(newParts); }
public void Insert(int index, FormattedParts item) { ((IList <FormattedParts>)mList).Insert(index, item); OnPropertyChanged(CountString); OnPropertyChanged(IndexerName); OnCollectionChanged(NotifyCollectionChangedAction.Add, item, index); }
public void Add(FormattedParts item) { ((IList <FormattedParts>)mList).Add(item); OnPropertyChanged(CountString); OnPropertyChanged(IndexerName); OnCollectionReset(); }
public static FormattedParts CreateVisualizationSet(VisualizationSet visSet) { FormattedParts parts = new FormattedParts(); if (visSet.Count == 0) { // should not happen parts.Comment = "!EMPTY VSET!"; parts.IsLongComment = true; } else { string fmt; if (visSet.Count == 1) { fmt = Res.Strings.VIS_SET_SINGLE_FMT; } else { fmt = Res.Strings.VIS_SET_MULTIPLE_FMT; } parts.Comment = string.Format(fmt, "Bitmap", visSet[0].Tag, visSet.Count - 1); parts.VisualizationSet = visSet.ToArray(); parts.IsVisualizationSet = true; } return(parts); }
public static FormattedParts RemoveSelectionAddrHighlight(FormattedParts orig) { FormattedParts newParts = Clone(orig); newParts.HasAddrLabelHighlight = false; return(newParts); }
public static FormattedParts AddSelectionOperHighlight(FormattedParts orig) { FormattedParts newParts = Clone(orig); newParts.HasOperandHighlight = true; return(newParts); }
public static FormattedParts SetFlagsModified(FormattedParts orig) { FormattedParts newParts = Clone(orig); newParts.HasModifiedFlags = true; return(newParts); }
public static FormattedParts RemoveSelectionOperHighlight(FormattedParts orig) { FormattedParts newParts = Clone(orig); newParts.HasOperandHighlight = false; return(newParts); }
protected override void InsertItem(int index, FormattedParts item) { base.InsertItem(index, item); OnPropertyChanged(CountString); OnPropertyChanged(IndexerName); OnCollectionChanged(NotifyCollectionChangedAction.Add, item, index); }
public static FormattedParts CreatePreLabelDirective(string addrStr, string labelStr) { FormattedParts parts = new FormattedParts(); parts.Addr = addrStr; parts.Label = labelStr; return(parts); }
public static FormattedParts CreateLongComment(string comment) { FormattedParts parts = new FormattedParts(); parts.Comment = comment; parts.IsLongComment = true; return(parts); }
public bool Remove(FormattedParts item) { // NotifyCollectionChangedAction.Remove wants an index. We can find the index // of the first matching item and then do a RemoveAt, but this call just isn't // all that interesting for us, so it's easier to ignore it. //return ((IList<FormattedParts>)mList).Remove(item); throw new NotSupportedException(); }
public static FormattedParts CreateDirective(string opstr, string operandStr) { FormattedParts parts = new FormattedParts(); parts.Opcode = opstr; parts.Operand = operandStr; return(parts); }
protected override void SetItem(int index, FormattedParts item) { FormattedParts originalItem = this[index]; base.SetItem(index, item); OnPropertyChanged(IndexerName); OnCollectionChanged(NotifyCollectionChangedAction.Replace, originalItem, item, index); }
public static FormattedParts Create(string longComment) { FormattedParts parts = new FormattedParts(); parts.Comment = longComment; parts.IsSingleLine = true; return(parts); }
public void RemoveAt(int index) { FormattedParts removed = mList[index]; ((IList <FormattedParts>)mList).RemoveAt(index); OnPropertyChanged(CountString); OnPropertyChanged(IndexerName); OnCollectionChanged(NotifyCollectionChangedAction.Remove, removed, index); }
protected override void RemoveItem(int index) { FormattedParts removedItem = this[index]; base.RemoveItem(index); OnPropertyChanged(CountString); OnPropertyChanged(IndexerName); OnCollectionChanged(NotifyCollectionChangedAction.Remove, removedItem, index); }
/// <summary> /// Retrieves the Nth element. /// </summary> private FormattedParts GetEntry(int index) { FormattedParts parts = mList[index]; if (parts == null) { parts = mList[index] = ListGen.GetFormattedParts(index); parts.ListIndex = index; } return(parts); }
public static FormattedParts CreateFullDirective(string label, string opstr, string operandStr, string comment) { FormattedParts parts = new FormattedParts(); parts.Label = label; parts.Opcode = opstr; parts.Operand = operandStr; parts.Comment = comment; return(parts); }
/// <summary> /// Clones the specified object. /// </summary> private static FormattedParts Clone(FormattedParts orig) { FormattedParts newParts = FormattedParts.Create(orig.Offset, orig.Addr, orig.Bytes, orig.Flags, orig.Attr, orig.Label, orig.Opcode, orig.Operand, orig.Comment, orig.mPartFlags); newParts.IsLongComment = orig.IsLongComment; newParts.HasAddrLabelHighlight = orig.HasAddrLabelHighlight; newParts.ListIndex = orig.ListIndex; return(newParts); }
public static FormattedParts CreateNote(string comment, Color color) { FormattedParts parts = new FormattedParts(); parts.Comment = comment; parts.IsLongComment = true; if (color != NoColor) { parts.HasBackgroundColor = true; parts.BackgroundBrush = new SolidColorBrush(color); } return(parts); }
/// <summary> /// Retrieves the Nth element. /// </summary> private FormattedParts GetEntry(int index) { Debug.WriteLine("GEN " + index); if ((index % 10) != 0) { return(FormattedParts.Create("off" + index, "addr" + index, "12 34", "vncidmx", "", "yup:", "LDA", "$1234", "a & b")); } else { return(FormattedParts.Create("yup: This is a long comment line")); } }
// For IList<T>. public FormattedParts this[int index] { get { FormattedParts parts = mList[index]; if (parts == null) { parts = mList[index] = GetEntry(index); } return(parts); } set { FormattedParts orig = mList[index]; mList[index] = value; OnPropertyChanged(IndexerName); OnCollectionChanged(NotifyCollectionChangedAction.Replace, orig, value, index); } }
public static FormattedParts Create(string offset, string addr, string bytes, string flags, string attr, string label, string opcode, string operand, string comment) { FormattedParts parts = new FormattedParts(); parts.Offset = offset; parts.Addr = addr; parts.Bytes = bytes; parts.Flags = flags; parts.Attr = attr; parts.Label = label; parts.Opcode = opcode; parts.Operand = operand; parts.Comment = comment; parts.IsLongComment = false; return(parts); }
public static FormattedParts CreateBlankLine() { FormattedParts parts = new FormattedParts(); return(parts); }
public int IndexOf(FormattedParts item) { return(((IList <FormattedParts>)mList).IndexOf(item)); }
public bool Contains(FormattedParts item) { return(((IList <FormattedParts>)mList).Contains(item)); }