revert async method, its stopping the code from working, more reading/research needed!

improved login dialog.
fixed overflow on pages caused by the footer
got rid of GetType() methods in interfaces.
some general code tidying
This commit is contained in:
chris.watts90@outlook.com 2017-06-22 22:39:08 +01:00
parent c985aae677
commit 14e82f65c3
8 changed files with 31 additions and 50 deletions

View File

@ -1,14 +1,8 @@
using System.Collections.Generic; namespace Interfaces
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Interfaces
{ {
public interface INotifierProvider public interface INotifierProvider
{ {
string GetDisplayName(); string GetDisplayName();
string GetNotifierType();
void NotifyRaceStarted(NotificationEventArgs args); void NotifyRaceStarted(NotificationEventArgs args);
void NotifyRaceStarting(NotificationEventArgs args); void NotifyRaceStarting(NotificationEventArgs args);
void NotifyRaceLapEvent(NotificationEventArgs args, Pilot pilot); void NotifyRaceLapEvent(NotificationEventArgs args, Pilot pilot);

View File

@ -1,14 +1,7 @@
using System; namespace Interfaces
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Interfaces
{ {
public interface INotifierProviderFactory public interface INotifierProviderFactory
{ {
INotifierProvider CreateProvider(); INotifierProvider CreateProvider();
string GetType();
} }
} }

View File

@ -1,8 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Interfaces namespace Interfaces
{ {

View File

@ -28,11 +28,11 @@ namespace RaceLapTimer
// We don't call "base" here to prevent auto-discovery of // We don't call "base" here to prevent auto-discovery of
// types/dependencies // types/dependencies
// Configure things for a wider purpose, non-requestcontroller based. // Configure things for a wider purpose, non-requestcontroller based.
container.Bind<IPluginPathProvider>().To<PluginPathProvider>();
container.Bind<IConfigFilePathProvider>().To<ConfigFilePathProvider>();
container.Bind<IContainerHelper>().To<ContainerHelper>(); container.Bind<IContainerHelper>().To<ContainerHelper>();
container.Bind<IDbProvider>().To<TestProvider>().InSingletonScope(); container.Bind<IPluginPathProvider>().To<PluginPathProvider>();
container.Bind<IPluginLocator>().To<PluginLocator>(); container.Bind<IPluginLocator>().To<PluginLocator>();
container.Bind<IConfigFilePathProvider>().To<ConfigFilePathProvider>();
container.Bind<IDbProvider>().To<TestProvider>().InSingletonScope();
//load dynamic plugins..: //load dynamic plugins..:
var cfgFilePath = Path.Combine(container.Get<IConfigFilePathProvider>().GetPath, "NinjectConfig.xml"); var cfgFilePath = Path.Combine(container.Get<IConfigFilePathProvider>().GetPath, "NinjectConfig.xml");
@ -41,8 +41,8 @@ namespace RaceLapTimer
container.Bind<INotifierManager>().To<NotificationManager>().InSingletonScope(); container.Bind<INotifierManager>().To<NotificationManager>().InSingletonScope();
var nM = container.Get<INotifierManager>(); //var nM = container.Get<INotifierManager>();
nM.NotifyRaceStarted(new NotificationEventArgs()); //nM.NotifyRaceStarted(new NotificationEventArgs());
} }
protected override void ConfigureRequestContainer(IKernel container, NancyContext context) protected override void ConfigureRequestContainer(IKernel container, NancyContext context)

View File

@ -20,12 +20,12 @@ namespace RaceLapTimer.Extensions
_pluginPath = pluginPath; _pluginPath = pluginPath;
} }
public async Task<List<T>> LocateAsync<T>() //public async List<T> Locate<T>()
{ //{
return await Task.Run(()=> Locate<T>()); // return await Task.Run(()=> Locate<T>());
} //}
private List<T> Locate<T>() public List<T> Locate<T>()
{ {
if (!Directory.Exists(_pluginPath.GetPluginPath)) return new List<T>(); if (!Directory.Exists(_pluginPath.GetPluginPath)) return new List<T>();
var files = Directory.GetFiles(_pluginPath.GetPluginPath); var files = Directory.GetFiles(_pluginPath.GetPluginPath);

View File

@ -3,7 +3,7 @@
Layout = "razor-layout.cshtml"; Layout = "razor-layout.cshtml";
} }
<link href="/css/login.css" rel="stylesheet" /> <link href="/css/login.css" rel="stylesheet" />
<div class="container loginContainer col-md-offset-4 col-md-4"> <div class="container well well-lg col-md-offset-4 col-md-4">
<form method="POST"> <form method="POST">
Username <input type="text" class="form-control input-sm" name="Username" /> Username <input type="text" class="form-control input-sm" name="Username" />
<br /> <br />
@ -23,6 +23,6 @@
@if (Model.Errored) @if (Model.Errored)
{ {
<br /> <br />
<div id="errorBox" class="alert alert-danger row">Invalid Username or Password</div> <div id="errorBox" class="alert alert-danger row" style="margin-bottom: 0;">Invalid Username or Password</div>
} }
</div> </div>

View File

@ -88,7 +88,6 @@
</div> </div>
</div> </div>
<footer class="footer"> <footer class="footer">
<div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<ul class="list-unstyled"> <ul class="list-unstyled">
<li class="pull-right"> <li class="pull-right">
@ -104,7 +103,6 @@
<a href="http://www.gnu.org/licenses/gpl-3.0.de.html">GPL V3</a>. <a href="http://www.gnu.org/licenses/gpl-3.0.de.html">GPL V3</a>.
</p> </p>
</div> </div>
</div>
</footer> </footer>
</body> </body>
</html> </html>

View File

@ -4,13 +4,13 @@
} }
body { body {
/* Margin bottom by footer height */ /* Margin bottom by footer height */
margin-bottom: 60px; margin-bottom: 70px;
} }
.footer { .footer {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
width: 100%; width: 100%;
/* Set the fixed height of the footer here */ /* Set the fixed height of the footer here */
height: 60px; height: 70px;
background-color: #f5f5f5; background-color: #f5f5f5;
} }