Esempio n. 1
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            // click add device token event
            DeviceTokenEditWindow win = new DeviceTokenEditWindow();

            win.Callback = (string token) =>
            {
                TokenItem item = new TokenItem();
                item.Token = token;
                this.tokenListView.Items.Add(item);
            };

            win.ShowDialog();
        }
Esempio n. 2
0
        // click ListView item
        private void onListViewItemClick(object sender, MouseButtonEventArgs e)
        {
            if (this.tokenListView.SelectedIndex >= 0)
            {
                TokenItem item = (TokenItem)this.tokenListView.SelectedItem;

                DeviceTokenEditWindow win = new DeviceTokenEditWindow(item.Token);
                win.Callback = (string token) =>
                {
                    item.Token = token;
                    this.tokenListView.Items.Refresh();
                };

                win.ShowDialog();
            }
        }