コード例 #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();
        }
コード例 #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);
        }
コード例 #3
0
 public EditPlace(Place place, WindowData wd)
 {
     m_wd        = wd;
     DataContext = new EditPlaceDatas(place, wd);
     InitializeComponent();
 }