本文整理汇总了C#中Note.setLastChangeDate方法的典型用法代码示例。如果您正苦于以下问题:C# Note.setLastChangeDate方法的具体用法?C# Note.setLastChangeDate怎么用?C# Note.setLastChangeDate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Note
的用法示例。
在下文中一共展示了Note.setLastChangeDate方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: createFirstNote
public static Note createFirstNote(Activity activity)
{
TLog.v(TAG, "Creating first note");
Note note = new Note();
note.setTitle(activity.GetString(Resource.String.firstNoteTitle));
// FIXME as soon as we can create notes, make sure GUID is unique! - we are referencing this UUID elsewhere, don't forget to check!
note.setGuid("8f837a99-c920-4501-b303-6a39af57a714");
note.setLastChangeDate("2010-10-09T16:50:12.219-04:00");
// reconstitute HTML in note content
string[] contentarray = activity.Resources.GetStringArray(Resource.Array.firstNoteContent);
string content = TextUtils.Join("\n", contentarray);
content = content.Replace("(?m)^=(.+)=$", "<size:large>$1</size:large>")
.Replace("(?m)^-(.+)$", "<list-item dir=\"ltr\">$1</list-item>")
.Replace("/list-item>\n<list-item", "/list-item><list-item")
.Replace("(<list-item.+</list-item>)", "<list>$1</list>")
.Replace("/list-item><list-item", "/list-item>\n<list-item");
note.setXmlContent(content);
return note;
}
示例2: createNewNote
public static Note createNewNote(Context context, string title, string xmlContent)
{
TLog.v(TAG, "Creating new note");
Note note = new Note();
neverSaved = true;
note.setTitle(title);
UUID newid = UUID.RandomUUID();
note.setGuid(newid.ToString());
note.setLastChangeDate();
note.setXmlContent(xmlContent);
return note;
}