public NoteProxy(Note note_) { Scb = note_.FormColor; SolidColorBrush SCBBorder = new SolidColorBrush(); SCBBorder.Color = Color.FromArgb(255, (byte)(note_.FormColor.Color.R - 20), (byte)(note_.FormColor.Color.G - 20), (byte)(note_.FormColor.Color.B - 20)); BorderColor = SCBBorder; NotesPr.Add(this); this.Currentnote = note_; if (this.Currentnote.NoteComponent.Children != null) { foreach (var item in this.Currentnote.NoteComponent.Children) { switch (item.GetType().FullName) { case "EveryDayNoteLib.PictNote": this.IsPicture = true; break; case "EveryDayNoteLib.VideoNote": this.IsVideo = true; break; case "EveryDayNoteLib.VoNote": this.IsAudio = true; break; } } } }
public NotePage(MainWindow MW, Note NP) { note = NP; component = NP.NoteComponent; foreach (NoteProxy item in NoteProxy.NotesPr) { if (item.Currentnote == this.note) { NoteProxy.NotesPr.Remove(item); break; } } MainW = MW; this.InitializeComponent(); FieldPanel.Children.Clear(); foreach (NotePart item in this.note.NoteComponent.Children) { FieldPanel.Children.Add(item.RestoreData()); } IsNew = false; }