コード例 #1
0
        private void ListPaths(int depth)
        {
            lbPathsUsedList.Items.Clear();
            var paths = DatabaseDataMigrate.GetDirectories(Connection, depth);

            // ReSharper disable once CoVariantArrayConversion
            lbPathsUsedList.Items.AddRange(paths.ToArray());
        }
コード例 #2
0
        private void BtUpdateFileLocation_Click(object sender, EventArgs e)
        {
            FormProgressBackground.Execute(this,
                                           DatabaseDataMigrate.UpdateSongLocations(fbdDirectory, Connection),
                                           DBLangEngine.GetMessage("msgDatabaseUpdate", "Database update|A message describing that the software is updating it's database."),
                                           DBLangEngine.GetMessage("msgProgressPercentage",
                                                                   "Progress: {0} %|A message describing some operation progress in percentage."));

            // indicate to the user that a software restart is required..
            tbRestartRequired.Visible = true;

            // indicate that the application should be restarted after the operation..
            FormMain.RestartRequired = true;
        }
コード例 #3
0
        private void BtDeleteNonExistingSongs_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show(
                    DBLangEngine.GetMessage("msgQueryUserDeleteNonExistingSongs",
                                            "Really delete non-existing files from the database?|A message requesting for user confirmation to delete non-existing files from the database."),
                    DBLangEngine.GetMessage("msgConfirmation",
                                            "Confirm|Used in a dialog title to ask for a confirmation to do something"),
                    MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button2) ==
                DialogResult.Yes)
            {
                // indicate to the user that a software restart is required..
                tbRestartRequired.Visible = true;

                FormProgressBackground.Execute(this,
                                               DatabaseDataMigrate.DeleteNonExistingSongs(Connection),
                                               DBLangEngine.GetMessage("msgDatabaseUpdate", "Database update|A message describing that the software is updating it's database."),
                                               DBLangEngine.GetMessage("msgProgressPercentage",
                                                                       "Progress: {0} %|A message describing some operation progress in percentage."));

                // indicate that the application should be restarted after the operation..
                FormMain.RestartRequired = true;
            }
        }