Esempio n. 1
0
        private void mnuOpen_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();

            ofd.Filter = "*.tdb|*.tdb";
            if (ofd.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            if (!Tdb.LoadTdbFromFile(ofd.FileName))
            {
                return;
            }
            lblFile.Text      = ofd.FileName;
            lblFile.ForeColor = Control.DefaultForeColor;
            lblLine.Text      = "-";
            mnuSave.Enabled   = true;
            mnuSaveAs.Enabled = true;
            listBox1.Items.Clear();
            foreach (var t in Tdb.lstTdb)
            {
                listBox1.Items.Add(t.Item1);
            }
            txtSearch.Enabled = true;
            txtSearch.Clear();
            btnNext.Enabled          = false;
            lblSearchResults.Visible = false;
        }
Esempio n. 2
0
 private void mnuSave_Click(object sender, EventArgs e)
 {
     if (Tdb.SaveTdbToFile(lblFile.Text))
     {
         lblFile.ForeColor = Color.Blue;
     }
 }
Esempio n. 3
0
        private void mnuSaveAs_Click(object sender, EventArgs e)
        {
            SaveFileDialog sfd = new SaveFileDialog();

            sfd.Filter = "*.tdb|*.tdb";
            if (sfd.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            if (Tdb.SaveTdbToFile(sfd.FileName))
            {
                lblFile.Text      = sfd.FileName;
                lblFile.ForeColor = Color.Blue;
            }
        }