Пример #1
0
        /// <summary>
        /// Deletes the specified file path by sending a message to web client.
        /// </summary>
        /// <param name="filePath">The file path.</param>
        /// <author>Jurie.smit</author>
        /// <date>2013/05/24</date>
        public void Delete(FilePath filePath)
        {
            var address = String.Format(SelectedServer.Connection.WebServerUri + "{0}/{1}?Directory={2}&FilePath={3}",
                                        "Services", "DeleteLogService", LogDirectory.PathToSerialize, filePath.Title);
            var response = WebClient.UploadString(address, string.Empty);

            if (response.Contains("Success"))
            {
                LogFiles.Remove(filePath);
                DebugOutput.Clear();
            }
            else
            {
                ShowError(response);
            }
        }