Beispiel #1
0
        private void OKBtnClick(object sender, RoutedEventArgs e)
        {
            EditPlaceDatas datas = DataContext as EditPlaceDatas;

            m_wd.SQLDatabase.AddTreasure(datas.TreasureList);
            datas.Place.Story = ((TextBox)FindName("StoryText")).Text;
            m_wd.SQLDatabase.SetPlace(datas.Place);
            Close();
        }
Beispiel #2
0
        private void AddTreasureBtnClick(object sender, RoutedEventArgs e)
        {
            EditPlaceDatas datas = DataContext as EditPlaceDatas;
            TreasureItem   ti    = new TreasureItem {
                Treasure = new Treasure {
                    PlaceName = datas.Place.Name
                }, TreasureID = datas.TreasureList.Count
            };

            datas.TreasureList.Add(ti);
        }
Beispiel #3
0
 public EditPlace(Place place, WindowData wd)
 {
     m_wd        = wd;
     DataContext = new EditPlaceDatas(place, wd);
     InitializeComponent();
 }