예제 #1
0
        private async void Button_Clicked_2(object sender, EventArgs e)
        {
            try
            {
                string fileName  = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "temp.txt");
                bool   doesExist = File.Exists(fileName);
                string text      = null;
                if (doesExist == true)
                {
                    text = File.ReadAllText(fileName);
                }


                text += note1.Title.ToString() + "\t" + note1.Description.ToString() + "\t" + note1.Enclosure.ToString() + "\t" + note1.Link + "\n";
                File.WriteAllText(fileName, text);
                DependencyService.Get <Interface1>().LongAlert("Cохранено");
            }
            catch (Exception ex)
            {
                await DisplayAlert("В файле ошибка ", ex.ToString(), "OK");
            }
            finally
            {
                note1           = null;
                frame.IsVisible = false;
            }
        }
예제 #2
0
        private async void Button_Clicked(object sender, EventArgs e)
        {
            note1 = null;
            BindableObject bindableObject = sender as BindableObject;

            if (bindableObject != null)
            {
                note1 = bindableObject.BindingContext as RSSFeedItem;
            }

            Image.Source   = note1.Enclosure;
            TextTitle.Text = note1.Title;
            TextDesc.Text  = note1.Description;
            TextIst.Text   = note1.istochnic;
            //  ImageFrame.HeightRequest = note1.h;
            frame.IsVisible = true;
        }
예제 #3
0
        public async void OnItemTapped(object sender, ItemTappedEventArgs e)
        {
            RSSFeedItem selectedPhone = e.Item as RSSFeedItem;

            if (selectedPhone != null)
            {
                if (selectedPhone.Enclosure != null)
                {
                    if (!ClassSetUpUser.MyWebShow)
                    {
                        await Navigation.PushAsync(new PageMyWeb(selectedPhone));
                    }
                    else
                    {
                        await Navigation.PushAsync(new PageWebView(selectedPhone.Link));
                    }
                }
            }
            //   await Navigation.PushModalAsync(new Page4(selectedPhone.Link));
        }
예제 #4
0
        private async void Button_Clicked(object sender, EventArgs e)
        {
            try
            {
                Button         button         = (Button)sender;
                string         ID             = button.CommandParameter.ToString();
                BindableObject bindableObject = sender as BindableObject;
                if (bindableObject != null)
                {
                    RSSFeedItem note = bindableObject.BindingContext as RSSFeedItem;

                    int x = 0;
                    foreach (var cl in Col1)
                    {
                        if (cl.Title == note.Title)
                        {
                            Col1.RemoveAt(x);
                            break;
                        }
                        x++;
                    }

                    string text      = String.Empty;
                    string fileName  = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "temp.txt");
                    bool   doesExist = File.Exists(fileName);
                    foreach (var cl in Col1)
                    {
                        text += cl.Title.ToString() + "\t" + cl.Description.ToString() + "\t" + cl.Enclosure.ToString() + "\t" + cl.Link + "\n";
                    }
                    File.WriteAllText(fileName, text);
                    DependencyService.Get <Interface1>().LongAlert("Удалено");
                }
            }
            catch (Exception ex)
            {
                await DisplayAlert("В файле ошибка ", ex.ToString(), "OK");
            }
        }
예제 #5
0
 private void Button_Clicked_1(object sender, EventArgs e)
 {
     frame.IsVisible = false;
     note1           = null;
 }
예제 #6
0
 public PageMyWeb(RSSFeedItem rSSFeedItem)
 {
     InitializeComponent();
     myUri2 = rSSFeedItem.Link;
     ist    = rSSFeedItem.istochnic;
 }