Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 private void init_ftp(ref FtpConnector f)
 {
     f.init(preference["ftp_server_ip"], preference["ftp_user_id"], preference["ftp_password"]);
 }