Ejemplo n.º 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();
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 3
0
 public EditPlace(Place place, WindowData wd)
 {
     m_wd        = wd;
     DataContext = new EditPlaceDatas(place, wd);
     InitializeComponent();
 }