private void Um_DoWork(object sender, DoWorkEventArgs e) { //throw new NotImplementedException(); MysqlConnector music_updator = new MysqlConnector(); init_mysql(ref music_updator); FtpConnector music_uploader = new FtpConnector(); init_ftp(ref music_uploader); Music music; lock (to_upload_music_list) { music = to_upload_music_list[0]; to_upload_music_list.Remove(music); } int res = music.other_singer == null?music_updator.addNewSong(music.music_name, music.singer, music.belong_to_list) : music_updator.addNewSong(music.music_name, music.singer, music.belong_to_list, music.other_singer); //music_uploader.uploadFile(music.music_path, music.belong_to_list); }
private void init_mysql(ref MysqlConnector m) { m.init(preference["mysql_server_ip"], preference["mysql_catalog"], preference["mysql_user_id"], preference["mysql_password"], preference["mysql_port"]); }