示例#1
0
        //Добавление продукта в список
        private async void AddItemTextBox_KeyUp(object sender, KeyRoutedEventArgs e)
        {
            if (e.Key == Windows.System.VirtualKey.Enter)
            {
                if (this.AddItemTextBox.Text != "")
                {
                    await SampleDataSource.AddItem(this.AddItemTextBox.Text);

                    this.AddItemTextBox.Text = "";
                }
                else
                {
                    await new MessageDialog(App.resourceLoader.GetString("AddEmptyItemError")).ShowAsync();
                }
            }
        }