/// <summary> /// Uzupełnia nazwy katalogów, gdy są niepełe /// </summary> /// <param name="enp">Modyfikowany endpoint</param> private void SanitizeDirectories(ref FtpEndpoint enp) { if (!enp.RemoteDirectory.StartsWith("/")) { enp.RemoteDirectory = "/" + enp.RemoteDirectory; } if (!enp.LocalDirectory.EndsWith("\\")) { enp.LocalDirectory += "\\"; } }
/// <summary> /// Inicjuje w w¹tku z puli pêtlê przetwarzania ¿¹dañ pobrania plików z endpointów ftp /// </summary> /// <param name="endpoint">Endpoint, dla którego symulujemy wywo³anie z harmonogramu</param> public void StartNow(FtpEndpoint endpoint) { bool oldInProgress = InProgress; InProgress = true; m_filesTransfered = 0; ThreadPool.QueueUserWorkItem(ExecuteFtpTransfer, new FtpScheduleModel() { xx = -endpoint.XX }); InProgress = oldInProgress; }
/// <summary> /// Obsługa zdarzenia zmiany wybranego z listy serwera /// </summary> private void OnSerwerChanged(object sender, SelectionChangedEventArgs e) { var cb = sender as ComboBox; if (cb != null) { m_selectedEndpoint = cb.SelectedItem as FtpEndpoint; if (m_selectedEndpoint == null) { LoadSchedules(0); } else { LoadSchedules(m_selectedEndpoint.XX); } } }