private void UpdateEntryRSSSources(RSSSources _entry)
 {
     DB.UpdateAsync(_entry).ContinueWith(t => {
         SetProgressBarIndeterminateVisibility(false);
         LoadRSSSources();
     }, uiScheduler);
 }
        private void InsertNewEntryRSSSources(string name, string url, string description)
        {
            SetProgressBarIndeterminateVisibility(true);
            url = url.Contains("http://") ? url : String.Format("{0}" + url, "http://");
            var newRSS = new RSSSources {
                Name = name, Url = url, Description = description, Date = DateTime.Now
            };

            DB.InsertAsync(newRSS).ContinueWith(t => {
                SetProgressBarIndeterminateVisibility(false);
                LoadRSSSources();
            }, uiScheduler);
        }
        private AlertDialog.Builder CreateDialog(string title, RSSSources _source)
        {
            AlertDialog.Builder builder = new AlertDialog.Builder(this);
            builder.SetTitle(title);
            LinearLayout inputLayout = (LinearLayout)LayoutInflater.Inflate(Resource.Layout.NewRSSSourceEntry, null);

            nameInput             = (EditText)inputLayout.FindViewById(Resource.Id.editTextName);
            nameInput.Text        = _source.Name;
            urlInput              = (EditText)inputLayout.FindViewById(Resource.Id.editTextURL);
            urlInput.Text         = _source.Url;
            descriptionInput      = (EditText)inputLayout.FindViewById(Resource.Id.editTextDescription);
            descriptionInput.Text = _source.Description;
            builder.SetView(inputLayout);

            return(builder);
        }
 private string GetUrl(RSSSources rss)
 {
     return(rss.Url);
 }
Example #5
0
 private void UpdateEntryRSSSources(RSSSources _entry)
 {
     DB.UpdateAsync (_entry).ContinueWith (t => {
         SetProgressBarIndeterminateVisibility(false);
         LoadRSSSources();
     }, uiScheduler);
 }
Example #6
0
 private void InsertNewEntryRSSSources(string name, string url, string description)
 {
     SetProgressBarIndeterminateVisibility (true);
     url = url.Contains("http://") ? url : String.Format ("{0}" + url, "http://");
     var newRSS = new RSSSources { Name = name, Url = url, Description = description, Date = DateTime.Now };
     DB.InsertAsync (newRSS).ContinueWith (t => {
         SetProgressBarIndeterminateVisibility(false);
         LoadRSSSources();
     }, uiScheduler);
 }
Example #7
0
 private string GetUrl(RSSSources rss)
 {
     return rss.Url;
 }
Example #8
0
 private object FindEntryRSSSources(string url)
 {
     SetProgressBarIndeterminateVisibility (true);
     var entry = new RSSSources();
     DB.QueryAsync<RSSSources> ("SELECT * FROM RSSSources where URL like '"+url+"'").ContinueWith (t => {
         SetProgressBarIndeterminateVisibility (false);
         entry = t.Result.Select(x=>x).First();
     }, uiScheduler);
     return entry;
 }
Example #9
0
        private AlertDialog.Builder CreateDialog(string title, RSSSources _source)
        {
            AlertDialog.Builder builder = new AlertDialog.Builder (this);
            builder.SetTitle (title);
            LinearLayout inputLayout = (LinearLayout)LayoutInflater.Inflate (Resource.Layout.NewRSSSourceEntry, null);
            nameInput = (EditText)inputLayout.FindViewById (Resource.Id.editTextName);
            nameInput.Text = _source.Name;
            urlInput = (EditText)inputLayout.FindViewById (Resource.Id.editTextURL);
            urlInput.Text = _source.Url;
            descriptionInput = (EditText)inputLayout.FindViewById (Resource.Id.editTextDescription);
            descriptionInput.Text = _source.Description;
            builder.SetView (inputLayout);

            return builder;
        }