Exemplo n.º 1
0
 void Data_Loaded(object sender, RoutedEventArgs e)
 {
     db = new Dcontext("isostore:/Data.sdf");
     if (!db.DatabaseExists())
     {
         db.CreateDatabase();
     }
     RefreshData();
 }
Exemplo n.º 2
0
 private void btn_del(object sender, RoutedEventArgs e)
 {
     using (Dcontext dd = new Dcontext("isostore:/Data.sdf"))
     {
         IQueryable <Data1> DQuery = from ddc in dd.mhs where ddc.kata == textBox1.Text select ddc;
         Data1 DRemove             = DQuery.FirstOrDefault();
         dd.mhs.DeleteOnSubmit(DRemove);
         dd.SubmitChanges();
     }
     NavigationService.GoBack();
 }
Exemplo n.º 3
0
        private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
        {
            db = new Dcontext("isostore:/Data.sdf");
            if (!db.DatabaseExists())
            {
                db.CreateDatabase();
            }
            words = new List <string>();
            foreach (Data1 a in db.mhs)
            {
                words.Add(a.kata.ToString());
            }
            words.Add("Study");
            words.Add("Don't Give Up!");
            words.Add("Nothing is useless");
            words.Add("Fighting!");
            words.Add("Thank you");
            words.Add("Arigatou Goshaimas");
            words.Add("Mathur Nuwun");
            words.Add("I'm still Standing in Here");
            words.Add("Fear is Nothing");
            words.Add("We are born to do something");
            words.Add("Friendship is ");
            words.Add("Sometimes let the storm begone, and you'll see the beautifull rainbow");
            words.Add("I will become ");

            autotxt.ItemsSource = words;
            if (app.Content != null)
            {
                Editor.Text  = (string)app.Content;
                autotxt.Text = "";
            }
            if (app.Filename != "")
            {
                PageTitle.Text = app.Filename;
            }
            else
            {
                PageTitle.Text = "untitled.txt";
            }
            //FeedbackOverlay.VisibilityChanged += FeedbackOverlay_VisibilityChanged;
        }