Added: open command arg

This commit is contained in:
Ray 2020-08-23 14:03:07 +01:00
parent b228388c41
commit 772967be85
2 changed files with 34 additions and 34 deletions

View File

@ -83,46 +83,45 @@ namespace bzit.bomg
this.Location = Screen.PrimaryScreen.WorkingArea.Location; this.Location = Screen.PrimaryScreen.WorkingArea.Location;
// command line // command line
//string[] szr = Environment.GetCommandLineArgs(); string[] args = Environment.GetCommandLineArgs();
//int i = 0;
//while (true)
//{
// if (i > (szr.Length - 1))
// {
// break;
// }
// switch (szr[i].Trim().ToLower()) if (args.Length > 1)
// { {
// case "-o": int i = 1;
// case "-open": while (true)
// if ((i + 1) > (szr.Length - 1)) {
// { if (i > (args.Length - 1))
// break; {
// } break;
}
// sessionFilename = szr[(i + 1)]; switch (args[i].Trim().ToLower())
{
case "-o":
case "-open":
if ((i + 1) > (args.Length - 1)) break;
// if (string.IsNullOrEmpty(sessionFilename)) string openFilename = args[(i + 1)];
// { if (string.IsNullOrWhiteSpace(openFilename)) break;
// sessionFilename = null; if (!File.Exists(openFilename)) break;
// break;
// }
// if (!File.Exists(sessionFilename)) string openExtension = Path.GetExtension(openFilename).Trim('.');
// { if (openExtension.Equals("jsnx", StringComparison.CurrentCultureIgnoreCase))
// sessionFilename = null; {
// break; loadBookmarkFile(openFilename, 1);
// } }
else if (openExtension.Equals("ryz", StringComparison.CurrentCultureIgnoreCase))
{
loadBookmarkFile(openFilename, 2);
}
// OpenBookmarkFile(sessionFilename); i++;
break;
}
// i++; i++;
// break; }
// } }
// i++;
//}
} }
protected override void OnFormClosing(FormClosingEventArgs e) protected override void OnFormClosing(FormClosingEventArgs e)

View File

@ -110,6 +110,7 @@
</Compile> </Compile>
<Compile Include="Models\BookmarkItemModel.cs" /> <Compile Include="Models\BookmarkItemModel.cs" />
<Compile Include="RyzStudio\Net\HttpWeb.cs" /> <Compile Include="RyzStudio\Net\HttpWeb.cs" />
<Compile Include="RyzStudio\Windows\Forms\ThreadControl.cs" />
<Compile Include="Windows\Forms\BookmarkTreeViewSNode.cs" /> <Compile Include="Windows\Forms\BookmarkTreeViewSNode.cs" />
<Compile Include="RyzStudio\Windows\Forms\HorizontalSeparator.cs"> <Compile Include="RyzStudio\Windows\Forms\HorizontalSeparator.cs">
<SubType>UserControl</SubType> <SubType>UserControl</SubType>