Exemplo n.º 1
0
        //SampleDataSource sds;
        public BlankPage1()
        {
            this.InitializeComponent();
            //have we initialize the main source?     
            SampleDataSource sds = new SampleDataSource();
            
            for (int i = 1; i <= 3; i++)
                sds.AddGroup(i, 4);

            cvsMain.Source = sds.grps;
        }
Exemplo n.º 2
0
        private async void AddListTextBox_KeyUp(object sender, KeyRoutedEventArgs e)
        {
            if (e.Key == Windows.System.VirtualKey.Enter)
            {
                if (this.AddListTextBox.Text != "")
                {
                    string ListTile = this.AddListTextBox.Text;
                    ListTile = Regex.Replace(ListTile, @"\s+", " ");
                    await SampleDataSource.AddGroup(ListTile);

                    this.AddListTextBox.Text      = "";
                    this.AddListTextBox.IsEnabled = false;
                    this.AddListTextBox.IsEnabled = true;
                }
                else
                {
                    await new MessageDialog(App.resourceLoader.GetString("AddEmptyGroupError")).ShowAsync();
                }
            }
        }