Example #1
0
 private void urlnamebox_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         FetchTarget ft = (FetchTarget)urlnamebox.Items[urlnamebox.SelectedIndex];
         Target = ft;
     }
     catch (InvalidCastException ex) { return; }
 }
Example #2
0
 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;
 }
Example #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);
 }
Example #4
0
        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);
        }
Example #5
0
 public FetchBasket(FetchTarget ft)
 {
     InitializeComponent();
     Target = ft;
 }
Example #6
0
 private void urlnamebox_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         FetchTarget ft = (FetchTarget)urlnamebox.Items[urlnamebox.SelectedIndex];
         Target = ft;
     }
     catch (InvalidCastException ex) { return; }
 }
Example #7
0
        public FetchBasket(FetchTarget ft)
        {
            InitializeComponent();
            Target = ft;

        }