Exemplo n.º 1
0
        private void createQuestSet_Click(object sender, RoutedEventArgs e)
        {
            capital_city_research_quest q = WorldWorker.CreateNewResearchQuest();

            _ResearchQuest.Add(q);
            questSet.Text = q.QuestSet.ToString();
            _SelectedResearchData.QuestSet = q.QuestSet;
        }
Exemplo n.º 2
0
        private void researchQuestDelete_Click(object sender, RoutedEventArgs e)
        {
            capital_city_research_quest q = researchQuestList.SelectedItem as capital_city_research_quest;

            if (q == null)
            {
                return;
            }
            _ResearchQuest.Remove(q);
        }
Exemplo n.º 3
0
        private void researchQuestNew_Click(object sender, RoutedEventArgs e)
        {
            if (_SelectedResearchData == null)
            {
                return;
            }

            capital_city_research_quest q = WorldWorker.CreateNewResearchQuest(_SelectedResearchData.QuestSet);

            _ResearchQuest.Add(q);
        }
Exemplo n.º 4
0
        private void researchQuestList_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            capital_city_research_quest q = researchQuestList.SelectedItem as capital_city_research_quest;

            if (q == null)
            {
                return;
            }

            researchQuestGrid.DataContext = q;
        }
Exemplo n.º 5
0
 public static capital_city_research_quest CreateNewResearchQuest()
 {
     int id = (from d in DB.LEGACY.capital_city_research_quest select d.QuestSet).Max() + 1;
     capital_city_research_quest q = new capital_city_research_quest();
     q.QuestSet = id;
     q.ID = 0;
     q.Quest = 0;
     // no db saving.
     return q;
 }
Exemplo n.º 6
0
 public static capital_city_research_quest CreateNewResearchQuest(int set)
 {
     int id = (from d in DB.LEGACY.capital_city_research_quest where d.QuestSet == set select d.ID).SingleOrDefault() + 1;
     capital_city_research_quest q = new capital_city_research_quest();
     q.ID = id;
     q.Quest = 0;
     q.QuestSet = set;
     DB.LEGACY.capital_city_research_quest.Add(q);
     DB.LSave();
     return q;
 }