コード例 #1
0
ファイル: ProjectFile.cs プロジェクト: golegen/6502bench
 public SerMultiLineComment(MultiLineComment mlc)
 {
     Text            = mlc.Text;
     BoxMode         = mlc.BoxMode;
     MaxWidth        = mlc.MaxWidth;
     BackgroundColor = ColorToInt(mlc.BackgroundColor);
 }
コード例 #2
0
        /// <summary>
        /// Creates an UndoableChange for a note update.
        /// </summary>
        /// <param name="offset">Affected offset.</param>
        /// <param name="oldNote">Current note.</param>
        /// <param name="newNote">New note.</param>
        /// <returns>Change record.</returns>
        public static UndoableChange CreateNoteChange(int offset,
                                                      MultiLineComment oldNote, MultiLineComment newNote)
        {
            if (oldNote == newNote)
            {
                Debug.WriteLine("No-op note change at +" + offset.ToString("x6") +
                                ": " + oldNote);
            }

            UndoableChange uc = new UndoableChange();

            uc.Type               = ChangeType.SetNote;
            uc.Offset             = offset;
            uc.OldValue           = oldNote;
            uc.NewValue           = newNote;
            uc.ReanalysisRequired = ReanalysisScope.None;
            return(uc);
        }
コード例 #3
0
        /// <summary>
        /// Creates an UndoableChange for a long comment update.
        /// </summary>
        /// <param name="offset">Affected offset.</param>
        /// <param name="oldComment">Current comment.</param>
        /// <param name="newComment">New comment.</param>
        /// <returns>Change record.</returns>
        public static UndoableChange CreateLongCommentChange(int offset,
                                                             MultiLineComment oldComment, MultiLineComment newComment)
        {
            if (oldComment == newComment)
            {
                Debug.WriteLine("No-op long comment change at +" + offset.ToString("x6") +
                                ": " + oldComment);
            }

            UndoableChange uc = new UndoableChange();

            uc.Type               = ChangeType.SetLongComment;
            uc.Offset             = offset;
            uc.OldValue           = oldComment;
            uc.NewValue           = newComment;
            uc.ReanalysisRequired = ReanalysisScope.None;
            return(uc);
        }