Exemplo n.º 1
0
        public void SwitchValueChanged(object sender, EventArgs e)
        {
            UISwitch        uiSwitch    = (UISwitch)sender;
            UITableViewCell uiTableCell = (UITableViewCell)((UIView)uiSwitch.Superview).Superview;

            UILabel lbH = uiTableCell.ViewWithTag(204) as UILabel;

            if (lbH != null && !String.IsNullOrEmpty(lbH.Text))
            {
                UITableView uiTableView        = (UITableView)uiTableCell.Superview;
                EinstellungenListDataSource ds = uiTableView.DataSource as EinstellungenListDataSource;

                int feedID = int.Parse(lbH.Text);

                WSFeedConfig.FeedConfig feedConfig = ds.ViewData.Where(p => p.FeedID == feedID).FirstOrDefault();
                if (feedConfig != null)
                {
                    feedConfig.IsActive = uiSwitch.On;
                }
            }
        }
        private void BindMyData()
        {
            dsEinstellungenList = new EinstellungenListDataSource();
            dsEinstellungenList.LoadData();
            tblEinstellungen.DataSource = dsEinstellungenList;
            tblEinstellungen.ReloadData();

            AppConfig appConfig = new Config(this).GetAppConfig();

            swAutoDownload.On = appConfig.DataAutomaticUpdate;
        }