├── 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 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/BozosCircusTestHarness/BozosCircus/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Resources;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 | using System.Windows;
6 |
7 | // General Information about an assembly is controlled through the following
8 | // set of attributes. Change these attribute values to modify the information
9 | // associated with an assembly.
10 | [assembly: AssemblyTitle("BozosCircus")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("BozosCircus")]
15 | [assembly: AssemblyCopyright("Copyright © 2009")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // Setting ComVisible to false makes the types in this assembly not visible
20 | // to COM components. If you need to access a type in this assembly from
21 | // COM, set the ComVisible attribute to true on that type.
22 | [assembly: ComVisible(false)]
23 |
24 | //In order to begin building localizable applications, set
25 | //CultureYouAreCodingWith in your .csproj file
26 | //inside a . For example, if you are using US english
27 | //in your source files, set the to en-US. Then uncomment
28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in
29 | //the line below to match the UICulture setting in the project file.
30 |
31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32 |
33 |
34 | [assembly: ThemeInfo(
35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
36 | //(used if a resource is not found in the page,
37 | // or application resource dictionaries)
38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
39 | //(used if a resource is not found in the page,
40 | // app, or any theme specific resource dictionaries)
41 | )]
42 |
43 |
44 | // Version information for an assembly consists of the following four values:
45 | //
46 | // Major Version
47 | // Minor Version
48 | // Build Number
49 | // Revision
50 | //
51 | // You can specify all the values or you can default the Build and Revision Numbers
52 | // by using the '*' as shown below:
53 | // [assembly: AssemblyVersion("1.0.*")]
54 | [assembly: AssemblyVersion("1.0.0.0")]
55 | [assembly: AssemblyFileVersion("1.0.0.0")]
56 |
--------------------------------------------------------------------------------
/BozosCircusTestHarness/BozosCircusTestHarness/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Resources;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 | using System.Windows;
6 |
7 | // General Information about an assembly is controlled through the following
8 | // set of attributes. Change these attribute values to modify the information
9 | // associated with an assembly.
10 | [assembly: AssemblyTitle("BozosCircusTestHarness")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("BozosCircusTestHarness")]
15 | [assembly: AssemblyCopyright("Copyright © 2009")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // Setting ComVisible to false makes the types in this assembly not visible
20 | // to COM components. If you need to access a type in this assembly from
21 | // COM, set the ComVisible attribute to true on that type.
22 | [assembly: ComVisible(false)]
23 |
24 | //In order to begin building localizable applications, set
25 | //CultureYouAreCodingWith in your .csproj file
26 | //inside a . For example, if you are using US english
27 | //in your source files, set the to en-US. Then uncomment
28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in
29 | //the line below to match the UICulture setting in the project file.
30 |
31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32 |
33 |
34 | [assembly: ThemeInfo(
35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
36 | //(used if a resource is not found in the page,
37 | // or application resource dictionaries)
38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
39 | //(used if a resource is not found in the page,
40 | // app, or any theme specific resource dictionaries)
41 | )]
42 |
43 |
44 | // Version information for an assembly consists of the following four values:
45 | //
46 | // Major Version
47 | // Minor Version
48 | // Build Number
49 | // Revision
50 | //
51 | // You can specify all the values or you can default the Build and Revision Numbers
52 | // by using the '*' as shown below:
53 | // [assembly: AssemblyVersion("1.0.*")]
54 | [assembly: AssemblyVersion("1.0.0.0")]
55 | [assembly: AssemblyFileVersion("1.0.0.0")]
56 |
--------------------------------------------------------------------------------
/BozosCircusTestHarness/BozosCircus/MessageBoxDeluxe/MessageBoxDeluxe.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Windows;
3 | using System.Windows.Input;
4 |
5 | namespace BozosCircus.MessageBoxDeluxe
6 | {
7 | ///
8 | /// Interaction logic for ButterMessageBox.xaml
9 | ///
10 | public partial class MessageBoxDeluxe : Window
11 | {
12 | public MessageBoxDeluxe()
13 | {
14 | InitializeComponent();
15 | }
16 |
17 | public void ShowCustomMessageBox(
18 | IEnumerable buttonDefinitions,
19 | string message,
20 | string caption)
21 | {
22 | List buttonCommands = _CreateButtonCommands(buttonDefinitions);
23 | var window = this;
24 | var model = new ButterMessageViewModel
25 | {
26 | MessageText = message,
27 | MessageCaption = caption,
28 | ButtonCommands = buttonCommands
29 | };
30 | window.DataContext = model;
31 | window.ShowDialog();
32 | }
33 |
34 | ///
35 | /// Converts the button choice definitions provided into ButtonCommand objects that
36 | /// the dialog can bind directly to.
37 | ///
38 | ///
39 | ///
40 | private List _CreateButtonCommands(IEnumerable buttonDefinitions)
41 | {
42 | var buttonCommands = new List();
43 | var counter = 0;
44 |
45 | foreach (var definition in buttonDefinitions)
46 | {
47 | buttonCommands.Add(new ButtonCommand()
48 | {
49 | ButtonCommandObject = new LambdaCommand(definition.Value, x => true),
50 | ButtonText = definition.Key,
51 | ButtonID = counter
52 | });
53 | counter++;
54 | }
55 | return buttonCommands;
56 | }
57 |
58 | internal class ButterMessageViewModel
59 | {
60 | public string MessageCaption
61 | { get; set; }
62 | public string MessageText
63 | { get; set; }
64 | public List ButtonCommands
65 | { get; set; }
66 | }
67 |
68 | internal class ButtonCommand
69 | {
70 | public ICommand ButtonCommandObject
71 | { get; set; }
72 | public string ButtonText
73 | { get; set; }
74 | public int ButtonID
75 | { get; set; }
76 | }
77 | }
78 | }
--------------------------------------------------------------------------------
/BozosCircusTestHarness/BozosCircus/Properties/Resources.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 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// Returns the cached ResourceManager instance used by this class.
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("BozosCircus.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// Overrides the current thread's CurrentUICulture property for all
56 | /// resource lookups using this strongly typed resource class.
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/BozosCircusTestHarness/BozosCircusTestHarness/Properties/Resources.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 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// Returns the cached ResourceManager instance used by this class.
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("BozosCircusTestHarness.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// Overrides the current thread's CurrentUICulture property for all
56 | /// resource lookups using this strongly typed resource class.
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/BozosCircusTestHarness/BozosCircusTestHarness/Window1.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 | using BozosCircus.MessageBoxDeluxe;
15 | using BozosCircus.SmartStart;
16 |
17 | namespace BozosCircusTestHarness
18 | {
19 | ///
20 | /// Interaction logic for Window1.xaml
21 | ///
22 | public partial class Window1 : Window
23 | {
24 | public Window1()
25 | {
26 | InitializeComponent();
27 | PreviewKeyDown += Window1_PreviewKeyDown;
28 | PreviewKeyUp += Window1_PreviewKeyUp;
29 |
30 | _Launcher = new SmartStart(
31 | new ActionMapper(
32 | new[]
33 | {
34 | new Verb(
35 | "select",
36 | new[]
37 | {
38 | new Noun
39 | {
40 | Name = "table",
41 | Do = () => MessageBox.Show("select table")
42 | },
43 | new Noun
44 | {
45 | Name = "cells",
46 | Do = () => MessageBox.Show("select cells")
47 | }
48 | }
49 | ),
50 | new Verb(
51 | "export",
52 | new[]
53 | {
54 | new Noun()
55 | {
56 | Name = "table",
57 | Do = () => MessageBox.Show("export table")
58 | }
59 | }),
60 | }
61 | )
62 | );
63 | }
64 |
65 | void Window1_PreviewKeyUp(object sender, KeyEventArgs e)
66 | {
67 | _PreviousKey = _CurrentKey;
68 | _CurrentKey = Key.None;
69 | }
70 |
71 | private SmartStart _Launcher;
72 |
73 | private Key _PreviousKey;
74 | private Key _CurrentKey;
75 | void Window1_PreviewKeyDown(object sender, KeyEventArgs e)
76 | {
77 | _PreviousKey = _CurrentKey;
78 | _CurrentKey = e.Key;
79 |
80 | if ((_PreviousKey == Key.LeftCtrl && _CurrentKey == Key.Space) ||
81 | (_PreviousKey == Key.Space && _CurrentKey == Key.LeftCtrl))
82 | {
83 | _PreviousKey = Key.None;
84 | _CurrentKey = Key.None;
85 |
86 | _Launcher.Show();
87 | _Launcher.Focus();
88 | }
89 | }
90 |
91 | private void button1_Click(object sender, RoutedEventArgs e)
92 | {
93 | new MessageBoxDeluxe().ShowCustomMessageBox(
94 | new[]
95 | {
96 | new MessageBoxChoice("Save and Continue", x => MessageBox.Show("You chose to save!")),
97 | new MessageBoxChoice("Don't Save and Continue", x => MessageBox.Show("You chose to not save!")),
98 | new MessageBoxChoice("Cancel", x => MessageBox.Show("You chose cancel!"))
99 | },
100 | "What do you want to do now?",
101 | "Your caption here...");
102 | }
103 | }
104 | }
105 |
--------------------------------------------------------------------------------
/BozosCircusTestHarness/BozosCircus/BozosCircus.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | 9.0.21022
7 | 2.0
8 | {4AD2CD1F-9CA5-46E8-A938-80020995073B}
9 | library
10 | Properties
11 | BozosCircus
12 | BozosCircus
13 | v3.5
14 | 512
15 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
16 | 4
17 |
18 |
19 | true
20 | full
21 | false
22 | bin\Debug\
23 | DEBUG;TRACE
24 | prompt
25 | 4
26 |
27 |
28 | pdbonly
29 | true
30 | bin\Release\
31 | TRACE
32 | prompt
33 | 4
34 |
35 |
36 |
37 |
38 | 3.5
39 |
40 |
41 | 3.5
42 |
43 |
44 | 3.5
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | MSBuild:Compile
55 | Designer
56 |
57 |
58 | MSBuild:Compile
59 | Designer
60 |
61 |
62 | MSBuild:Compile
63 | Designer
64 |
65 |
66 | UserControl1.xaml
67 | Code
68 |
69 |
70 |
71 |
72 | MessageBoxDeluxe.xaml
73 |
74 |
75 |
76 |
77 | Code
78 |
79 |
80 | True
81 | True
82 | Resources.resx
83 |
84 |
85 | True
86 | Settings.settings
87 | True
88 |
89 |
90 |
91 | SmartStart.xaml
92 |
93 |
94 | ResXFileCodeGenerator
95 | Resources.Designer.cs
96 |
97 |
98 | SettingsSingleFileGenerator
99 | Settings.Designer.cs
100 |
101 |
102 |
103 |
104 |
111 |
--------------------------------------------------------------------------------
/BozosCircusTestHarness/BozosCircusTestHarness/BozosCircusTestHarness.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | 9.0.21022
7 | 2.0
8 | {CC30B625-506A-4B0F-A278-2B46D754DDFD}
9 | WinExe
10 | Properties
11 | BozosCircusTestHarness
12 | BozosCircusTestHarness
13 | v3.5
14 | 512
15 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
16 | 4
17 |
18 |
19 | true
20 | full
21 | false
22 | bin\Debug\
23 | DEBUG;TRACE
24 | prompt
25 | 4
26 |
27 |
28 | pdbonly
29 | true
30 | bin\Release\
31 | TRACE
32 | prompt
33 | 4
34 |
35 |
36 |
37 |
38 | 3.5
39 |
40 |
41 | 3.5
42 |
43 |
44 | 3.5
45 |
46 |
47 |
48 |
49 | 3.0
50 |
51 |
52 | 3.0
53 |
54 |
55 | 3.0
56 |
57 |
58 | 3.0
59 |
60 |
61 |
62 |
63 | MSBuild:Compile
64 | Designer
65 |
66 |
67 | MSBuild:Compile
68 | Designer
69 |
70 |
71 | App.xaml
72 | Code
73 |
74 |
75 | Window1.xaml
76 | Code
77 |
78 |
79 |
80 |
81 | Code
82 |
83 |
84 | True
85 | True
86 | Resources.resx
87 |
88 |
89 | True
90 | Settings.settings
91 | True
92 |
93 |
94 | ResXFileCodeGenerator
95 | Resources.Designer.cs
96 |
97 |
98 | SettingsSingleFileGenerator
99 | Settings.Designer.cs
100 |
101 |
102 |
103 |
104 |
105 | {4AD2CD1F-9CA5-46E8-A938-80020995073B}
106 | BozosCircus
107 |
108 |
109 |
110 |
117 |
--------------------------------------------------------------------------------
/BozosCircusTestHarness/BozosCircus/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/BozosCircusTestHarness/BozosCircusTestHarness/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------