コード例 #1
0
        private void btnGetList_Click(object sender, EventArgs e)
        {
            OpenFileDialog of    = new OpenFileDialog();
            List <Article> list2 = new List <Article>();

            try
            {
                if (of.ShowDialog() == DialogResult.OK)
                {
                    list2 = GetLists.FromTextFile(of.FileName);

                    foreach (Article a in list2)
                    {
                        lbRemove.Items.Add(a);
                    }
                }
            }
            catch (Exception ex)
            {
                ErrorHandler.Handle(ex);
            }
        }
コード例 #2
0
 /// <summary>
 /// Returns a list of articles using GetLists.FromVariant
 /// </summary>
 /// <param name="What">Which source to use</param>
 /// <param name="Params">Optional parameters, depend on source</param>
 public void GetList(GetLists.From what, params string[] params1)
 {
     GetList(what, -1, params1);
 }
コード例 #3
0
        /// <summary>
        /// Returns a list of articles using GetLists.FromVariant
        /// </summary>
        /// <param name="What">Which source to use</param>
        /// <param name="Limit">Max. number of pages to return, -1 if no limit</param>
        /// <param name="Params">Optional parameters, depend on source</param>
        public void GetList(GetLists.From what, int limit, params string[] params1)
        {
            objParam1 = what;
            objParam2 = params1;
            intParam = limit;

            if (HasUI) ui = new PleaseWait();
            if (HasUI) ui.Show(Variables.MainForm as Form);
            InitThread(new ThreadStart(GetListFunc));
        }