Пример #1
0
 public void journalNext()
 {
     if (PlayerData.journal2 & PlayerData.currentJournal == 1)
     {
         Journal1.SetActive(false);
         Journal2.SetActive(true);
         PlayerData.currentJournal += 1;
     }
     else if (PlayerData.journal3 & PlayerData.currentJournal == 2)
     {
         Journal2.SetActive(false);
         Journal3.SetActive(true);
         PlayerData.currentJournal += 1;
     }
     else if (PlayerData.journal4 & PlayerData.currentJournal == 3)
     {
         Journal3.SetActive(false);
         Journal4.SetActive(true);
         PlayerData.currentJournal += 1;
     }
     else if (PlayerData.journal5 & PlayerData.currentJournal == 4)
     {
         Journal4.SetActive(false);
         Journal5.SetActive(true);
     }
 }
Пример #2
0
 public void CloseJournal()
 {
     Detective.isMoveEnabled = true;
     buttons.SetActive(true);
     settingsButton.SetActive(true);
     journalButton.SetActive(true);
     Journal1.SetActive(false);
     Journal2.SetActive(false);
     Journal3.SetActive(false);
     Journal4.SetActive(false);
     Journal5.SetActive(false);
 }
Пример #3
0
        public void AddEntryClick(object sender, RoutedEventArgs s)
        {
            if (this.entryTextBox.Text.Equals(""))
            {
                MessageBox.Show("Brak treści wpisu", "Błąd", MessageBoxButton.OK, MessageBoxImage.Error);
                return;
            }

            switch (this.JournalsComboBox.SelectedItem.ToString())
            {
            case ("JOURNAL1"):
                Journal1 entry1 = new Journal1()
                {
                    data     = DateTime.Now,
                    username = currrentUser,
                    entry    = entryTextBox.Text
                };
                db.Journal1.Add(entry1);
                break;

            case ("JOURNAL2"):
                Journal2 entry2 = new Journal2()
                {
                    data     = DateTime.Now,
                    username = currrentUser,
                    entry    = entryTextBox.Text
                };
                db.Journal2.Add(entry2);
                break;

            case ("JOURNAL3"):
                Journal3 entry3 = new Journal3()
                {
                    data     = DateTime.Now,
                    username = currrentUser,
                    entry    = entryTextBox.Text
                };
                db.Journal3.Add(entry3);
                break;

            default:
                MessageBox.Show("Wybierz odpowiedni dziennik", "Błąd", MessageBoxButton.OK, MessageBoxImage.Error);
                break;
            }
            db.SaveChanges();
            mw.ShowJournal();
            this.Close();
        }