Beispiel #1
0
        public override string ToString()
        {
            var sb = new StringBuilder();

            sb.AppendLine("笔记本名称:" + Name);
            sb.AppendLine("笔记本路径:" + Path);
            sb.AppendLine("笔记本中笔记的数目:" + NotesNum);
            sb.AppendLine("笔记本创建时间:" + DateUtils.ConvertFromSecondsToLocalDatetime(CreateTime));
            sb.AppendLine("笔记本最后修改时间:" + DateUtils.ConvertFromSecondsToLocalDatetime(ModifyTime));

            return(sb.ToString());
        }
Beispiel #2
0
        public override string ToString()
        {
            var sb = new StringBuilder();

            sb.AppendLine("笔记标题:" + Title);
            sb.AppendLine("笔记作者:" + Author);
            sb.AppendLine("笔记来源 URL:" + Source);
            sb.AppendLine("笔记大小:" + Size / 1024 + " KB");
            sb.AppendLine("笔记创建时间:" + DateUtils.ConvertFromSecondsToLocalDatetime(CreateTime));
            sb.AppendLine("笔记最后修改时间:" + DateUtils.ConvertFromSecondsToLocalDatetime(ModifyTime));
            sb.AppendLine("笔记内容前 100 个字符:" + Content.Substring(0, (Content.Length > 100) ? 100 : Content.Length));

            return(sb.ToString());
        }
        private void appBarBtnViewNoteInfo_Click(object sender, EventArgs e)
        {
            var ucNoteDetail = new ViewNoteDetail()
            {
                Source       = NoteEntity.Source,
                Author       = NoteEntity.Author,
                CreatedTime  = DateUtils.ConvertFromSecondsToLocalDatetime(NoteEntity.CreateTime),
                ModifiedTime = DateUtils.ConvertFromSecondsToLocalDatetime(NoteEntity.ModifyTime),
                Notebook     = NoteEntity.NotebookName,
                WordCount    = NoteEntity.Content.Length
            };
            var messagePrompt = new MessagePrompt
            {
                Title      = "笔记信息",
                Body       = ucNoteDetail,
                Background = new SolidColorBrush(ConstantPool.AppForeColor)
            };

            messagePrompt.Show();
        }