예제 #1
0
파일: Events.cs 프로젝트: kicka5h/Lorry
        public void uxCoupletList_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            MainWindow mainWindow = new MainWindow();

            Lorry.Repository.IDatabaseRepository <Repository.Recents.Recent> getRecent = new Lorry.Repository.Recents.RecentRepository();

            Main.Recent item = (Main.Recent)mainWindow.uxCoupletList.Items.CurrentItem;
            classContent = item.RecentContent;

            EditPoem editPoem = new EditPoem();

            editPoem.Show();
        }
예제 #2
0
파일: Events.cs 프로젝트: kicka5h/Lorry
        public void uxSaveEditedButton_Click(object sender, RoutedEventArgs e)
        {
            EditPoem editPoem = new EditPoem();

            Lorry.Repository.IDatabaseRepository <Repository.Recents.Recent> getRecent = new Lorry.Repository.Recents.RecentRepository();
            Main.Recent newRecent = MainViewModel.Recents.Where(t => t.RecentContent == classContent).SingleOrDefault();

            newRecent.RecentContent = editPoem.uxTextBoxEditPoem.Text;
            newRecent.RecentId      = newRecent.RecentId;

            MainViewModel.SaveRecent(newRecent);

            this.Close();
        }