Ejemplo n.º 1
0
 public Location GetLocationByShout(DragonShout shout)
 {
     using (SQLiteConnection conn = new SQLiteConnection(App.DatabaseLocation))
     {
         return(conn.Table <Location>().Where(x => shout.WordWallLocation.Contains(x.LocationName)).FirstOrDefault());
     }
 }
Ejemplo n.º 2
0
        private void CheckBox_CheckedChanged(object sender, CheckedChangedEventArgs e)
        {
            var         ss           = new ShoutService();
            var         shoutChecked = (CheckBox)sender;
            DragonShout shout        = shoutChecked.BindingContext as DragonShout;

            ss.UpdateShoutCheck(shoutChecked.IsChecked, shout);
        }
Ejemplo n.º 3
0
 public void UpdateShoutCheck(bool check, DragonShout shout)
 {
     using (SQLiteConnection conn = new SQLiteConnection(App.DatabaseLocation))
     {
         var result = conn.Table <DragonShout>().Where(x => x.ID == shout.ID).FirstOrDefault();
         result.Check = check;
         conn.Update(result);
     }
 }
Ejemplo n.º 4
0
        public ShoutPage(DragonShout shout)
        {
            Shout = shout;
            InitializeComponent();
            var ss = new ShoutService();

            ShoutLocation       = ss.GetLocationByShout(Shout);
            this.BindingContext = new ShoutViewModel(Shout);
        }
Ejemplo n.º 5
0
        public ShoutViewModel(DragonShout shout)
        {
            Shout = shout;
            var ss = new ShoutService();

            ShoutLocation = ss.GetLocationByShout(Shout);
            if (ShoutLocation == null)
            {
                return;
            }
            HasLocationlink = true;
        }