示例#1
0
        private void List_monsters_Click(object sender, RoutedEventArgs e)
        {
            MonsterWindow mw = new MonsterWindow(cbox.SelectedItem as Witcher, token);

            mw.Show();
            this.Close();
        }
示例#2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Monster m = new Monster()
            {
                Name = mName.Text, Bounty = int.Parse(mBounty.Text), Threat = int.Parse(mThreat.Text), WitcherID = w.WitcherID
            };

            RestService restservice = new RestService("https://androidfelevesendpoints.azurewebsites.net/", "/Achi");

            restservice.Post <Monster>(m);

            MonsterWindow mw = new MonsterWindow(w, token);

            mw.Show();
            mw.Close();
            this.Close();

            mw = new MonsterWindow(w, token);
            mw.Show();
        }