コード例 #1
0
        public NoteManager(string ID)
        {
            InitializeComponent();
            EditingNote = noteLogic.GetNote(noteRepository.GetNote(ID));
            NoteDescriptionTextBox.Text = EditingNote.Description;
            NoteTitleTextBox.Text       = EditingNote.Name;
            BrushConverter bc    = new BrushConverter();
            Brush          brush = (Brush)bc.ConvertFrom(EditingNote.DarkColor.ToString());

            brush.Freeze();
            Brush brush1 = (Brush)bc.ConvertFrom(EditingNote.LightColor.ToString());

            brush.Freeze();
            this.SecondaryEditStack.Background     = brush;
            this.NoteDescriptionTextBox.Background = brush1;
            WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;
            Editing = true;
        }
コード例 #2
0
ファイル: NoteLogicTests.cs プロジェクト: Alireza1044/AP96972
 public void GetNoteTest()
 {
     Assert.AreEqual(noteLogic.GetNote(note).Name, noteViewModel.Name);
     Assert.AreEqual(noteLogic.GetNote(note).Description, noteViewModel.Description);
     Assert.AreEqual(noteLogic.GetNote(note).ID, noteViewModel.ID);
 }