Exemple #1
0
        public void uxButtonAddCustomCouplet_Click(object sender, RoutedEventArgs e)
        {
            string inputRead = new Lorry.Helpers.GetInput.InputBox("Add your own").ShowDialog();

            Lorry.Repository.Recents.Recent newRecent = new Repository.Recents.Recent();
            newRecent.RecentContent = inputRead;
            newRecent.RecentDate    = DateTime.Now.ToString("MM.dd.yyyy");
            newRecent.RecentType    = "couplet";

            Lorry.Repository.IDatabaseRepository <Repository.Recents.Recent> addRecent = new Lorry.Repository.Recents.RecentRepository();
            addRecent.Insert(newRecent);
        }
Exemple #2
0
        public void uxButtonGenerateCouplet_Click(object sender, RoutedEventArgs e)
        {
            string returnRecent = GenerateRandom.RandomCouplet;

            Lorry.Repository.Recents.Recent newRecent = new Repository.Recents.Recent();
            newRecent.RecentContent = returnRecent;
            newRecent.RecentDate    = DateTime.Now.ToString("MM.dd.yyyy");
            newRecent.RecentType    = "couplet";

            Lorry.Repository.IDatabaseRepository <Repository.Recents.Recent> addRecent = new Lorry.Repository.Recents.RecentRepository();
            addRecent.Insert(newRecent);
        }
Exemple #3
0
        public void uxButtonGenerateHaiku_Click(object sender, RoutedEventArgs e)
        {
            string      returnRecent = GenerateRandom.RandomHaiku;
            HaikuWindow haikuWindow  = new HaikuWindow();
            MainWindow  mainWindow   = new MainWindow();

            Lorry.Repository.Recents.Recent newRecent = new Repository.Recents.Recent();
            newRecent.RecentContent = returnRecent;
            newRecent.RecentDate    = DateTime.Now.ToString("MM.dd.yyyy");
            newRecent.RecentType    = "haiku";

            Lorry.Repository.IDatabaseRepository <Repository.Recents.Recent> addRecent = new Lorry.Repository.Recents.RecentRepository();
            addRecent.Insert(newRecent);

            Application.Current.MainWindow         = haikuWindow;
            mainWindow.uxExpanderRecent.IsExpanded = true;
        }