Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added rudimentary "Program" / task interface and execution. This will…
… form the

foundation of the various programs and sequencies that the app will send to RDS.
  • Loading branch information
ejr06006 committed Apr 4, 2012
1 parent 3dd233a commit d37ee65
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 7 deletions.
3 changes: 3 additions & 0 deletions DataScraperGUI/DataScraperGUI.csproj
Expand Up @@ -63,13 +63,16 @@
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="Programs\IProgram.cs" />
<Compile Include="Infrastructure\Logger.cs" />
<Compile Include="MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="Programs\NormalProgram.cs" />
<Compile Include="Programs\Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
Expand Down
2 changes: 1 addition & 1 deletion DataScraperGUI/Infrastructure/Logger.cs
Expand Up @@ -5,7 +5,7 @@ using System.Text;
using System.Windows.Controls;

namespace DataScraperGUI.Infrastructure {
class Logger {
public class Logger {
private TextBox logBox = null;

public Logger (TextBox lBox) {
Expand Down
4 changes: 4 additions & 0 deletions DataScraperGUI/MainWindow.xaml.cs
Expand Up @@ -12,6 +12,7 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using DataScraperGUI.Infrastructure;
using DataScraperGUI.Programs;

namespace DataScraperGUI {
/// <summary>
Expand All @@ -30,6 +31,9 @@ namespace DataScraperGUI {

private void runButton_Click (object sender, RoutedEventArgs e) {
logger.LogWarning("Run button pressed!");

var p = new NormalProgram(logger);
p.Execute();
}
}
}
10 changes: 10 additions & 0 deletions DataScraperGUI/Programs/IProgram.cs
@@ -0,0 +1,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DataScraperGUI.Programs {
interface IProgram {
void Execute();
}
}
16 changes: 16 additions & 0 deletions DataScraperGUI/Programs/NormalProgram.cs
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DataScraperGUI.Infrastructure;

namespace DataScraperGUI.Programs {
public class NormalProgram : Program {
public NormalProgram (Logger l) : base(l) { }


public override void Execute() {
logger.LogError("This program has not yet been implemented.");
}
}
}
23 changes: 23 additions & 0 deletions DataScraperGUI/Programs/Program.cs
@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DataScraperGUI.Infrastructure;

namespace DataScraperGUI.Programs {
public class Program : IProgram {
protected Logger logger;

public Program (Logger l) {
logger = l;
}

protected Program() {
throw new NotImplementedException();
}

public virtual void Execute() {
throw new NotImplementedException();
}
}
}
6 changes: 0 additions & 6 deletions ECESeniorDesign.sln
@@ -1,8 +1,6 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataScraperCLI", "DataScraperCLI\DataScraperCLI.csproj", "{0ACA125D-6725-4A0B-8C61-05EE786943C5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataScraperGUI", "DataScraperGUI\DataScraperGUI.csproj", "{7F6FFC40-814A-44A9-900E-BC450AE69F30}"
EndProject
Global
Expand All @@ -11,10 +9,6 @@ Global
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0ACA125D-6725-4A0B-8C61-05EE786943C5}.Debug|x86.ActiveCfg = Debug|x86
{0ACA125D-6725-4A0B-8C61-05EE786943C5}.Debug|x86.Build.0 = Debug|x86
{0ACA125D-6725-4A0B-8C61-05EE786943C5}.Release|x86.ActiveCfg = Release|x86
{0ACA125D-6725-4A0B-8C61-05EE786943C5}.Release|x86.Build.0 = Release|x86
{7F6FFC40-814A-44A9-900E-BC450AE69F30}.Debug|x86.ActiveCfg = Debug|x86
{7F6FFC40-814A-44A9-900E-BC450AE69F30}.Debug|x86.Build.0 = Debug|x86
{7F6FFC40-814A-44A9-900E-BC450AE69F30}.Release|x86.ActiveCfg = Release|x86
Expand Down

0 comments on commit d37ee65

Please sign in to comment.