Exemple #1
0
    protected void OnLoadURLButtonClicked(object sender, EventArgs e)
    {
        string url = TableURLEntry.Text;

        if (usedurls.Contains(url))
        {
            MessageDialogHelper.ErrorDialog(this, ButtonsType.Close, "Error: Table already loaded");
        }
        else
        {
            try
            {
                BMSTable downloadedtable = new BMSTable(url);

                usedurls.Add(url);
                tables.Add(downloadedtable.TableName, downloadedtable);
                TableSelectorComboBox.AppendText(downloadedtable.TableName);
                TableURLEntry.Text = "";

                MessageDialogHelper.InfoDialog(this, ButtonsType.Close, "Table added successfully");
            }
            catch (Exception ex)
            {
                //TODO: Make more descriptive errors
                MessageDialogHelper.ErrorDialog(this, ButtonsType.Close, ex.ToString());
            }
        }
    }
Exemple #2
0
 public CustomFolderGenerator(BMSTable t)
 {
     table   = t;
     exepath = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
     //Set working directory to directory of exe
     Directory.SetCurrentDirectory(exepath);
 }
        public TagEditor(string p, BMSTable t)
        {
            path  = p;
            table = t;

            leveldecoder = Enumerable.Range(0, table.LevelOrder.Length).ToDictionary(x => table.LevelOrder[x]);

            string dbpath = path + "\\LR2files\\Database\\song.db";

            if (!File.Exists(dbpath))
            {
                throw new Exception("Error: song database not found");
            }

            dbconnection = new SQLiteConnection("Data Source=" + dbpath + ";Version=3;");
        }