Exemplo n.º 1
0
 private void urlnamebox_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         FetchTarget ft = (FetchTarget)urlnamebox.Items[urlnamebox.SelectedIndex];
         Target = ft;
     }
     catch (InvalidCastException ex) { return; }
 }
Exemplo n.º 2
0
        /// <summary>
        /// restore parameters from file or network location.
        /// </summary>
        /// <param name="msg"></param>
        /// <returns></returns>
        public static FetchTarget Deserialize(string msg)
        {
            string[]    r  = msg.Split(',');
            FetchTarget ft = new FetchTarget();

            if (r.Length != Enum.GetNames(typeof(ftfield)).Length)
            {
                return(ft);
            }
            ft.ParseNASD     = Convert.ToBoolean(r[(int)ftfield.nasd]);
            ft.ParseNYSE     = Convert.ToBoolean(r[(int)ftfield.nyse]);
            ft.Url           = r[(int)ftfield.url];
            ft.Name          = r[(int)ftfield.name];
            ft.RemoveDupes   = Convert.ToBoolean(r[(int)ftfield.xdupe]);
            ft.ClickableOnly = Convert.ToBoolean(r[(int)ftfield.linked]);
            return(ft);
        }
Exemplo n.º 3
0
 public bool NameInUse(string newname)
 {
     foreach (object i in urlnamebox.Items)
     {
         try
         {
             FetchTarget ft = (FetchTarget)i;
             if (newname == ft.Name)
             {
                 return(true);
             }
             continue;
         }
         catch (InvalidCastException) { continue; }
     }
     return(false);
 }
Exemplo n.º 4
0
        private void urlnamebox_SelectedIndexChanged(object sender, EventArgs e)
        {
#if DEBUG
#else
            try
#endif
            {
                FetchTarget ft = (FetchTarget)urlnamebox.Items[urlnamebox.SelectedIndex];
                Target = ft;
            }
#if DEBUG
#else
            catch (InvalidCastException)
            {
                return;
            }
#endif
        }
Exemplo n.º 5
0
        private void urlnamebox_SelectedIndexChanged(object sender, EventArgs e)
        {
#if DEBUG
#else
            try
#endif
            {
                FetchTarget ft = (FetchTarget)urlnamebox.Items[urlnamebox.SelectedIndex];
                Target = ft;
            }
#if DEBUG

#else
            catch (InvalidCastException)
            {
                return;
            }
#endif
        }
Exemplo n.º 6
0
        public FetchBasket(FetchTarget ft)
        {
            InitializeComponent();
            Target = ft;

        }
Exemplo n.º 7
0
 /// <summary>
 /// restore parameters from file or network location.
 /// </summary>
 /// <param name="msg"></param>
 /// <returns></returns>
 public static FetchTarget Deserialize(string msg)
 {
     string[] r = msg.Split(',');
     FetchTarget ft = new FetchTarget();
     if (r.Length != Enum.GetNames(typeof(ftfield)).Length) return ft;
     ft.ParseNASD = Convert.ToBoolean(r[(int)ftfield.nasd]);
     ft.ParseNYSE = Convert.ToBoolean(r[(int)ftfield.nyse]);
     ft.Url = r[(int)ftfield.url];
     ft.Name = r[(int)ftfield.name];
     ft.RemoveDupes = Convert.ToBoolean(r[(int)ftfield.xdupe]);
     ft.ClickableOnly = Convert.ToBoolean(r[(int)ftfield.linked]);
     return ft;
 }
Exemplo n.º 8
0
 private void urlnamebox_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         FetchTarget ft = (FetchTarget)urlnamebox.Items[urlnamebox.SelectedIndex];
         Target = ft;
     }
     catch (InvalidCastException ex) { return; }
 }
Exemplo n.º 9
0
 public FetchBasket(FetchTarget ft)
 {
     InitializeComponent();
     Target = ft;
 }