MessageDisplayer.ShowInfo C# (CSharp) Method

ShowInfo() public method

public ShowInfo ( string info ) : void
info string
return void
    public void ShowInfo(string info)
    {
        var task = new Task
                       {
                           Category = TaskCategory.Misc,
                           Text = info,
                           CanDelete = true,
                       };
        errorProvider.Tasks.Add(task);
    }

Usage Example

コード例 #1
0
    void DeployFiles(List <string> newStrings, string trimmed)
    {
        var success = false;

        try
        {
            foreach (var file in Directory.GetFiles(Path.Combine(contentsFinder.ContentFilesPath, "Fody")))
            {
                File.Copy(file, Path.Combine(trimmed, Path.GetFileName(file)), true);
                success = true;
            }
            var info = string.Format("Fody: Updated '{0}' to version {1}.", trimmed, CurrentVersion.Version);
            messageDisplayer.ShowInfo(info);
        }
        catch (Exception exception)
        {
            if (success)
            {
                var error = string.Format("Fody: Failed to update '{0}' to version {1} due to '{2}'. Please manually copy the contents of '{3}' to '{0}'.", trimmed, CurrentVersion.Version, exception.Message, contentsFinder.ContentFilesPath);
                messageDisplayer.ShowError(error);
            }
            else
            {
                var info = string.Format("Fody: Failed to update '{0}' to version {1} will try again later.", trimmed, CurrentVersion.Version);
                messageDisplayer.ShowInfo(info);
                newStrings.Add(trimmed);
            }
        }
    }
All Usage Examples Of MessageDisplayer::ShowInfo