예제 #1
0
        /// <summary>
        /// Opens up the DetailsForm so you can edit a feed
        /// </summary>
        private void editSite(object obj, EventArgs ea)
        {
            if (listBox.SelectedIndices == null)
            {
                return;
            }
            if (listBox.SelectedIndices.Count <= 0)
            {
                return;
            }
            int iItem = listBox.SelectedIndices[0];
            int ID    = 0;
            //find the index of the item in question
            string tempText;

            for (int i = 0; i < 100; i++)
            {
                using (Settings xmlreader = new MPSettings())
                {
                    tempText = xmlreader.GetValueAsString("rss", "siteName" + i, "");
                    if (tempText == (string)listBox.Items[iItem])
                    {
                        ID = i;
                        break;
                    }
                }
            }
            DetailsForm form = new DetailsForm(this, ID);

            form.ShowDialog(this.Parent);
            listBox.Items.Clear();
            PopulateFields();
        }
예제 #2
0
 /// <summary>
 /// Opens up the Details for so you can add a new feed.
 /// </summary>
 private void addSite(object obj, EventArgs ea)
 {
   form = new DetailsForm(this, -1);
   form.ShowDialog(this.Parent);
   listBox.Items.Clear();
   PopulateFields();
 }
예제 #3
0
 /// <summary>
 /// Opens up the Details for so you can add a new feed.
 /// </summary>
 private void addSite(object obj, EventArgs ea)
 {
     form = new DetailsForm(this, -1);
     form.ShowDialog(this.Parent);
     listBox.Items.Clear();
     PopulateFields();
 }
예제 #4
0
 /// <summary>
 /// Opens up the DetailsForm so you can edit a feed
 /// </summary>
 private void editSite(object obj, EventArgs ea)
 {
   if (listBox.SelectedIndices == null)
   {
     return;
   }
   if (listBox.SelectedIndices.Count <= 0)
   {
     return;
   }
   int iItem = listBox.SelectedIndices[0];
   int ID = 0;
   //find the index of the item in question
   string tempText;
   for (int i = 0; i < 100; i++)
   {
     using (Settings xmlreader = new MPSettings())
     {
       tempText = xmlreader.GetValueAsString("rss", "siteName" + i, "");
       if (tempText == (string)listBox.Items[iItem])
       {
         ID = i;
         break;
       }
     }
   }
   DetailsForm form = new DetailsForm(this, ID);
   form.ShowDialog(this.Parent);
   listBox.Items.Clear();
   PopulateFields();
 }