// //when the download url exist the download file ask to do // private bool ExistDownLoadAsk(ListViewItem itemServer) { //get server same file Infor string serverFileSize = itemServer.SubItems[1].Text.ToString(); string serverFileDate = itemServer.SubItems[3].Text.ToString(); //get locat same fileInfo string localFileSize = "0"; string locatFileDate = String.Empty; foreach (ListViewItem item in lvLocal.Items) { if (item.Text == itemServer.Text) { localFileSize = item.SubItems[1].Text.ToString(); locatFileDate = item.SubItems[3].Text.ToString(); } } FindSameForm findSame = new FindSameForm (itemServer.Text, localFileSize, locatFileDate, serverFileSize, serverFileDate); findSame.StartPosition = FormStartPosition.CenterScreen; if (findSame.ShowDialog() == DialogResult.Yes) { return true; } else { return false; } }
private bool ExistUpLoadAsk(ListViewItem itemServer,ListViewItem itemLocal) { //get server same file Infor string serverFileSize = itemServer.SubItems[1].Text.ToString(); string serverFileDate = itemServer.SubItems[3].Text.ToString(); string localFileSize = itemLocal.SubItems[1].Text.ToString(); string locatFileDate = itemLocal.SubItems[3].Text.ToString(); FindSameForm findSame = new FindSameForm (itemServer.Text, localFileSize, locatFileDate, serverFileSize, serverFileDate); findSame.StartPosition = FormStartPosition.CenterScreen; if (findSame.ShowDialog() == DialogResult.Yes) { return true; } else { return false; } }