示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            openFileDialog1.InitialDirectory = @"D:\Linkoping University\Information Visualization\Project\data\";
            openFileDialog1.Title            = "Select two files";
            openFileDialog1.Filter           = "Database Files|*.bin";

            if (openFileDialog1.ShowDialog() != DialogResult.Cancel)
            {
                if (saveFileDialog1.ShowDialog() != DialogResult.Cancel)
                {
                    saveFileDialog1.Filter = "Database Files|*.bin";
                    string outputFilename = saveFileDialog1.FileName;
                    //bool done = MusicDBParser.SynchronizeDBs(filenames[0], filenames[1], outputFilename);
                    bool done = MusicDBParser.FilterDB(openFileDialog1.FileName, outputFilename);
                    if (done)
                    {
                        MessageBox.Show("Database filtered succesfully (I hope :P)");
                    }
                    else
                    {
                        MessageBox.Show("Something went wrong :S !!!");
                    }
                }
            }
        }
示例#2
0
        public Form1()
        {
            InitializeComponent();

            //set all the styles to selected
            this.styleCheckBoxList.SetItemChecked(0, true);
            this.styleCheckBoxList.SetItemChecked(1, true);
            this.styleCheckBoxList.SetItemChecked(2, true);
            this.styleCheckBoxList.SetItemChecked(3, true);
            this.styleCheckBoxList.SetItemChecked(4, true);
            this.styleCheckBoxList.SetItemChecked(5, true);
            this.styleCheckBoxList.SetItemChecked(6, true);
            this.styleCheckBoxList.SetItemChecked(7, true);
            this.styleCheckBoxList.SetItemChecked(8, true);
            this.styleCheckBoxList.SetItemChecked(9, true);
            this.styleCheckBoxList.SetItemChecked(10, true);
            this.outputBox.Text = "Ready.\r\n";

            iThreadList  = new Hashtable();
            iParser      = new MusicDBParser(this);
            queryOnGoing = false;
        }