Skip to content

Commit

Permalink
Automated formatting and syntax clean
Browse files Browse the repository at this point in the history
  • Loading branch information
jas88 committed Jul 21, 2023
1 parent bc3ddb7 commit 604dcaf
Show file tree
Hide file tree
Showing 2,204 changed files with 67,915 additions and 59,453 deletions.
1 change: 1 addition & 0 deletions .nuget/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>

<packages>
<package id="NUnit.Console" version="3.9.0" />
<package id="NUnit.ConsoleRunner" version="3.9.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ namespace ResearchDataManagementPlatform.Menus.MenuItems;

internal class DataExportMenu : RDMPToolStripMenuItem
{
public DataExportMenu(IActivateItems activator):base(activator,"Data Export Options")
public DataExportMenu(IActivateItems activator) : base(activator, "Data Export Options")
{

Enabled = _activator.RepositoryLocator.DataExportRepository != null;

DropDownItems.Add(new ToolStripMenuItem("Configure Disclaimer", null, ConfigureDisclaimer));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@
// You should have received a copy of the GNU General Public License along with RDMP. If not, see <https://www.gnu.org/licenses/>.

using System;
using System.ComponentModel;
using System.Windows.Forms;
using Rdmp.Core.ReusableLibraryCode.Settings;
using Rdmp.UI.Tutorials;

namespace ResearchDataManagementPlatform.Menus.MenuItems;

/// <summary>
/// Disables displaying Tutorials in RDMP
/// Disables displaying Tutorials in RDMP
/// </summary>
[System.ComponentModel.DesignerCategory("")]
[DesignerCategory("")]
public class DisableTutorialsMenuItem : ToolStripMenuItem
{
private readonly TutorialTracker _tracker;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,27 @@
// You should have received a copy of the GNU General Public License along with RDMP. If not, see <https://www.gnu.org/licenses/>.

using System;
using System.ComponentModel;
using System.Windows.Forms;
using Rdmp.UI.ItemActivation;
using Rdmp.UI.Tutorials;

namespace ResearchDataManagementPlatform.Menus.MenuItems;

/// <summary>
/// Launches the given Tutorial, Tutorials which the user has already been exposed to will be marked (Seen)
/// Launches the given Tutorial, Tutorials which the user has already been exposed to will be marked (Seen)
/// </summary>
[System.ComponentModel.DesignerCategory("")]
[DesignerCategory("")]
public class LaunchTutorialMenuItem : ToolStripMenuItem
{
private IActivateItems _activator;
private readonly Tutorial _tutorial;
private readonly TutorialTracker _tracker;
private readonly Tutorial _tutorial;
private IActivateItems _activator;

public LaunchTutorialMenuItem(ToolStripMenuItem parent,IActivateItems activator, Tutorial tutorial, TutorialTracker tracker)
public LaunchTutorialMenuItem(ToolStripMenuItem parent, IActivateItems activator, Tutorial tutorial,
TutorialTracker tracker)
{
parent.DropDownOpening += parent_DropDownOpening;
parent.DropDownOpening += parent_DropDownOpening;
_activator = activator;
_tutorial = tutorial;
_tracker = tracker;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@
// You should have received a copy of the GNU General Public License along with RDMP. If not, see <https://www.gnu.org/licenses/>.

using System;
using System.ComponentModel;
using System.Windows.Forms;
using Rdmp.UI.Tutorials;

namespace ResearchDataManagementPlatform.Menus.MenuItems;

/// <summary>
/// Clears all user progress on Tutorials
/// Clears all user progress on Tutorials
/// </summary>
[System.ComponentModel.DesignerCategory("")]
[DesignerCategory("")]
public class ResetTutorialsMenuItem : ToolStripMenuItem
{
private readonly TutorialTracker _tracker;
Expand All @@ -36,6 +37,4 @@ private void parent_DropDownOpening(object sender, EventArgs e)
{
Enabled = _tracker.IsClearable();
}


}
169 changes: 91 additions & 78 deletions Application/ResearchDataManagementPlatform/Menus/RDMPTopMenuStripUI.cs

Large diffs are not rendered by default.

14 changes: 8 additions & 6 deletions Application/ResearchDataManagementPlatform/NLog.template.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>

<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
Expand All @@ -9,13 +10,14 @@
<targets>
<target xsi:type="ColoredConsole" name="c"
layout="${longdate} ${uppercase:${level}} ${message} ${all-event-properties}. ${exception:format=toString}" />
<target xsi:type="File" name="log4j" fileName="${basedir}/logs/${shortdate}-log4j.log" layout="${log4jxmlevent}" />
<target xsi:type="File" name="simple" fileName="${basedir}/logs/${shortdate}-simple.log" layout="${longdate}|${level:uppercase=true}|${logger}|${message}|${exception:format=toString}" />
<target xsi:type="Network" name="u" address="udp4://localhost:878" layout="${log4jxmlevent}" />
<target xsi:type="File" name="log4j" fileName="${basedir}/logs/${shortdate}-log4j.log" layout="${log4jxmlevent}" />
<target xsi:type="File" name="simple" fileName="${basedir}/logs/${shortdate}-simple.log"
layout="${longdate}|${level:uppercase=true}|${logger}|${message}|${exception:format=toString}" />
<target xsi:type="Network" name="u" address="udp4://localhost:878" layout="${log4jxmlevent}" />
</targets>
<rules>
<!--<logger name="*" minlevel="Trace" writeTo="c" />
<!--<logger name="*" minlevel="Trace" writeTo="c" />
<logger name="*" minlevel="Trace" writeTo="log4j" />-->
<logger name="*" minlevel="Trace" writeTo="simple" />
</rules>
</nlog>
</nlog>
44 changes: 22 additions & 22 deletions Application/ResearchDataManagementPlatform/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,31 @@ internal static class Program
[DllImport("kernel32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool AttachConsole([MarshalAs(UnmanagedType.U4)] int dwProcessId);
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]

/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
private static void Main(string[] args)
{
// if user has the command line built and runnable from the windows
// client then don't load the dlls (or we end up with 2 copies!).
SafeDirectoryCatalog.IgnoreDll = f => Path.GetFileName(f.DirectoryName)?.Equals("cli")==true;
{
// if user has the command line built and runnable from the windows
// client then don't load the dlls (or we end up with 2 copies!).
SafeDirectoryCatalog.IgnoreDll = f => Path.GetFileName(f.DirectoryName)?.Equals("cli") == true;

try
{
AttachConsole(-1);
}
catch (Exception)
{
Console.WriteLine("Couldn't redirect console. Never mind");
}
try
{
AttachConsole(-1);
}
catch (Exception)
{
Console.WriteLine("Couldn't redirect console. Never mind");
}

Startup.PreStartup();
Startup.PreStartup();

UsefulStuff.GetParser()
.ParseArguments<ResearchDataManagementPlatformOptions>(args)
.MapResult(RunApp, err => -1);
UsefulStuff.GetParser()
.ParseArguments<ResearchDataManagementPlatformOptions>(args)
.MapResult(RunApp, err => -1);
}

private static object RunApp(ResearchDataManagementPlatformOptions arg)
Expand All @@ -56,7 +56,7 @@ private static object RunApp(ResearchDataManagementPlatformOptions arg)
{
arg.PopulateConnectionStringsFromYamlIfMissing(new ThrowImmediatelyCheckNotifier());
}
catch(Exception ex)
catch (Exception ex)
{
ExceptionViewer.Show(ex);
return -500;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("cac9817c-fc66-48e8-9333-c740af6ab5b9")]
[assembly: Guid("cac9817c-fc66-48e8-9333-c740af6ab5b9")]
19 changes: 10 additions & 9 deletions Application/ResearchDataManagementPlatform/RDMP.nuspec
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>

<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>ResearchDataManagementPlatform</id>
<version>$version$</version>
<authors>Health Informatics Service, University of Dundee</authors>
<description>Research Data Management Platform</description>
</metadata>
<metadata>
<id>ResearchDataManagementPlatform</id>
<version>$version$</version>
<authors>Health Informatics Service, University of Dundee</authors>
<description>Research Data Management Platform</description>
</metadata>
<files>
<file src="bin\$configuration$\net6.0-windows\win-x64\*" target="lib\net6.0-windows7.0" />
<file src="bin\$configuration$\net6.0-windows\win-x64\Curation\**\*" target="lib\net6.0-windows7.0" />
<file src="bin\$configuration$\net6.0-windows\win-x64\Icon\**\*" target="lib\net6.0-windows7.0" />
<file src="bin\$configuration$\net6.0-windows\win-x64\WindowManagement\**\*" target="lib\net6.0-windows7.0" />
<file src="bin\$configuration$\net6.0-windows\win-x64\Curation\**\*" target="lib\net6.0-windows7.0" />
<file src="bin\$configuration$\net6.0-windows\win-x64\Icon\**\*" target="lib\net6.0-windows7.0" />
<file src="bin\$configuration$\net6.0-windows\win-x64\WindowManagement\**\*" target="lib\net6.0-windows7.0" />
</files>
</package>
Loading

0 comments on commit 604dcaf

Please sign in to comment.