Skip to content

Commit

Permalink
- Make sure that if help is requested it is displayed regardless of t…
Browse files Browse the repository at this point in the history
…he Config Status

- More #64: Update Text in the Schedule form
  • Loading branch information
Smurf-IV committed Dec 12, 2019
1 parent 91273f6 commit 61cf8e9
Show file tree
Hide file tree
Showing 8 changed files with 88 additions and 59 deletions.
37 changes: 20 additions & 17 deletions Elucidate/Elucidate/Controls/LiveRunLogControl.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Elucidate/Elucidate/Elucidate.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</AssemblyInfoVersionSettings>
<PrimaryVersionType>AssemblyVersionAttribute</PrimaryVersionType>
<AssemblyInfoFilePath>Properties\AssemblyInfo.cs</AssemblyInfoFilePath>
<AssemblyVersion>2019.12.998.12</AssemblyVersion>
<AssemblyVersion>2019.12.1000.12</AssemblyVersion>
<UpdatePackageVersion>False</UpdatePackageVersion>
<AssemblyInfoVersionType>SettingsVersion</AssemblyInfoVersionType>
<InheritWinAppVersionFrom>None</InheritWinAppVersionFrom>
Expand Down Expand Up @@ -315,7 +315,7 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
<UserProperties BuildVersion_UseUniversalClock="False" BuildVersion_UpdateFileVersion="False" BuildVersion_UpdateAssemblyVersion="False" BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="YearStamp.MonthStamp.DayStamp.Increment" />
<UserProperties BuildVersion_BuildVersioningStyle="YearStamp.MonthStamp.DayStamp.Increment" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" BuildVersion_UpdateAssemblyVersion="False" BuildVersion_UpdateFileVersion="False" BuildVersion_UseUniversalClock="False" />
</VisualStudio>
</ProjectExtensions>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down
34 changes: 23 additions & 11 deletions Elucidate/Elucidate/Forms/ElucidateForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,21 +82,33 @@ private void ElucidateForm_Load(object sender, EventArgs e)

private void ElucidateForm_Shown(object sender, EventArgs e)
{
LoadConfigFile();

// display any warnings from the config validation
if (srConfig.HasWarnings)
string[] args = Environment.GetCommandLineArgs().Skip(1).ToArray();
if (args.Contains(@"-H")
|| args.Contains(@"--help")
)
{
MessageBoxExt.Show(
this,
$"There are warnings for the configuration file:{Environment.NewLine} - {string.Join(" - ", srConfig.ConfigWarnings)}",
"Configuration File Warnings",
MessageBoxButtons.OK,
MessageBoxIcon.Warning);
commonTab.PerformArgs(args);
commonTab.SetCommonButtonsEnabledState( false ); // Prevent button pushing !
}
else
{
commonTab.PerformArgs(Environment.GetCommandLineArgs().Skip(1).ToArray());

LoadConfigFile();

// display any warnings from the config validation
if (srConfig.HasWarnings)
{
MessageBoxExt.Show(
this,
$"There are warnings for the configuration file:{Environment.NewLine} - {string.Join(" - ", srConfig.ConfigWarnings)}",
"Configuration File Warnings",
MessageBoxButtons.OK,
MessageBoxIcon.Warning);
}
else
{
commonTab.PerformArgs(args);
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions Elucidate/Elucidate/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
// Build Number - Increment
// Revision - Day
//
[assembly: AssemblyVersion("2019.12.998.12")]
[assembly: AssemblyFileVersion("19.12.998.12")]
[assembly: AssemblyVersion("2019.12.1000.12")]
[assembly: AssemblyFileVersion("19.12.1000.12")]
[assembly: NeutralResourcesLanguage("en-US")]
// TODO: Add more relevant hints here
[assembly: Dependency("System", LoadHint.Always)]
Expand Down
2 changes: 1 addition & 1 deletion Elucidate/Elucidate/TabPages/CommonTab.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Elucidate/Elucidate/TabPages/CommonTab.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

namespace Elucidate.TabPages
{
public partial class CommonTab : UserControl
internal partial class CommonTab : UserControl
{
private static readonly Logger Log = LogManager.GetCurrentClassLogger();

Expand Down Expand Up @@ -97,7 +97,7 @@ public void PerformArgs(string[] args)
ParserResult<object> parserResult = Parser.Default.ParseArguments<SyncVerb, DiffVerb, CheckVerb, FixVerb, ScrubVerb, DupVerb, StatusVerb>(args);
parserResult.WithNotParsed(DisplayErrors);
// Order is important as commands "Can" be chained"
// See http://www.snapraid.it/manual scrubbing for an indication of order
// See http://www.snapraid.it/manual#4.1 Scrubbing for an indication of order
parserResult.WithParsed<DiffVerb>(verb => DisplayAndCall(verb, Diff_Click));
parserResult.WithParsed<CheckVerb>(verb => DisplayAndCall(verb, Check_Click));
parserResult.WithParsed<SyncVerb>(verb => DisplayAndCall(verb, Sync_Click));
Expand Down
36 changes: 12 additions & 24 deletions Elucidate/Elucidate/TabPages/Schedule.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions Elucidate/Elucidate/TabPages/Schedule.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,30 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="kryptonWrapLabel1.Text" xml:space="preserve">
<value>In order to use the CommandLine, a valid Config file first has to be created with no Errors or warnings.
As this is an interactive UI, then it cannot be run without a logged on user (Like SnapRaid.exe can)
Run Elucidate from a commandLine with either -H or --help after it to see the options.
These can be combined.
- Order is important as commands "Can" be chained"
- See http://www.snapraid.it/manual#4.1 Scrubbing for an indication of order
Current implemented order:
Diff
Check
Sync
Scrub
DupFinder
btnStatus
Fix
// Verbs not done as they do not have buttons yet
// list
// smart
// up
// down
// pool
// devices
// touch
// rehash
</value>
</data>
</root>

0 comments on commit 61cf8e9

Please sign in to comment.