Example #1
0
        public void Start(SVBookLibrary lib)
        {
            Library = lib;
            LocalDb = lib.GetLocalFileDatabase();
            updaterSelectFiles1.Library = lib;

            if (lib.Status == SVBookLibrary.DBStatus.Idle ||
                lib.Status == SVBookLibrary.DBStatus.Stopped)
            {
                lib.FetchRemote(new SVBookLibrary.OnStringCompletedDelegate(OnStepCompletedAsync));
                SelectTab(0);
            }
            else if (lib.Status == SVBookLibrary.DBStatus.Fetching)
            {
                if (Library.Callback == null)
                {
                    Library.Callback = new SVBookLibrary.OnStringCompletedDelegate(OnStepCompletedAsync);
                }
                SelectTab(0);
            }
            else if (lib.Status == SVBookLibrary.DBStatus.Updated)
            {
                SelectTab(1);
                updaterSelectFiles1.UpdateLists();
            }

            updaterGetStatus1.SetStatus(lib.Status, "Error");
        }
Example #2
0
        // starts
        public void Start(SVBookLibrary lib)
        {
            Library = lib;

            progressBar1.Minimum = 0;
            progressBar1.Maximum = FilesToDownload.Count;
            progressBar1.Value   = 0;
            DownloadNextFile();
        }
Example #3
0
        private void button2_Click(object sender, EventArgs e)
        {
            SaveFileDialog d = new SaveFileDialog();

            d.FileName = "root.txt";
            if (d.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                string str = SVBookLibrary.DBToString(Library.GetLocalFileDatabase());
                File.WriteAllText(d.FileName, str);
            }
        }