Skip to content

Commit

Permalink
add - Added gen parameter to demo app
Browse files Browse the repository at this point in the history
---

We've added -gen parameter to the demo app.

---

Type: add
Breaking: False
Doc Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Apr 4, 2024
1 parent 611a33a commit 5ec1bcb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion VisualCard.ShowContacts/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
using Terminaux.Colors.Data;
using Terminaux.Writer.ConsoleWriters;
using VisualCard.Converters;
using VisualCard.Extras;
using VisualCard.Parts;
using VisualCard.Parts.Enums;
using VisualCard.Parts.Implementations;
Expand All @@ -45,7 +46,8 @@ static void Main(string[] args)
bool dbg = args.Contains("-debug");
bool android = args.Contains("-android");
bool mecard = args.Contains("-mecard");
args = args.Except(["-noprint", "-save", "-debug", "-android", "-mecard"]).ToArray();
bool gen = args.Contains("-gen");
args = args.Except(["-noprint", "-save", "-debug", "-android", "-mecard", "-gen"]).ToArray();

// If debug, wait for debugger
if (dbg)
Expand All @@ -62,6 +64,7 @@ static void Main(string[] args)

// Parse all contacts
Card[] contacts =
gen ? CardGenerator.GenerateCards() :
android ? (args.Length > 0 ? AndroidContactsDb.GetContactsFromDb(args[0]) : AndroidContactsDb.GetContactsFromDb()) :
mecard ? MeCard.GetContactsFromMeCardString(meCardString) :
CardTools.GetCards(args[0]);
Expand Down
4 changes: 4 additions & 0 deletions VisualCard.ShowContacts/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
"vCard - Picture test": {
"commandName": "Project",
"commandLineArgs": "TestFiles/picture.vcf"
},
"vCard - Generation test": {
"commandName": "Project",
"commandLineArgs": "-gen"
}
}
}

0 comments on commit 5ec1bcb

Please sign in to comment.