Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
010254e1bc |
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@@ -2,8 +2,61 @@ using System.Collections.Generic;
|
||||
|
||||
namespace content
|
||||
{
|
||||
public class BuisnessCard
|
||||
public class BuisnessCardItem
|
||||
{
|
||||
public static List<string> Data = new List<string>() { };
|
||||
public string Label { get; set; }
|
||||
public string Text { get; set; }
|
||||
// I could do some fancy regex replace with tokens in the text or I can just have seperate colored properties.
|
||||
// Less fancy but 80/20 :shrug:
|
||||
public string ColoredLabel { get; set; }
|
||||
public string ColoredText { get; set; }
|
||||
public string When { get; set; }
|
||||
public string ToColoredString()
|
||||
{
|
||||
return $"{Label}: {Text}";
|
||||
}
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{Label}: {Text}";
|
||||
}
|
||||
}
|
||||
public static class BuisnessCard
|
||||
{
|
||||
public static List<BuisnessCardItem> Data = new List<BuisnessCardItem>()
|
||||
{
|
||||
new BuisnessCardItem
|
||||
{
|
||||
Label = "Name", Text = "YourName", When = "YourName"
|
||||
},
|
||||
new BuisnessCardItem
|
||||
{
|
||||
Label = "Work", Text = "YourWork", When = "YourWork"
|
||||
},
|
||||
new BuisnessCardItem
|
||||
{
|
||||
Label = "Twitter", Text = "https://twitter.com/YourTwitter", When = "YourTwitter"
|
||||
},
|
||||
new BuisnessCardItem
|
||||
{
|
||||
Label = "NuGet", Text = "https://www.nuget.org/profiles/YourNuget", When = "YourNuget"
|
||||
},
|
||||
new BuisnessCardItem
|
||||
{
|
||||
Label = "GitHub", Text = "https://github.com/YourGithub", When = "YourGithub"
|
||||
},
|
||||
new BuisnessCardItem
|
||||
{
|
||||
Label = "LinkedIn", Text = "https://www.linkedin.com/in/YourLinkedin", When = "YourLinkedin"
|
||||
},
|
||||
new BuisnessCardItem
|
||||
{
|
||||
Label = "Web", Text = "YourWeb", When = "YourWeb"
|
||||
},
|
||||
new BuisnessCardItem
|
||||
{
|
||||
Label = "Card", Text = "dx YourCard", When = "YourCard"
|
||||
},
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace content
|
||||
{
|
||||
@@ -10,5 +11,6 @@ namespace content
|
||||
.AppendJoin(s, new string[n+1])
|
||||
.ToString();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,13 @@
|
||||
using System;
|
||||
|
||||
using System.Linq;
|
||||
namespace content
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Console.Write(BoxDraw.Draw("Tommy James Parnell" + Environment.NewLine + "Twitter: https://twitter.com/terribledev" ));
|
||||
var stringToDraw = String.Join(Environment.NewLine, BuisnessCard.Data.Where(a => !String.IsNullOrWhiteSpace(a.When)).Select(a => a.ToString()));
|
||||
Console.Write(BoxDraw.Draw(stringToDraw));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,4 +5,8 @@
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="crayon" Version="0.0.11" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
17
New-BuisnessCard/content/content.sln
Normal file
17
New-BuisnessCard/content/content.sln
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "content", "content.csproj", "{BBBD4F34-6E52-4970-B85B-6628C9EE0D56}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{BBBD4F34-6E52-4970-B85B-6628C9EE0D56}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{BBBD4F34-6E52-4970-B85B-6628C9EE0D56}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{BBBD4F34-6E52-4970-B85B-6628C9EE0D56}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BBBD4F34-6E52-4970-B85B-6628C9EE0D56}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
Reference in New Issue
Block a user