├── README ├── .gitignore └── BozosCircusTestHarness ├── BozosCircus ├── Properties │ ├── Settings.settings │ ├── Settings.Designer.cs │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── UserControl1.xaml ├── MessageBoxDeluxe │ ├── MessageBoxChoice.cs │ ├── LambdaCommand.cs │ ├── MessageBoxDeluxe.xaml │ └── MessageBoxDeluxe.xaml.cs ├── UserControl1.xaml.cs ├── SmartStart │ ├── SmartStart.xaml.cs │ ├── ActionMapper.cs │ └── SmartStart.xaml └── BozosCircus.csproj ├── BozosCircusTestHarness ├── Properties │ ├── Settings.settings │ ├── Settings.Designer.cs │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── App.xaml ├── App.xaml.cs ├── Window1.xaml ├── Window1.xaml.cs └── BozosCircusTestHarness.csproj └── BozosCircusTestHarness.sln /README: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | _ReSharper* 2 | *.resharper* 3 | bin 4 | obj 5 | *.suo 6 | *.zip 7 | *.user -------------------------------------------------------------------------------- /BozosCircusTestHarness/BozosCircus/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /BozosCircusTestHarness/BozosCircusTestHarness/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /BozosCircusTestHarness/BozosCircus/UserControl1.xaml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /BozosCircusTestHarness/BozosCircusTestHarness/App.xaml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /BozosCircusTestHarness/BozosCircusTestHarness/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Linq; 6 | using System.Windows; 7 | 8 | namespace BozosCircusTestHarness 9 | { 10 | /// 11 | /// Interaction logic for App.xaml 12 | /// 13 | public partial class App : Application 14 | { 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /BozosCircusTestHarness/BozosCircusTestHarness/Window1.xaml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /BozosCircusTestHarness/BozosCircus/MessageBoxDeluxe/MessageBoxChoice.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace BozosCircus.MessageBoxDeluxe 7 | { 8 | public class MessageBoxChoice 9 | { 10 | private KeyValuePair> _ChoicePair; 11 | 12 | public string Key { get { return _ChoicePair.Key; } } 13 | public Action Value { get { return _ChoicePair.Value; } } 14 | 15 | public MessageBoxChoice(string choiceText, Action choiceCommand) 16 | { 17 | _ChoicePair = new KeyValuePair>(choiceText, choiceCommand); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /BozosCircusTestHarness/BozosCircus/UserControl1.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Windows; 6 | using System.Windows.Controls; 7 | using System.Windows.Data; 8 | using System.Windows.Documents; 9 | using System.Windows.Input; 10 | using System.Windows.Media; 11 | using System.Windows.Media.Imaging; 12 | using System.Windows.Navigation; 13 | using System.Windows.Shapes; 14 | 15 | namespace BozosCircus 16 | { 17 | /// 18 | /// Interaction logic for UserControl1.xaml 19 | /// 20 | public partial class UserControl1 : UserControl 21 | { 22 | public UserControl1() 23 | { 24 | InitializeComponent(); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /BozosCircusTestHarness/BozosCircus/SmartStart/SmartStart.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Windows; 6 | using System.Windows.Controls; 7 | using System.Windows.Data; 8 | using System.Windows.Documents; 9 | using System.Windows.Input; 10 | using System.Windows.Media; 11 | using System.Windows.Media.Imaging; 12 | using System.Windows.Shapes; 13 | using BozosCircus.SmartStart; 14 | 15 | namespace BozosCircusTestHarness 16 | { 17 | /// 18 | /// Interaction logic for SmartStart.xaml 19 | /// 20 | public partial class SmartStart : Window 21 | { 22 | 23 | public SmartStart(ActionMapper actions) 24 | { 25 | InitializeComponent(); 26 | 27 | PreviewKeyDown += new KeyEventHandler(SmartStart_PreviewKeyDown); 28 | } 29 | 30 | void SmartStart_PreviewKeyDown(object sender, KeyEventArgs e) 31 | { 32 | if(e.Key == Key.Return) this.Hide(); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /BozosCircusTestHarness/BozosCircus/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:2.0.50727.1434 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace BozosCircus.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /BozosCircusTestHarness/BozosCircusTestHarness/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:2.0.50727.1434 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace BozosCircusTestHarness.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /BozosCircusTestHarness/BozosCircus/MessageBoxDeluxe/LambdaCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Windows.Input; 6 | 7 | namespace BozosCircus.MessageBoxDeluxe 8 | { 9 | public class LambdaCommand : ICommand 10 | { 11 | private Action _Command; 12 | private Predicate _IsEnabled; 13 | 14 | public LambdaCommand(Action command, Predicate isEnabled) 15 | { 16 | if (command == null) throw new ArgumentNullException("command"); 17 | if (isEnabled == null) throw new ArgumentNullException("isEnabled"); 18 | 19 | _Command = command; 20 | _IsEnabled = isEnabled; 21 | } 22 | 23 | public event EventHandler CanExecuteChanged 24 | { 25 | add { CommandManager.RequerySuggested += value; } 26 | remove { CommandManager.RequerySuggested -= value; } 27 | } 28 | 29 | public void Execute(object parameter) 30 | { 31 | if (parameter == null) return; 32 | 33 | if (_Command != null) 34 | _Command((T)parameter); 35 | } 36 | 37 | public bool CanExecute(object parameter) 38 | { 39 | return parameter != null && 40 | _IsEnabled((T)parameter); 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /BozosCircusTestHarness/BozosCircus/SmartStart/ActionMapper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace BozosCircus.SmartStart 7 | { 8 | public class ActionMapper 9 | { 10 | private List _Verbs; 11 | public ActionMapper(IEnumerable verbs) 12 | { 13 | _Verbs = new List(verbs); 14 | } 15 | 16 | public IEnumerable SearchNounsFor(string name) 17 | { 18 | if (_Verbs != null) 19 | return _Verbs.FindAll(verb => verb.Name.ToLowerInvariant().Contains(name)); 20 | return new List(); 21 | } 22 | } 23 | 24 | public class Verb 25 | { 26 | public string Name; 27 | 28 | public Verb(string name, IEnumerable nouns) 29 | { 30 | Name = name; 31 | _Nouns = new List(nouns); 32 | } 33 | 34 | private List _Nouns; 35 | public IEnumerable SearchVerbsFor(string name) 36 | { 37 | if (_Nouns != null) 38 | return _Nouns.FindAll(noun => noun.Name.ToLowerInvariant().Contains(name)); 39 | return new List(); 40 | } 41 | } 42 | 43 | public class Noun 44 | { 45 | public string Name; 46 | public Action Do; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /BozosCircusTestHarness/BozosCircus/SmartStart/SmartStart.xaml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /BozosCircusTestHarness/BozosCircusTestHarness.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual Studio 2008 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BozosCircusTestHarness", "BozosCircusTestHarness\BozosCircusTestHarness.csproj", "{CC30B625-506A-4B0F-A278-2B46D754DDFD}" 5 | EndProject 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BozosCircus", "BozosCircus\BozosCircus.csproj", "{4AD2CD1F-9CA5-46E8-A938-80020995073B}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {CC30B625-506A-4B0F-A278-2B46D754DDFD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {CC30B625-506A-4B0F-A278-2B46D754DDFD}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {CC30B625-506A-4B0F-A278-2B46D754DDFD}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {CC30B625-506A-4B0F-A278-2B46D754DDFD}.Release|Any CPU.Build.0 = Release|Any CPU 18 | {4AD2CD1F-9CA5-46E8-A938-80020995073B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 19 | {4AD2CD1F-9CA5-46E8-A938-80020995073B}.Debug|Any CPU.Build.0 = Debug|Any CPU 20 | {4AD2CD1F-9CA5-46E8-A938-80020995073B}.Release|Any CPU.ActiveCfg = Release|Any CPU 21 | {4AD2CD1F-9CA5-46E8-A938-80020995073B}.Release|Any CPU.Build.0 = Release|Any CPU 22 | EndGlobalSection 23 | GlobalSection(SolutionProperties) = preSolution 24 | HideSolutionNode = FALSE 25 | EndGlobalSection 26 | EndGlobal 27 | -------------------------------------------------------------------------------- /BozosCircusTestHarness/BozosCircus/MessageBoxDeluxe/MessageBoxDeluxe.xaml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |