Commit 5a6d396
Changed files (79)
trunk
product
Gorilla.Commons.Windows.Forms
Databinding
Helpers
Keyboard
Gorilla.Commons.Windows.Forms.ThirdParty
MoMoney.Presentation
Databindings
Model
Keyboard
Navigation
Presenters
Navigation
Resources
Views
Billing
Core
Income
Shell
Updates
MyMoney
trunk/product/MoMoney.Presentation/Databindings/binding_selector.cs → trunk/product/Gorilla.Commons.Windows.Forms/Databinding/BindingSelector.cs
@@ -1,7 +1,7 @@
using System;
using System.Linq.Expressions;
-namespace MoMoney.Presentation.Databindings
+namespace Gorilla.Commons.Windows.Forms.Databinding
{
public interface IBindingSelector<TypeToBindTo>
{
@@ -9,12 +9,12 @@ namespace MoMoney.Presentation.Databindings
Expression<Func<TypeToBindTo, TypeOfProperty>> property_to_bind_to);
}
- public class binding_selector<TypeToBindTo> : IBindingSelector<TypeToBindTo>
+ public class BindingSelector<TypeToBindTo> : IBindingSelector<TypeToBindTo>
{
private readonly TypeToBindTo thing_to_bind_to;
private readonly IPropertyInspectorFactory factory;
- public binding_selector(TypeToBindTo thing_to_bind_to, IPropertyInspectorFactory factory)
+ public BindingSelector(TypeToBindTo thing_to_bind_to, IPropertyInspectorFactory factory)
{
this.thing_to_bind_to = thing_to_bind_to;
this.factory = factory;
@@ -24,7 +24,7 @@ namespace MoMoney.Presentation.Databindings
Expression<Func<TypeToBindTo, TypeOfProperty>> property_to_bind_to)
{
var property_information = factory.create<TypeToBindTo, TypeOfProperty>().inspect(property_to_bind_to);
- return new property_binder<TypeToBindTo, TypeOfProperty>(property_information, thing_to_bind_to);
+ return new PropertyBinder<TypeToBindTo, TypeOfProperty>(property_information, thing_to_bind_to);
}
}
}
\ No newline at end of file
trunk/product/MoMoney.Presentation/Databindings/binding_selector_specs.cs → trunk/product/Gorilla.Commons.Windows.Forms/Databinding/BindingSelectorSpecs.cs
@@ -3,16 +3,20 @@ using System.Linq.Expressions;
using developwithpassion.bdd.contexts;
using Gorilla.Commons.Testing;
-namespace MoMoney.Presentation.Databindings
+namespace Gorilla.Commons.Windows.Forms.Databinding
{
- [Concern(typeof (binding_selector<IAnInterface>))]
+ public class BindingSelectorSpecs
+ {
+ }
+
+ [Concern(typeof (BindingSelector<IAnInterface>))]
public class when_selecting_a_property_as_the_target_of_a_binding : concerns_for<IBindingSelector<IAnInterface>>
{
it should_return_a_binder_bound_to_the_correct_property =
() => result.property.Name.should_be_equal_to("FirstName");
it should_inspect_the_expression_for_the_property_information =
- () => MockingExtensions.was_told_to(inspector, i => i.inspect(expression_to_parse));
+ () => inspector.was_told_to(i => i.inspect(expression_to_parse));
context c = () =>
{
@@ -34,7 +38,7 @@ namespace MoMoney.Presentation.Databindings
public override IBindingSelector<IAnInterface> create_sut()
{
- return new binding_selector<IAnInterface>(thing_to_bind_to, factory);
+ return new BindingSelector<IAnInterface>(thing_to_bind_to, factory);
}
static IAnInterface thing_to_bind_to;
trunk/product/MoMoney.Presentation/Databindings/ComboBoxDataBindingSpecs.cs → trunk/product/Gorilla.Commons.Windows.Forms/Databinding/ComboBoxDataBindingSpecs.cs
@@ -2,7 +2,7 @@ using System.Windows.Forms;
using developwithpassion.bdd.contexts;
using Gorilla.Commons.Testing;
-namespace MoMoney.Presentation.Databindings
+namespace Gorilla.Commons.Windows.Forms.Databinding
{
[Concern(typeof (Create))]
public class when_binding_a_property_from_an_object_to_a_combo_box : concerns
@@ -20,7 +20,7 @@ namespace MoMoney.Presentation.Databindings
combo_box.Items.Add(baby_boy);
combo_box.Items.Add(baby_girl);
- MockingExtensions.it_will_return(MockingExtensions.is_asked_for(when_the(thing_to_bind_to), t => t.Child), baby_girl);
+ when_the(thing_to_bind_to).is_asked_for(t => t.Child).it_will_return(baby_girl);
};
because b = () => Create
trunk/product/MoMoney.Presentation/Databindings/combo_box_property_binding.cs → trunk/product/Gorilla.Commons.Windows.Forms/Databinding/ComboBoxPropertyBinding.cs
@@ -1,13 +1,13 @@
using System.Windows.Forms;
using Gorilla.Commons.Utility.Extensions;
-namespace MoMoney.Presentation.Databindings
+namespace Gorilla.Commons.Windows.Forms.Databinding
{
- public class combo_box_property_binding<TypeToBindTo, PropertyType> : IPropertyBinding<PropertyType>
+ public class ComboBoxPropertyBinding<TypeToBindTo, PropertyType> : IPropertyBinding<PropertyType>
{
private readonly IPropertyBinder<TypeToBindTo, PropertyType> binder;
- public combo_box_property_binding(ComboBox control, IPropertyBinder<TypeToBindTo, PropertyType> binder)
+ public ComboBoxPropertyBinding(ComboBox control, IPropertyBinder<TypeToBindTo, PropertyType> binder)
{
this.binder = binder;
control.SelectedItem = binder.current_value();
trunk/product/MoMoney.Presentation/Databindings/control_binding_extensions.cs → trunk/product/Gorilla.Commons.Windows.Forms/Databinding/ControlBindingExtensions.cs
@@ -1,29 +1,29 @@
using System;
using System.Windows.Forms;
-namespace MoMoney.Presentation.Databindings
+namespace Gorilla.Commons.Windows.Forms.Databinding
{
- public static class control_binding_extensions
+ public static class ControlBindingExtensions
{
public static IPropertyBinding<PropertyType> bound_to_control<TypeToBindTo, PropertyType>(
this IPropertyBinder<TypeToBindTo, PropertyType> binder,
Control control)
{
- return new text_property_binding<TypeToBindTo, PropertyType>(control, binder);
+ return new TextPropertyBinding<TypeToBindTo, PropertyType>(control, binder);
}
public static IPropertyBinding<PropertyType> bound_to_control<TypeToBindTo, PropertyType>(
this IPropertyBinder<TypeToBindTo, PropertyType> binder,
ComboBox control)
{
- return new combo_box_property_binding<TypeToBindTo, PropertyType>(control, binder);
+ return new ComboBoxPropertyBinding<TypeToBindTo, PropertyType>(control, binder);
}
public static IPropertyBinding<DateTime> bound_to_control<TypeToBindTo>(
this IPropertyBinder<TypeToBindTo, DateTime> binder,
DateTimePicker control)
{
- return new date_time_picker_property_binding<TypeToBindTo>(control, binder);
+ return new DateTimePickerPropertyBinding<TypeToBindTo>(control, binder);
}
}
}
\ No newline at end of file
trunk/product/MoMoney.Presentation/Databindings/Create.cs → trunk/product/Gorilla.Commons.Windows.Forms/Databinding/Create.cs
@@ -2,13 +2,13 @@ using System;
using System.Linq.Expressions;
using System.Windows.Forms;
-namespace MoMoney.Presentation.Databindings
+namespace Gorilla.Commons.Windows.Forms.Databinding
{
public static class Create
{
public static IBindingSelector<TypeToBindTo> binding_for<TypeToBindTo>(TypeToBindTo thing_to_bind_to)
{
- return new binding_selector<TypeToBindTo>(thing_to_bind_to, new property_inspector_factory());
+ return new BindingSelector<TypeToBindTo>(thing_to_bind_to, new PropertyInspectorFactory());
}
public static IPropertyBinding<TypeOfProperty> bind_to<TypeToBindTo, TypeOfProperty>(
trunk/product/Gorilla.Commons.Windows.Forms/Databinding/DateTimePickerPropertyBinding.cs
@@ -0,0 +1,21 @@
+using System;
+using System.Windows.Forms;
+
+namespace Gorilla.Commons.Windows.Forms.Databinding
+{
+ public class DateTimePickerPropertyBinding<TypeToBindTo> : IPropertyBinding<DateTime>
+ {
+ private readonly IPropertyBinder<TypeToBindTo, DateTime> binder;
+
+ public DateTimePickerPropertyBinding(DateTimePicker control, IPropertyBinder<TypeToBindTo, DateTime> binder)
+ {
+ this.binder = binder;
+ control.ValueChanged += (o, e) => binder.change_value_of_property_to(control.Value);
+ }
+
+ public DateTime current_value()
+ {
+ return binder.current_value();
+ }
+ }
+}
\ No newline at end of file
trunk/product/MoMoney.Presentation/Databindings/date_time_property_binding_specs.cs → trunk/product/Gorilla.Commons.Windows.Forms/Databinding/DateTimePropertyBindingSpecs.cs
@@ -3,13 +3,13 @@ using System.Windows.Forms;
using developwithpassion.bdd.contexts;
using Gorilla.Commons.Testing;
-namespace MoMoney.Presentation.Databindings
+namespace Gorilla.Commons.Windows.Forms.Databinding
{
[Concern(typeof (Create))]
public class when_a_new_date_is_selected_by_a_date_time_picker_that_is_bound_to_a_property : concerns
{
it should_update_the_value_of_the_property =
- () => thing_to_bind_to.birth_day.should_be_equal_to(november_nineteenth);
+ () => Assertions.should_be_equal_to(thing_to_bind_to.birth_day, november_nineteenth);
context c = () =>
{
@@ -32,4 +32,8 @@ namespace MoMoney.Presentation.Databindings
{
public DateTime birth_day { get; set; }
}
+
+ public class DateTimePropertyBindingSpecs
+ {
+ }
}
\ No newline at end of file
trunk/product/MoMoney.Presentation/Databindings/IPropertyBinding.cs → trunk/product/Gorilla.Commons.Windows.Forms/Databinding/IPropertyBinding.cs
@@ -1,4 +1,4 @@
-namespace MoMoney.Presentation.Databindings
+namespace Gorilla.Commons.Windows.Forms.Databinding
{
public interface IPropertyBinding<PropertyType>
{
trunk/product/Gorilla.Commons.Windows.Forms/Databinding/ListboxExtensions.cs
@@ -0,0 +1,15 @@
+using System.Collections.Generic;
+using System.Windows.Forms;
+using Gorilla.Commons.Utility.Extensions;
+
+namespace Gorilla.Commons.Windows.Forms.Databinding
+{
+ static public class ListboxExtensions
+ {
+ static public void bind_to<T>(this ComboBox control, IEnumerable<T> items)
+ {
+ control.Items.Clear();
+ items.each(x => control.Items.Add(x));
+ }
+ }
+}
\ No newline at end of file
trunk/product/MoMoney.Presentation/Databindings/property_binder.cs → trunk/product/Gorilla.Commons.Windows.Forms/Databinding/PropertyBinder.cs
@@ -1,6 +1,6 @@
using System.Reflection;
-namespace MoMoney.Presentation.Databindings
+namespace Gorilla.Commons.Windows.Forms.Databinding
{
public interface IPropertyBinder<TypeToBindTo, PropertyType>
{
@@ -10,9 +10,9 @@ namespace MoMoney.Presentation.Databindings
void change_value_of_property_to(PropertyType new_value);
}
- public class property_binder<TypeToBindTo, PropertyType> : IPropertyBinder<TypeToBindTo, PropertyType>
+ public class PropertyBinder<TypeToBindTo, PropertyType> : IPropertyBinder<TypeToBindTo, PropertyType>
{
- public property_binder(PropertyInfo propery_information, TypeToBindTo target)
+ public PropertyBinder(PropertyInfo propery_information, TypeToBindTo target)
{
property = target.GetType().GetProperty(propery_information.Name);
this.target = target;
trunk/product/MoMoney.Presentation/Databindings/property_binder_specs.cs → trunk/product/Gorilla.Commons.Windows.Forms/Databinding/PropertyBinderSpecs.cs
@@ -2,14 +2,15 @@ using System.Reflection;
using developwithpassion.bdd.contexts;
using Gorilla.Commons.Testing;
-namespace MoMoney.Presentation.Databindings
+namespace Gorilla.Commons.Windows.Forms.Databinding
{
- [Concern(typeof (property_binder<IAnInterface, string>))]
- public abstract class behaves_like_a_property_binder : concerns_for<IPropertyBinder<IAnInterface, string>, property_binder<IAnInterface, string>>
+ [Concern(typeof (PropertyBinder<IAnInterface, string>))]
+ public abstract class behaves_like_a_property_binder :
+ concerns_for<IPropertyBinder<IAnInterface, string>, PropertyBinder<IAnInterface, string>>
{
public override IPropertyBinder<IAnInterface, string> create_sut()
{
- return new property_binder<IAnInterface, string>(property, target);
+ return new PropertyBinder<IAnInterface, string>(property, target);
}
context c = () =>
@@ -18,8 +19,8 @@ namespace MoMoney.Presentation.Databindings
property = typeof (IAnInterface).GetProperty("FirstName");
};
- protected static IAnInterface target;
- protected static PropertyInfo property;
+ static protected IAnInterface target;
+ static protected PropertyInfo property;
}
public class when_changing_the_value_of_correctly_bound_property : behaves_like_a_property_binder
@@ -40,4 +41,8 @@ namespace MoMoney.Presentation.Databindings
static string result;
}
+
+ public class PropertyBinderSpecs
+ {
+ }
}
\ No newline at end of file
trunk/product/MoMoney.Presentation/Databindings/property_inspector.cs → trunk/product/Gorilla.Commons.Windows.Forms/Databinding/PropertyInspector.cs
@@ -3,14 +3,14 @@ using System.Linq.Expressions;
using System.Reflection;
using Gorilla.Commons.Utility.Extensions;
-namespace MoMoney.Presentation.Databindings
+namespace Gorilla.Commons.Windows.Forms.Databinding
{
public interface IPropertyInspector<TypeToBindTo, TypeOfProperty>
{
PropertyInfo inspect(Expression<Func<TypeToBindTo, TypeOfProperty>> property_to_bind_to);
}
- public class property_inspector<TypeToBindTo, TypeOfProperty> : IPropertyInspector<TypeToBindTo, TypeOfProperty>
+ public class PropertyInspector<TypeToBindTo, TypeOfProperty> : IPropertyInspector<TypeToBindTo, TypeOfProperty>
{
public PropertyInfo inspect(Expression<Func<TypeToBindTo, TypeOfProperty>> property_to_bind_to)
{
trunk/product/MoMoney.Presentation/Databindings/property_inspector_factory.cs → trunk/product/Gorilla.Commons.Windows.Forms/Databinding/PropertyInspectorFactory.cs
@@ -1,15 +1,15 @@
-namespace MoMoney.Presentation.Databindings
+namespace Gorilla.Commons.Windows.Forms.Databinding
{
public interface IPropertyInspectorFactory
{
IPropertyInspector<TypeToInspect, TypeOfProperty> create<TypeToInspect, TypeOfProperty>();
}
- public class property_inspector_factory : IPropertyInspectorFactory
+ public class PropertyInspectorFactory : IPropertyInspectorFactory
{
public IPropertyInspector<TypeToInspect, TypeOfProperty> create<TypeToInspect, TypeOfProperty>()
{
- return new property_inspector<TypeToInspect, TypeOfProperty>();
+ return new PropertyInspector<TypeToInspect, TypeOfProperty>();
}
}
}
\ No newline at end of file
trunk/product/MoMoney.Presentation/Databindings/property_inspector_specs.cs → trunk/product/Gorilla.Commons.Windows.Forms/Databinding/PropertyInspectorSpecs.cs
@@ -2,11 +2,11 @@ using System.Reflection;
using developwithpassion.bdd.contexts;
using Gorilla.Commons.Testing;
-namespace MoMoney.Presentation.Databindings
+namespace Gorilla.Commons.Windows.Forms.Databinding
{
- [Concern(typeof (property_inspector<IAnInterface, string>))]
+ [Concern(typeof (PropertyInspector<IAnInterface, string>))]
public class when_parsing_a_valie_expression_for_the_information_on_the_property :
- concerns_for<IPropertyInspector<IAnInterface, string>, property_inspector<IAnInterface, string>>
+ concerns_for<IPropertyInspector<IAnInterface, string>, PropertyInspector<IAnInterface, string>>
{
it should_return_the_correct_property_information = () => result.Name.should_be_equal_to("FirstName");
@@ -14,9 +14,13 @@ namespace MoMoney.Presentation.Databindings
public override IPropertyInspector<IAnInterface, string> create_sut()
{
- return new property_inspector<IAnInterface, string>();
+ return new PropertyInspector<IAnInterface, string>();
}
static PropertyInfo result;
}
+
+ public class PropertyInspectorSpecs
+ {
+ }
}
\ No newline at end of file
trunk/product/MoMoney.Presentation/Databindings/TextBoxDataBindingSpecs.cs → trunk/product/Gorilla.Commons.Windows.Forms/Databinding/TextBoxDataBindingSpecs.cs
@@ -2,7 +2,7 @@ using System.Windows.Forms;
using developwithpassion.bdd.contexts;
using Gorilla.Commons.Testing;
-namespace MoMoney.Presentation.Databindings
+namespace Gorilla.Commons.Windows.Forms.Databinding
{
[Concern(typeof (Create))]
public class when_binding_a_property_on_an_object_to_a_textbox : concerns
@@ -14,7 +14,7 @@ namespace MoMoney.Presentation.Databindings
{
thing_to_bind_to = an<IAnInterface>();
text_box = new TextBox();
- MockingExtensions.it_will_return(MockingExtensions.is_asked_for(thing_to_bind_to, t => t.FirstName), first_name);
+ thing_to_bind_to.is_asked_for(t => t.FirstName).it_will_return(first_name);
};
because b = () => Create
trunk/product/MoMoney.Presentation/Databindings/text_property_binding.cs → trunk/product/Gorilla.Commons.Windows.Forms/Databinding/TextPropertyBinding.cs
@@ -2,18 +2,18 @@ using System;
using System.Windows.Forms;
using Gorilla.Commons.Utility.Extensions;
-namespace MoMoney.Presentation.Databindings
+namespace Gorilla.Commons.Windows.Forms.Databinding
{
- public class text_property_binding<TypeToBindTo, PropertyType> : IPropertyBinding<PropertyType>
+ public class TextPropertyBinding<TypeToBindTo, PropertyType> : IPropertyBinding<PropertyType>
{
private readonly IPropertyBinder<TypeToBindTo, PropertyType> binder;
- public text_property_binding(Control control, IPropertyBinder<TypeToBindTo, PropertyType> binder)
+ public TextPropertyBinding(Control control, IPropertyBinder<TypeToBindTo, PropertyType> binder)
{
this.binder = binder;
control.Text = "{0}".formatted_using(binder.current_value());
control.TextChanged +=
- ((sender, e) => binder.change_value_of_property_to(control.Text.converted_to<PropertyType>()));
+ (o, e) => binder.change_value_of_property_to(control.Text.converted_to<PropertyType>());
}
public PropertyType current_value()
trunk/product/Gorilla.Commons.Windows.Forms/Helpers/BindableListBox.cs
@@ -0,0 +1,32 @@
+using System.Collections.Generic;
+
+namespace Gorilla.Commons.Windows.Forms.Helpers
+{
+ public class BindableListBox<ItemToBindTo> : IBindableList<ItemToBindTo>
+ {
+ readonly IListControl<ItemToBindTo> listControl;
+
+ public BindableListBox(IListControl<ItemToBindTo> listControl)
+ {
+ this.listControl = listControl;
+ }
+
+ public void bind_to(IEnumerable<ItemToBindTo> items)
+ {
+ foreach (var item in items)
+ {
+ listControl.add_item(item);
+ }
+ }
+
+ public ItemToBindTo get_selected_item()
+ {
+ return listControl.get_selected_item();
+ }
+
+ public void set_selected_item(ItemToBindTo item)
+ {
+ listControl.set_selected_item(item);
+ }
+ }
+}
\ No newline at end of file
trunk/product/Gorilla.Commons.Windows.Forms/Helpers/BindableListFactory.cs
@@ -0,0 +1,17 @@
+using System.Windows.Forms;
+
+namespace Gorilla.Commons.Windows.Forms.Helpers
+{
+ static public class BindableListFactory
+ {
+ static public IBindableList<ItemToBindTo> create_for<ItemToBindTo>(ListBox listbox)
+ {
+ return new BindableListBox<ItemToBindTo>(new ListBoxListControl<ItemToBindTo>(listbox));
+ }
+
+ static public IBindableList<ItemToBindTo> create_for<ItemToBindTo>(ComboBox combobox)
+ {
+ return new BindableListBox<ItemToBindTo>(new ComboBoxListControl<ItemToBindTo>(combobox));
+ }
+ }
+}
\ No newline at end of file
trunk/product/MoMoney.Presentation/Views/Shell/BitmapRegion.cs → trunk/product/Gorilla.Commons.Windows.Forms/Helpers/BitmapRegion.cs
@@ -2,7 +2,7 @@ using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
-namespace MoMoney.Presentation.Views.Shell
+namespace Gorilla.Commons.Windows.Forms.Helpers
{
public static class BitmapRegion
{
trunk/product/MoMoney.Presentation/Views/Shell/button_extensions.cs → trunk/product/Gorilla.Commons.Windows.Forms/Helpers/ButtonExtensions.cs
@@ -4,11 +4,11 @@ using System.Windows.Forms;
using Gorilla.Commons.Infrastructure.Container;
using Gorilla.Commons.Utility.Core;
-namespace MoMoney.Presentation.Views.Shell
+namespace Gorilla.Commons.Windows.Forms.Helpers
{
- public static class ButtonExtensions
+ static public class ButtonExtensions
{
- public static Button will_be_shown_as(this Button button, Bitmap image)
+ static public Button will_be_shown_as(this Button button, Bitmap image)
{
BitmapRegion.CreateControlRegion(button, image);
button.MouseLeave += (sender, e) => BitmapRegion.CreateControlRegion(button, image);
@@ -16,20 +16,20 @@ namespace MoMoney.Presentation.Views.Shell
return button;
}
- public static Button when_hovered_over_will_show(this Button button, Bitmap image)
+ static public Button when_hovered_over_will_show(this Button button, Bitmap image)
{
button.MouseEnter += (sender, e) => BitmapRegion.CreateControlRegion(button, image);
return button;
}
- public static Button will_execute<Command>(this Button button, Func<bool> when) where Command : ICommand
+ static public Button will_execute<Command>(this Button button, Func<bool> when) where Command : ICommand
{
button.Click += (sender, e) => { if (when()) Resolve.dependency_for<Command>().run(); };
button.Enabled = when();
return button;
}
- public static Control with_tool_tip(this Control control, string title, string caption)
+ static public Control with_tool_tip(this Control control, string title, string caption)
{
var tip = new ToolTip
{
@@ -41,29 +41,8 @@ namespace MoMoney.Presentation.Views.Shell
AutoPopDelay = 10000,
};
tip.SetToolTip(control, caption);
- control.Controls.Add(adapt(tip));
+ control.Controls.Add(new ControlAdapter(tip));
return control;
}
-
- static Control adapt(IDisposable item)
- {
- return new ControlAdapter(item);
- }
-
- class ControlAdapter : Control
- {
- readonly IDisposable item;
-
- public ControlAdapter(IDisposable item)
- {
- this.item = item;
- }
-
- protected override void Dispose(bool disposing)
- {
- if (disposing) item.Dispose();
- base.Dispose(disposing);
- }
- }
}
}
\ No newline at end of file
trunk/product/Gorilla.Commons.Windows.Forms/Helpers/ComboBoxListControl.cs
@@ -0,0 +1,36 @@
+using System.Windows.Forms;
+
+namespace Gorilla.Commons.Windows.Forms.Helpers
+{
+ public class ComboBoxListControl<ItemToStore> : IListControl<ItemToStore>
+ {
+ readonly ComboBox combo_box;
+
+ public ComboBoxListControl(ComboBox combo_box)
+ {
+ this.combo_box = combo_box;
+ }
+
+ public ItemToStore get_selected_item()
+ {
+ return (ItemToStore) combo_box.SelectedItem;
+ }
+
+ public void add_item(ItemToStore item)
+ {
+ combo_box.Items.Add(item);
+ combo_box.SelectedIndex = 0;
+ }
+
+ public void set_selected_item(ItemToStore item)
+ {
+ if (!Equals(item, default(ItemToStore)))
+ {
+ if (combo_box.Items.Contains(item))
+ {
+ combo_box.SelectedItem = item;
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
trunk/product/MoMoney.Presentation/Views/Helpers/ControlAdapter.cs → trunk/product/Gorilla.Commons.Windows.Forms/Helpers/ControlAdapter.cs
@@ -1,9 +1,9 @@
using System;
using System.Windows.Forms;
-namespace MoMoney.Presentation.Views.helpers
+namespace Gorilla.Commons.Windows.Forms.Helpers
{
- class ControlAdapter : Control
+ public class ControlAdapter : Control
{
readonly IDisposable item;
trunk/product/MoMoney.Presentation/Views/Helpers/Events.cs → trunk/product/Gorilla.Commons.Windows.Forms/Helpers/Events.cs
@@ -2,7 +2,7 @@ using System;
using System.ComponentModel;
using System.Windows.Forms;
-namespace MoMoney.Presentation.Views.helpers
+namespace Gorilla.Commons.Windows.Forms.Helpers
{
public class Events
{
trunk/product/MoMoney.Presentation/Views/Helpers/EventTrigger.cs → trunk/product/Gorilla.Commons.Windows.Forms/Helpers/EventTrigger.cs
@@ -5,7 +5,7 @@ using System.Linq.Expressions;
using System.Reflection;
using Gorilla.Commons.Utility.Extensions;
-namespace MoMoney.Presentation.Views.helpers
+namespace Gorilla.Commons.Windows.Forms.Helpers
{
public static class EventTrigger
{
trunk/product/MoMoney.Presentation/Views/Helpers/EventTriggerExtensions.cs → trunk/product/Gorilla.Commons.Windows.Forms/Helpers/EventTriggerExtensions.cs
@@ -1,7 +1,7 @@
using System;
using System.Linq.Expressions;
-namespace MoMoney.Presentation.Views.helpers
+namespace Gorilla.Commons.Windows.Forms.Helpers
{
public static class EventTriggerExtensions
{
trunk/product/MoMoney.Presentation/Views/Helpers/EventTriggerSpecs.cs → trunk/product/Gorilla.Commons.Windows.Forms/Helpers/EventTriggerSpecs.cs
@@ -3,15 +3,15 @@ using System.Windows.Forms;
using developwithpassion.bdd.contexts;
using Gorilla.Commons.Testing;
-namespace MoMoney.Presentation.Views.helpers
+namespace Gorilla.Commons.Windows.Forms.Helpers
{
public class when_invoking_a_call_on_a_target_via_reflection : concerns
{
it should_correctly_call_that_method =
() =>
{
- control.called_on_key_press.should_be_true();
- control.called_on_enter.should_be_false();
+ Assertions.should_be_true(control.called_on_key_press);
+ Assertions.should_be_false(control.called_on_enter);
};
context c = () => { control = new TestControl(); };
trunk/product/Gorilla.Commons.Windows.Forms/Helpers/IBindableList.cs
@@ -0,0 +1,11 @@
+using System.Collections.Generic;
+
+namespace Gorilla.Commons.Windows.Forms.Helpers
+{
+ public interface IBindableList<ItemToBindTo>
+ {
+ void bind_to(IEnumerable<ItemToBindTo> items);
+ ItemToBindTo get_selected_item();
+ void set_selected_item(ItemToBindTo item);
+ }
+}
\ No newline at end of file
trunk/product/Gorilla.Commons.Windows.Forms/Helpers/IEventTarget.cs
@@ -0,0 +1,6 @@
+namespace Gorilla.Commons.Windows.Forms.Helpers
+{
+ public interface IEventTarget
+ {
+ }
+}
\ No newline at end of file
trunk/product/Gorilla.Commons.Windows.Forms/Helpers/IListControl.cs
@@ -0,0 +1,9 @@
+namespace Gorilla.Commons.Windows.Forms.Helpers
+{
+ public interface IListControl<ItemToStore>
+ {
+ ItemToStore get_selected_item();
+ void add_item(ItemToStore item);
+ void set_selected_item(ItemToStore item);
+ }
+}
\ No newline at end of file
trunk/product/Gorilla.Commons.Windows.Forms/Helpers/ListBoxListControl.cs
@@ -0,0 +1,32 @@
+using System.Windows.Forms;
+
+namespace Gorilla.Commons.Windows.Forms.Helpers
+{
+ public class ListBoxListControl<ItemToStore> : IListControl<ItemToStore>
+ {
+ readonly ListBox list_box;
+
+ public ListBoxListControl(ListBox list_box)
+ {
+ this.list_box = list_box;
+ }
+
+ public ItemToStore get_selected_item()
+ {
+ return (ItemToStore) list_box.SelectedItem;
+ }
+
+ public void add_item(ItemToStore item)
+ {
+ list_box.Items.Add(item);
+ }
+
+ public void set_selected_item(ItemToStore item)
+ {
+ if (list_box.Items.Contains(item))
+ {
+ list_box.SelectedItem = item;
+ }
+ }
+ }
+}
\ No newline at end of file
trunk/product/MoMoney.Presentation/Views/Helpers/SuspendLayout.cs → trunk/product/Gorilla.Commons.Windows.Forms/Helpers/SuspendLayout.cs
@@ -1,7 +1,7 @@
using System;
using System.Windows.Forms;
-namespace MoMoney.Presentation.Views.helpers
+namespace Gorilla.Commons.Windows.Forms.Helpers
{
public class SuspendLayout : IDisposable
{
trunk/product/MoMoney.Presentation/Model/Keyboard/ShortcutKey.cs → trunk/product/Gorilla.Commons.Windows.Forms/Keyboard/ShortcutKey.cs
@@ -1,6 +1,6 @@
using System.Windows.Forms;
-namespace MoMoney.Presentation.Model.keyboard
+namespace Gorilla.Commons.Windows.Forms.Keyboard
{
public class ShortcutKey
{
trunk/product/Gorilla.Commons.Windows.Forms/Keyboard/ShortcutKeys.cs
@@ -0,0 +1,16 @@
+using System.Windows.Forms;
+
+namespace Gorilla.Commons.Windows.Forms.Keyboard
+{
+ static public class ShortcutKeys
+ {
+ static public readonly ShortcutKey control = new ShortcutKey(Keys.Control);
+ static public readonly ShortcutKey alt = new ShortcutKey(Keys.Alt);
+ static public readonly ShortcutKey none = new ShortcutKey(Keys.None);
+ static public readonly ShortcutKey L = new ShortcutKey(Keys.L);
+ static public readonly ShortcutKey N = new ShortcutKey(Keys.N);
+ static public readonly ShortcutKey O = new ShortcutKey(Keys.O);
+ static public readonly ShortcutKey S = new ShortcutKey(Keys.S);
+ static public readonly ShortcutKey X = new ShortcutKey(Keys.X);
+ }
+}
\ No newline at end of file
trunk/product/MoMoney.Presentation/Resources/ApplicationIcon.cs → trunk/product/Gorilla.Commons.Windows.Forms/Resources/ApplicationIcon.cs
@@ -3,18 +3,18 @@ using System.Drawing;
using System.IO;
using Gorilla.Commons.Infrastructure.Reflection;
-namespace MoMoney.Presentation.Resources
+namespace Gorilla.Commons.Windows.Forms.Resources
{
public class ApplicationIcon : IDisposable
{
readonly Icon underlying_icon;
- public ApplicationIcon(string name_of_the_icon)
+ public ApplicationIcon(string name_of_the_icon, Action<ApplicationIcon> action)
{
this.name_of_the_icon = name_of_the_icon;
if (icon_can_be_found())
{
- ApplicationIcons.add(this);
+ action(this);
underlying_icon = new Icon(find_full_path_to(this));
}
}
@@ -26,7 +26,7 @@ namespace MoMoney.Presentation.Resources
if (underlying_icon != null) underlying_icon.Dispose();
}
- public static implicit operator Icon(ApplicationIcon icon_to_convert)
+ static public implicit operator Icon(ApplicationIcon icon_to_convert)
{
return icon_to_convert.underlying_icon;
}
trunk/product/MoMoney.Presentation/Resources/ApplicationImage.cs → trunk/product/Gorilla.Commons.Windows.Forms/Resources/ApplicationImage.cs
@@ -3,7 +3,7 @@ using System.Drawing;
using System.IO;
using Gorilla.Commons.Infrastructure.Reflection;
-namespace MoMoney.Presentation.Resources
+namespace Gorilla.Commons.Windows.Forms.Resources
{
public class ApplicationImage : IDisposable
{
trunk/product/MoMoney.Presentation/Resources/HybridIcon.cs → trunk/product/Gorilla.Commons.Windows.Forms/Resources/HybridIcon.cs
@@ -1,14 +1,16 @@
+using System;
using System.Drawing;
-namespace MoMoney.Presentation.Resources
+namespace Gorilla.Commons.Windows.Forms.Resources
{
public class HybridIcon : ApplicationIcon
{
- private readonly Image underlying_image;
+ readonly Image underlying_image;
- public HybridIcon(string name_of_the_icon) : base(name_of_the_icon)
+ public HybridIcon(string name_of_the_icon, Action<ApplicationIcon> action) : base(name_of_the_icon, action)
{
- if (icon_can_be_found()) {
+ if (icon_can_be_found())
+ {
underlying_image = Image.FromFile(find_full_path_to(this));
}
}
@@ -19,7 +21,7 @@ namespace MoMoney.Presentation.Resources
if (underlying_image != null) underlying_image.Dispose();
}
- public static implicit operator Image(HybridIcon icon_to_convert)
+ static public implicit operator Image(HybridIcon icon_to_convert)
{
return icon_to_convert.underlying_image;
}
trunk/product/Gorilla.Commons.Windows.Forms/Gorilla.Commons.Windows.Forms.csproj
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{54B55B2B-A58F-45DF-A446-234C9D70DC0B}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>Gorilla.Commons.Windows.Forms</RootNamespace>
+ <AssemblyName>Gorilla.Commons.Windows.Forms</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="bdddoc, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\build\lib\test\bdd.doc\bdddoc.dll</HintPath>
+ </Reference>
+ <Reference Include="developwithpassion.bdd, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\build\lib\test\developwithpassion\developwithpassion.bdd.dll</HintPath>
+ </Reference>
+ <Reference Include="Rhino.Mocks, Version=3.5.0.1337, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\build\lib\test\rhino.mocks\Rhino.Mocks.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Core">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Windows.Forms" />
+ <Reference Include="System.Xml.Linq">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data.DataSetExtensions">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Databinding\BindingSelector.cs" />
+ <Compile Include="Databinding\BindingSelectorSpecs.cs" />
+ <Compile Include="Databinding\ComboBoxDataBindingSpecs.cs" />
+ <Compile Include="Databinding\ComboBoxPropertyBinding.cs" />
+ <Compile Include="Databinding\ControlBindingExtensions.cs" />
+ <Compile Include="Databinding\Create.cs" />
+ <Compile Include="Databinding\DateTimePickerPropertyBinding.cs" />
+ <Compile Include="Databinding\DateTimePropertyBindingSpecs.cs" />
+ <Compile Include="Databinding\IPropertyBinding.cs" />
+ <Compile Include="Databinding\ListboxExtensions.cs" />
+ <Compile Include="Databinding\PropertyBinder.cs" />
+ <Compile Include="Databinding\PropertyBinderSpecs.cs" />
+ <Compile Include="Databinding\PropertyInspector.cs" />
+ <Compile Include="Databinding\PropertyInspectorFactory.cs" />
+ <Compile Include="Databinding\PropertyInspectorSpecs.cs" />
+ <Compile Include="Databinding\TextBoxDataBindingSpecs.cs" />
+ <Compile Include="Databinding\TextPropertyBinding.cs" />
+ <Compile Include="Helpers\BindableListBox.cs" />
+ <Compile Include="Helpers\BindableListFactory.cs" />
+ <Compile Include="Helpers\BitmapRegion.cs" />
+ <Compile Include="Helpers\ButtonExtensions.cs" />
+ <Compile Include="Helpers\ComboBoxListControl.cs" />
+ <Compile Include="Helpers\ControlAdapter.cs">
+ <SubType>Component</SubType>
+ </Compile>
+ <Compile Include="Helpers\Events.cs" />
+ <Compile Include="Helpers\EventTrigger.cs" />
+ <Compile Include="Helpers\EventTriggerExtensions.cs" />
+ <Compile Include="Helpers\EventTriggerSpecs.cs" />
+ <Compile Include="Helpers\IBindableList.cs" />
+ <Compile Include="Helpers\IEventTarget.cs" />
+ <Compile Include="Helpers\IListControl.cs" />
+ <Compile Include="Helpers\ListBoxListControl.cs" />
+ <Compile Include="Helpers\SuspendLayout.cs" />
+ <Compile Include="Keyboard\ShortcutKey.cs" />
+ <Compile Include="Keyboard\ShortcutKeys.cs" />
+ <Compile Include="Resources\ApplicationIcon.cs" />
+ <Compile Include="Resources\ApplicationImage.cs" />
+ <Compile Include="Resources\HybridIcon.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\Gorilla.Commons.Infrastructure\Gorilla.Commons.Infrastructure.csproj">
+ <Project>{AA5EEED9-4531-45F7-AFCD-AD9717D2E405}</Project>
+ <Name>Gorilla.Commons.Infrastructure</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Gorilla.Commons.Testing\Gorilla.Commons.Testing.csproj">
+ <Project>{44E65096-9657-4716-90F8-4535BABE8039}</Project>
+ <Name>Gorilla.Commons.Testing</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Gorilla.Commons.Utility\Gorilla.Commons.Utility.csproj">
+ <Project>{DD8FD29E-7424-415C-9BA3-7D9F6ECBA161}</Project>
+ <Name>Gorilla.Commons.Utility</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Properties\" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
trunk/product/Gorilla.Commons.Windows.Forms.ThirdParty/Krypton/ListboxExtensions.cs
@@ -0,0 +1,15 @@
+using System.Collections.Generic;
+using ComponentFactory.Krypton.Toolkit;
+using Gorilla.Commons.Utility.Extensions;
+
+namespace MoMoney.Presentation.Databindings
+{
+ static public class ListboxExtensions
+ {
+ static public void bind_to<T>(this KryptonComboBox control, IEnumerable<T> items)
+ {
+ control.Items.Clear();
+ items.each(x => control.Items.Add(x));
+ }
+ }
+}
\ No newline at end of file
trunk/product/Gorilla.Commons.Windows.Forms.ThirdParty/Gorilla.Commons.Windows.Forms.ThirdParty.csproj
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{8050731D-48B2-4636-9D1C-2B6D052F39DC}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>Gorilla.Commons.Windows.Forms.ThirdParty</RootNamespace>
+ <AssemblyName>Gorilla.Commons.Windows.Forms.ThirdParty</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="ComponentFactory.Krypton.Toolkit, Version=3.0.8.0, Culture=neutral, PublicKeyToken=a87e673e9ecb6e8e, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\build\lib\app\component.factory\ComponentFactory.Krypton.Toolkit.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Core">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Windows.Forms" />
+ <Reference Include="System.Xml.Linq">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data.DataSetExtensions">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Krypton\ListboxExtensions.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\Gorilla.Commons.Utility\Gorilla.Commons.Utility.csproj">
+ <Project>{DD8FD29E-7424-415C-9BA3-7D9F6ECBA161}</Project>
+ <Name>Gorilla.Commons.Utility</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Properties\" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
trunk/product/MoMoney.Presentation/Databindings/date_time_picker_property_binding.cs
@@ -1,21 +0,0 @@
-using System;
-using System.Windows.Forms;
-
-namespace MoMoney.Presentation.Databindings
-{
- public class date_time_picker_property_binding<TypeToBindTo> : IPropertyBinding<DateTime>
- {
- private readonly IPropertyBinder<TypeToBindTo, DateTime> binder;
-
- public date_time_picker_property_binding(DateTimePicker control, IPropertyBinder<TypeToBindTo, DateTime> binder)
- {
- this.binder = binder;
- control.ValueChanged += delegate { binder.change_value_of_property_to(control.Value); };
- }
-
- public DateTime current_value()
- {
- return binder.current_value();
- }
- }
-}
\ No newline at end of file
trunk/product/MoMoney.Presentation/Databindings/ListboxExtensions.cs
@@ -1,22 +0,0 @@
-using System.Collections.Generic;
-using System.Windows.Forms;
-using ComponentFactory.Krypton.Toolkit;
-using Gorilla.Commons.Utility.Extensions;
-
-namespace MoMoney.Presentation.Databindings
-{
- public static class ListboxExtensions
- {
- public static void bind_to<T>(this ComboBox control, IEnumerable<T> items)
- {
- control.Items.Clear();
- items.each(x => control.Items.Add(x));
- }
-
- public static void bind_to<T>(this KryptonComboBox control, IEnumerable<T> items)
- {
- control.Items.Clear();
- items.each(x => control.Items.Add(x));
- }
- }
-}
\ No newline at end of file
trunk/product/MoMoney.Presentation/Model/Keyboard/ShortcutKeys.cs
@@ -1,16 +0,0 @@
-using System.Windows.Forms;
-
-namespace MoMoney.Presentation.Model.keyboard
-{
- public static class ShortcutKeys
- {
- public static readonly ShortcutKey control = new ShortcutKey(Keys.Control);
- public static readonly ShortcutKey alt = new ShortcutKey(Keys.Alt);
- public static readonly ShortcutKey none = new ShortcutKey(Keys.None);
- public static readonly ShortcutKey L = new ShortcutKey(Keys.L);
- public static readonly ShortcutKey N = new ShortcutKey(Keys.N);
- public static readonly ShortcutKey O = new ShortcutKey(Keys.O);
- public static readonly ShortcutKey S = new ShortcutKey(Keys.S);
- public static readonly ShortcutKey X = new ShortcutKey(Keys.X);
- }
-}
\ No newline at end of file
trunk/product/MoMoney.Presentation/Model/Menu/File/FileMenu.cs
@@ -1,5 +1,5 @@
using System.Collections.Generic;
-using MoMoney.Presentation.Model.keyboard;
+using Gorilla.Commons.Windows.Forms.Keyboard;
using MoMoney.Presentation.Model.Menu.File.Commands;
using MoMoney.Presentation.Model.Projects;
using MoMoney.Presentation.Resources;
trunk/product/MoMoney.Presentation/Model/Menu/IToolbarItemBuilder.cs
@@ -1,6 +1,6 @@
using System;
using Gorilla.Commons.Utility.Core;
-using MoMoney.Presentation.Resources;
+using Gorilla.Commons.Windows.Forms.Resources;
namespace MoMoney.Presentation.Model.Menu
{
trunk/product/MoMoney.Presentation/Model/Menu/MenuItem.cs
@@ -1,7 +1,7 @@
using System;
using System.Windows.Forms;
-using MoMoney.Presentation.Model.keyboard;
-using MoMoney.Presentation.Resources;
+using Gorilla.Commons.Windows.Forms.Keyboard;
+using Gorilla.Commons.Windows.Forms.Resources;
namespace MoMoney.Presentation.Model.Menu
{
trunk/product/MoMoney.Presentation/Model/Menu/MenuItemBuilder.cs
@@ -3,7 +3,8 @@ using Gorilla.Commons.Infrastructure.Container;
using Gorilla.Commons.Infrastructure.Eventing;
using Gorilla.Commons.Infrastructure.Threading;
using Gorilla.Commons.Utility.Core;
-using MoMoney.Presentation.Model.keyboard;
+using Gorilla.Commons.Windows.Forms.Keyboard;
+using Gorilla.Commons.Windows.Forms.Resources;
using MoMoney.Presentation.Resources;
namespace MoMoney.Presentation.Model.Menu
trunk/product/MoMoney.Presentation/Model/Menu/ToolBarItemBuilder.cs
@@ -4,7 +4,7 @@ using Gorilla.Commons.Infrastructure.Container;
using Gorilla.Commons.Infrastructure.Eventing;
using Gorilla.Commons.Infrastructure.Threading;
using Gorilla.Commons.Utility.Core;
-using MoMoney.Presentation.Resources;
+using Gorilla.Commons.Windows.Forms.Resources;
namespace MoMoney.Presentation.Model.Menu
{
trunk/product/MoMoney.Presentation/Resources/ApplicationIcons.cs
@@ -1,30 +1,31 @@
using System.Collections.Generic;
using Gorilla.Commons.Utility.Extensions;
+using Gorilla.Commons.Windows.Forms.Resources;
namespace MoMoney.Presentation.Resources
{
- public static class ApplicationIcons
+ static public class ApplicationIcons
{
static readonly IList<ApplicationIcon> all_icons = new List<ApplicationIcon>();
- public static readonly ApplicationIcon Application = new ApplicationIcon("mokhan.ico");
- public static readonly ApplicationIcon FileExplorer = new ApplicationIcon("search4files.ico");
- public static readonly HybridIcon ApplicationReady = new HybridIcon("application_ready.ico");
- public static readonly ApplicationIcon AddIncome = new ApplicationIcon("text_document.ico");
- public static readonly HybridIcon NewProject = new HybridIcon("new_project.ico");
- public static readonly HybridIcon OpenProject = new HybridIcon("open.ico");
- public static readonly HybridIcon SaveProject = new HybridIcon("save.ico");
- public static readonly HybridIcon SaveProjectAs = new HybridIcon("save_as.ico");
- public static readonly HybridIcon ExitApplication = new HybridIcon("");
- public static readonly HybridIcon About = new HybridIcon("about.ico");
- public static readonly HybridIcon Empty = new HybridIcon("");
+ static public readonly ApplicationIcon Application = new ApplicationIcon("mokhan.ico", x => add(x));
+ static public readonly ApplicationIcon FileExplorer = new ApplicationIcon("search4files.ico", x => add(x));
+ static public readonly HybridIcon ApplicationReady = new HybridIcon("application_ready.ico", x => add(x));
+ static public readonly ApplicationIcon AddIncome = new ApplicationIcon("text_document.ico", x => add(x));
+ static public readonly HybridIcon NewProject = new HybridIcon("new_project.ico", x => add(x));
+ static public readonly HybridIcon OpenProject = new HybridIcon("open.ico", x => add(x));
+ static public readonly HybridIcon SaveProject = new HybridIcon("save.ico", x => add(x));
+ static public readonly HybridIcon SaveProjectAs = new HybridIcon("save_as.ico", x => add(x));
+ static public readonly HybridIcon ExitApplication = new HybridIcon("", x => add(x));
+ static public readonly HybridIcon About = new HybridIcon("about.ico", x => add(x));
+ static public readonly HybridIcon Empty = new HybridIcon("", x => add(x));
- public static IEnumerable<ApplicationIcon> all()
+ static public IEnumerable<ApplicationIcon> all()
{
return all_icons.all();
}
- public static void add(ApplicationIcon icon)
+ static public void add(ApplicationIcon icon)
{
all_icons.Add(icon);
}
trunk/product/MoMoney.Presentation/Resources/ApplicationImages.cs
@@ -1,3 +1,5 @@
+using Gorilla.Commons.Windows.Forms.Resources;
+
namespace MoMoney.Presentation.Resources
{
public static class ApplicationImages
trunk/product/MoMoney.Presentation/Views/Billing/AddBillPaymentView.cs
@@ -1,6 +1,7 @@
-using System;
+using System;
using System.Collections.Generic;
using Gorilla.Commons.Utility.Extensions;
+using Gorilla.Commons.Windows.Forms;
using MoMoney.Domain.accounting.billing;
using MoMoney.Presentation.Databindings;
using MoMoney.Presentation.Presenters.billing;
trunk/product/MoMoney.Presentation/Views/Core/ApplicationDockedWindow.cs
@@ -1,10 +1,12 @@
-using System;
+using System;
using System.ComponentModel;
using System.Linq;
using System.Windows.Forms;
using Gorilla.Commons.Utility.Extensions;
+using Gorilla.Commons.Windows.Forms;
+using Gorilla.Commons.Windows.Forms.Helpers;
+using Gorilla.Commons.Windows.Forms.Resources;
using MoMoney.Presentation.Resources;
-using MoMoney.Presentation.Views.helpers;
using WeifenLuo.WinFormsUI.Docking;
namespace MoMoney.Presentation.Views.core
trunk/product/MoMoney.Presentation/Views/Core/ApplicationWindow.cs
@@ -1,8 +1,9 @@
-using System;
+using System;
using System.ComponentModel;
using System.Windows.Forms;
+using Gorilla.Commons.Windows.Forms;
+using Gorilla.Commons.Windows.Forms.Helpers;
using MoMoney.Presentation.Resources;
-using MoMoney.Presentation.Views.helpers;
namespace MoMoney.Presentation.Views.core
{
trunk/product/MoMoney.Presentation/Views/Core/ControlAction.cs
@@ -1,6 +1,6 @@
using System;
-namespace MoMoney.Presentation.Views.core
+namespace Gorilla.Commons.Windows.Forms
{
public delegate void ControlAction<T>(T input) where T : EventArgs;
}
\ No newline at end of file
trunk/product/MoMoney.Presentation/Views/Core/ICommandDialog.cs
@@ -1,13 +1,8 @@
using Gorilla.Commons.Utility.Core;
-namespace MoMoney.Presentation.Views.core
+namespace Gorilla.Commons.Windows.Forms
{
public interface ICommandDialog<Command> where Command : ICommand
{
}
-
- public interface IDialogLauncher
- {
- void launch<Command>(Command command) where Command : ICommand;
- }
}
\ No newline at end of file
trunk/product/MoMoney.Presentation/Views/Core/IDialogLauncher.cs
@@ -0,0 +1,9 @@
+using Gorilla.Commons.Utility.Core;
+
+namespace Gorilla.Commons.Windows.Forms
+{
+ public interface IDialogLauncher
+ {
+ void launch<Command>(Command command) where Command : ICommand;
+ }
+}
\ No newline at end of file
trunk/product/MoMoney.Presentation/Views/Core/IDockedContentView.cs
@@ -1,3 +1,5 @@
+using Gorilla.Commons.Windows.Forms;
+using MoMoney.Presentation.Core;
using WeifenLuo.WinFormsUI.Docking;
namespace MoMoney.Presentation.Views.core
@@ -6,4 +8,9 @@ namespace MoMoney.Presentation.Views.core
{
void add_to(DockPanel panel);
}
+
+ public interface IView<Presenter> : IView where Presenter : IPresenter
+ {
+ void attach_to(Presenter presenter);
+ }
}
\ No newline at end of file
trunk/product/MoMoney.Presentation/Views/Core/IView.cs
@@ -1,15 +1,9 @@
using System;
using System.ComponentModel;
-using MoMoney.Presentation.Core;
-namespace MoMoney.Presentation.Views.core
+namespace Gorilla.Commons.Windows.Forms
{
public interface IView : IWindowEvents, ISynchronizeInvoke, IDisposable
{
}
-
- public interface IView<Presenter> : IView where Presenter : IPresenter
- {
- void attach_to(Presenter presenter);
- }
}
\ No newline at end of file
trunk/product/MoMoney.Presentation/Views/Core/IWindowEvents.cs
@@ -1,7 +1,7 @@
using System;
using System.ComponentModel;
-namespace MoMoney.Presentation.Views.core
+namespace Gorilla.Commons.Windows.Forms
{
public interface IWindowEvents
{
trunk/product/MoMoney.Presentation/Views/Dialogs/SaveChangesView.cs
@@ -1,6 +1,7 @@
using System;
using System.ComponentModel;
using System.Windows.Forms;
+using Gorilla.Commons.Windows.Forms;
using MoMoney.Presentation.Model.Menu.File.Commands;
using MoMoney.Presentation.Resources;
using MoMoney.Presentation.Views.core;
trunk/product/MoMoney.Presentation/Views/Dialogs/SaveChangesViewSpecs.cs
@@ -1,8 +1,8 @@
using System;
using developwithpassion.bdd.contexts;
using Gorilla.Commons.Testing;
+using Gorilla.Commons.Windows.Forms.Helpers;
using MoMoney.Presentation.Model.Menu.File.Commands;
-using MoMoney.Presentation.Views.helpers;
namespace MoMoney.Presentation.Views.dialogs
{
trunk/product/MoMoney.Presentation/Views/Helpers/BindableListFactory.cs
@@ -1,120 +0,0 @@
-using System.Collections.Generic;
-using System.Windows.Forms;
-
-namespace MoMoney.Presentation.Views.helpers
-{
- static public class BindableListFactory
- {
- static public IBindableList<ItemToBindTo> create_for<ItemToBindTo>(ListBox listbox)
- {
- return new BindableListBox<ItemToBindTo>(new ListBoxListControl<ItemToBindTo>(listbox));
- }
-
- static public IBindableList<ItemToBindTo> create_for<ItemToBindTo>(ComboBox combobox)
- {
- return new BindableListBox<ItemToBindTo>(new ComboBoxListControl<ItemToBindTo>(combobox));
- }
- }
-
- public interface IBindableList<ItemToBindTo>
- {
- void bind_to(IEnumerable<ItemToBindTo> items);
- ItemToBindTo get_selected_item();
- void set_selected_item(ItemToBindTo item);
- }
-
- public interface IListControl<ItemToStore>
- {
- ItemToStore get_selected_item();
- void add_item(ItemToStore item);
- void set_selected_item(ItemToStore item);
- }
-
- public class BindableListBox<ItemToBindTo> : IBindableList<ItemToBindTo>
- {
- readonly IListControl<ItemToBindTo> listControl;
-
- public BindableListBox(IListControl<ItemToBindTo> listControl)
- {
- this.listControl = listControl;
- }
-
- public void bind_to(IEnumerable<ItemToBindTo> items)
- {
- foreach (var item in items)
- {
- listControl.add_item(item);
- }
- }
-
- public ItemToBindTo get_selected_item()
- {
- return listControl.get_selected_item();
- }
-
- public void set_selected_item(ItemToBindTo item)
- {
- listControl.set_selected_item(item);
- }
- }
-
- public class ListBoxListControl<ItemToStore> : IListControl<ItemToStore>
- {
- readonly ListBox _listBox;
-
- public ListBoxListControl(ListBox listBox)
- {
- _listBox = listBox;
- }
-
- public ItemToStore get_selected_item()
- {
- return (ItemToStore) _listBox.SelectedItem;
- }
-
- public void add_item(ItemToStore item)
- {
- _listBox.Items.Add(item);
- }
-
- public void set_selected_item(ItemToStore item)
- {
- if (_listBox.Items.Contains(item))
- {
- _listBox.SelectedItem = item;
- }
- }
- }
-
- public class ComboBoxListControl<ItemToStore> : IListControl<ItemToStore>
- {
- readonly ComboBox combo_box;
-
- public ComboBoxListControl(ComboBox combo_box)
- {
- this.combo_box = combo_box;
- }
-
- public ItemToStore get_selected_item()
- {
- return (ItemToStore) combo_box.SelectedItem;
- }
-
- public void add_item(ItemToStore item)
- {
- combo_box.Items.Add(item);
- combo_box.SelectedIndex = 0;
- }
-
- public void set_selected_item(ItemToStore item)
- {
- if (!Equals(item, default(ItemToStore)))
- {
- if (combo_box.Items.Contains(item))
- {
- combo_box.SelectedItem = item;
- }
- }
- }
- }
-}
\ No newline at end of file
trunk/product/MoMoney.Presentation/Views/Helpers/IEventTarget.cs
@@ -1,6 +0,0 @@
-namespace MoMoney.Presentation.Views.helpers
-{
- public interface IEventTarget
- {
- }
-}
\ No newline at end of file
trunk/product/MoMoney.Presentation/Views/Income/AddNewIncomeView.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using Gorilla.Commons.Utility.Extensions;
+using Gorilla.Commons.Windows.Forms;
using MoMoney.Domain.accounting.billing;
using MoMoney.Presentation.Databindings;
using MoMoney.Presentation.Model.interaction;
trunk/product/MoMoney.Presentation/Views/Shell/ApplicationShell.cs
@@ -4,9 +4,11 @@ using System.ComponentModel;
using System.ComponentModel.Composition;
using System.Windows.Forms;
using Gorilla.Commons.Utility.Extensions;
+using Gorilla.Commons.Windows.Forms;
+using Gorilla.Commons.Windows.Forms.Helpers;
using MoMoney.Presentation.Presenters.Shell;
+using MoMoney.Presentation.Resources;
using MoMoney.Presentation.Views.core;
-using MoMoney.Presentation.Views.helpers;
namespace MoMoney.Presentation.Views.Shell
{
trunk/product/MoMoney.Presentation/Views/Shell/ApplicationShell.Designer.cs
@@ -28,6 +28,21 @@ namespace MoMoney.Presentation.Views.Shell {
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
+ WeifenLuo.WinFormsUI.Docking.DockPanelSkin dockPanelSkin1 = new WeifenLuo.WinFormsUI.Docking.DockPanelSkin();
+ WeifenLuo.WinFormsUI.Docking.AutoHideStripSkin autoHideStripSkin1 = new WeifenLuo.WinFormsUI.Docking.AutoHideStripSkin();
+ WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient1 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
+ WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient1 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
+ WeifenLuo.WinFormsUI.Docking.DockPaneStripSkin dockPaneStripSkin1 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripSkin();
+ WeifenLuo.WinFormsUI.Docking.DockPaneStripGradient dockPaneStripGradient1 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripGradient();
+ WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient2 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
+ WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient2 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
+ WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient3 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
+ WeifenLuo.WinFormsUI.Docking.DockPaneStripToolWindowGradient dockPaneStripToolWindowGradient1 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripToolWindowGradient();
+ WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient4 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
+ WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient5 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
+ WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient3 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
+ WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient6 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
+ WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient7 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
this.ux_main_menu_strip = new System.Windows.Forms.MenuStrip();
this.ux_status_bar = new System.Windows.Forms.StatusStrip();
this.status_bar_label = new System.Windows.Forms.ToolStripStatusLabel();
@@ -43,7 +58,8 @@ namespace MoMoney.Presentation.Views.Shell {
this.ux_main_menu_strip.Font = new System.Drawing.Font("Segoe UI", 8.25F);
this.ux_main_menu_strip.Location = new System.Drawing.Point(0, 0);
this.ux_main_menu_strip.Name = "ux_main_menu_strip";
- this.ux_main_menu_strip.Size = new System.Drawing.Size(756, 24);
+ this.ux_main_menu_strip.Padding = new System.Windows.Forms.Padding(8, 2, 0, 2);
+ this.ux_main_menu_strip.Size = new System.Drawing.Size(1008, 24);
this.ux_main_menu_strip.TabIndex = 0;
this.ux_main_menu_strip.Text = "menuStrip1";
//
@@ -52,23 +68,24 @@ namespace MoMoney.Presentation.Views.Shell {
this.ux_status_bar.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.status_bar_label,
this.status_bar_progress_bar});
- this.ux_status_bar.Location = new System.Drawing.Point(0, 485);
+ this.ux_status_bar.Location = new System.Drawing.Point(0, 598);
this.ux_status_bar.Name = "ux_status_bar";
+ this.ux_status_bar.Padding = new System.Windows.Forms.Padding(1, 0, 19, 0);
this.ux_status_bar.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional;
- this.ux_status_bar.Size = new System.Drawing.Size(756, 22);
+ this.ux_status_bar.Size = new System.Drawing.Size(1008, 26);
this.ux_status_bar.TabIndex = 2;
this.ux_status_bar.Text = "statusStrip1";
//
// status_bar_label
//
this.status_bar_label.Name = "status_bar_label";
- this.status_bar_label.Size = new System.Drawing.Size(19, 17);
+ this.status_bar_label.Size = new System.Drawing.Size(18, 21);
this.status_bar_label.Text = "...";
//
// status_bar_progress_bar
//
this.status_bar_progress_bar.Name = "status_bar_progress_bar";
- this.status_bar_progress_bar.Size = new System.Drawing.Size(75, 16);
+ this.status_bar_progress_bar.Size = new System.Drawing.Size(100, 20);
//
// ux_dock_panel
//
@@ -84,10 +101,55 @@ namespace MoMoney.Presentation.Views.Shell {
this.ux_dock_panel.DockRightPortion = 200;
this.ux_dock_panel.DockTopPortion = 150;
this.ux_dock_panel.Font = new System.Drawing.Font("Tahoma", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World, ((byte)(0)));
- this.ux_dock_panel.Location = new System.Drawing.Point(0, 52);
+ this.ux_dock_panel.Location = new System.Drawing.Point(0, 53);
+ this.ux_dock_panel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.ux_dock_panel.Name = "ux_dock_panel";
this.ux_dock_panel.RightToLeftLayout = true;
- this.ux_dock_panel.Size = new System.Drawing.Size(756, 435);
+ this.ux_dock_panel.Size = new System.Drawing.Size(1008, 546);
+ dockPanelGradient1.EndColor = System.Drawing.SystemColors.ControlLight;
+ dockPanelGradient1.StartColor = System.Drawing.SystemColors.ControlLight;
+ autoHideStripSkin1.DockStripGradient = dockPanelGradient1;
+ tabGradient1.EndColor = System.Drawing.SystemColors.Control;
+ tabGradient1.StartColor = System.Drawing.SystemColors.Control;
+ tabGradient1.TextColor = System.Drawing.SystemColors.ControlDarkDark;
+ autoHideStripSkin1.TabGradient = tabGradient1;
+ dockPanelSkin1.AutoHideStripSkin = autoHideStripSkin1;
+ tabGradient2.EndColor = System.Drawing.SystemColors.ControlLightLight;
+ tabGradient2.StartColor = System.Drawing.SystemColors.ControlLightLight;
+ tabGradient2.TextColor = System.Drawing.SystemColors.ControlText;
+ dockPaneStripGradient1.ActiveTabGradient = tabGradient2;
+ dockPanelGradient2.EndColor = System.Drawing.SystemColors.Control;
+ dockPanelGradient2.StartColor = System.Drawing.SystemColors.Control;
+ dockPaneStripGradient1.DockStripGradient = dockPanelGradient2;
+ tabGradient3.EndColor = System.Drawing.SystemColors.ControlLight;
+ tabGradient3.StartColor = System.Drawing.SystemColors.ControlLight;
+ tabGradient3.TextColor = System.Drawing.SystemColors.ControlText;
+ dockPaneStripGradient1.InactiveTabGradient = tabGradient3;
+ dockPaneStripSkin1.DocumentGradient = dockPaneStripGradient1;
+ tabGradient4.EndColor = System.Drawing.SystemColors.ActiveCaption;
+ tabGradient4.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
+ tabGradient4.StartColor = System.Drawing.SystemColors.GradientActiveCaption;
+ tabGradient4.TextColor = System.Drawing.SystemColors.ActiveCaptionText;
+ dockPaneStripToolWindowGradient1.ActiveCaptionGradient = tabGradient4;
+ tabGradient5.EndColor = System.Drawing.SystemColors.Control;
+ tabGradient5.StartColor = System.Drawing.SystemColors.Control;
+ tabGradient5.TextColor = System.Drawing.SystemColors.ControlText;
+ dockPaneStripToolWindowGradient1.ActiveTabGradient = tabGradient5;
+ dockPanelGradient3.EndColor = System.Drawing.SystemColors.ControlLight;
+ dockPanelGradient3.StartColor = System.Drawing.SystemColors.ControlLight;
+ dockPaneStripToolWindowGradient1.DockStripGradient = dockPanelGradient3;
+ tabGradient6.EndColor = System.Drawing.SystemColors.GradientInactiveCaption;
+ tabGradient6.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
+ tabGradient6.StartColor = System.Drawing.SystemColors.GradientInactiveCaption;
+ tabGradient6.TextColor = System.Drawing.SystemColors.ControlText;
+ dockPaneStripToolWindowGradient1.InactiveCaptionGradient = tabGradient6;
+ tabGradient7.EndColor = System.Drawing.Color.Transparent;
+ tabGradient7.StartColor = System.Drawing.Color.Transparent;
+ tabGradient7.TextColor = System.Drawing.SystemColors.ControlDarkDark;
+ dockPaneStripToolWindowGradient1.InactiveTabGradient = tabGradient7;
+ dockPaneStripSkin1.ToolWindowGradient = dockPaneStripToolWindowGradient1;
+ dockPanelSkin1.DockPaneStripSkin = dockPaneStripSkin1;
+ this.ux_dock_panel.Skin = dockPanelSkin1;
this.ux_dock_panel.TabIndex = 3;
//
// ux_tool_bar_strip
@@ -95,7 +157,7 @@ namespace MoMoney.Presentation.Views.Shell {
this.ux_tool_bar_strip.Font = new System.Drawing.Font("Segoe UI", 8.25F);
this.ux_tool_bar_strip.Location = new System.Drawing.Point(0, 24);
this.ux_tool_bar_strip.Name = "ux_tool_bar_strip";
- this.ux_tool_bar_strip.Size = new System.Drawing.Size(756, 25);
+ this.ux_tool_bar_strip.Size = new System.Drawing.Size(1008, 25);
this.ux_tool_bar_strip.TabIndex = 6;
this.ux_tool_bar_strip.Text = "toolStrip1";
//
@@ -109,9 +171,9 @@ namespace MoMoney.Presentation.Views.Shell {
//
// ApplicationShell
//
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(756, 507);
+ this.ClientSize = new System.Drawing.Size(1008, 624);
this.Controls.Add(this.ux_tool_bar_strip);
this.Controls.Add(this.ux_dock_panel);
this.Controls.Add(this.ux_status_bar);
@@ -119,7 +181,7 @@ namespace MoMoney.Presentation.Views.Shell {
this.HelpButton = true;
this.IsMdiContainer = true;
this.MainMenuStrip = this.ux_main_menu_strip;
- this.Margin = new System.Windows.Forms.Padding(3, 3, 3, 3);
+ this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.Name = "ApplicationShell";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "MoMoney";
trunk/product/MoMoney.Presentation/Views/Shell/INotificationIconView.cs
@@ -1,5 +1,5 @@
using System;
-using MoMoney.Presentation.Resources;
+using Gorilla.Commons.Windows.Forms.Resources;
namespace MoMoney.Presentation.Views.Shell
{
trunk/product/MoMoney.Presentation/Views/Shell/IStatusBarView.cs
@@ -1,4 +1,4 @@
-using MoMoney.Presentation.Resources;
+using Gorilla.Commons.Windows.Forms.Resources;
namespace MoMoney.Presentation.Views.Shell
{
trunk/product/MoMoney.Presentation/Views/Shell/NotificationIconView.cs
@@ -1,10 +1,10 @@
using System.Windows.Forms;
using Gorilla.Commons.Utility.Extensions;
+using Gorilla.Commons.Windows.Forms.Resources;
using MoMoney.Presentation.Model.Menu;
using MoMoney.Presentation.Model.Menu.File;
using MoMoney.Presentation.Model.Menu.Help;
using MoMoney.Presentation.Model.Menu.window;
-using MoMoney.Presentation.Resources;
using MenuItem=System.Windows.Forms.MenuItem;
namespace MoMoney.Presentation.Views.Shell
trunk/product/MoMoney.Presentation/Views/Shell/StatusBarView.cs
@@ -1,5 +1,5 @@
using System.Windows.Forms;
-using MoMoney.Presentation.Resources;
+using Gorilla.Commons.Windows.Forms.Resources;
namespace MoMoney.Presentation.Views.Shell
{
trunk/product/MoMoney.Presentation/Views/Shell/UnhandledErrorView.cs
@@ -1,5 +1,6 @@
using System;
using System.Windows.Forms;
+using Gorilla.Commons.Windows.Forms;
using MoMoney.Presentation.Presenters.Shell;
using MoMoney.Presentation.Resources;
using MoMoney.Presentation.Views.core;
trunk/product/MoMoney.Presentation/Views/Shell/WelcomeScreen.cs
@@ -1,3 +1,4 @@
+using Gorilla.Commons.Windows.Forms.Helpers;
using MoMoney.Presentation.Model.Menu.File.Commands;
using MoMoney.Presentation.Presenters.Shell;
using MoMoney.Presentation.Resources;
trunk/product/MoMoney.Presentation/Views/Updates/CheckForUpdatesView.cs
@@ -1,6 +1,7 @@
using System;
using System.Reflection;
using System.Windows.Forms;
+using Gorilla.Commons.Windows.Forms;
using MoMoney.Domain.Core;
using MoMoney.Presentation.Model.updates;
using MoMoney.Presentation.Presenters.updates;
trunk/product/MoMoney.Presentation/Views/AddCompanyView.cs
@@ -4,9 +4,10 @@ using System.Linq;
using System.Text;
using System.Windows.Forms;
using Gorilla.Commons.Utility.Extensions;
+using Gorilla.Commons.Windows.Forms;
+using Gorilla.Commons.Windows.Forms.Databinding;
using MoMoney.Domain.accounting.billing;
using MoMoney.DTO;
-using MoMoney.Presentation.Databindings;
using MoMoney.Presentation.Model.interaction;
using MoMoney.Presentation.Presenters;
using MoMoney.Presentation.Resources;
trunk/product/MoMoney.Presentation/MoMoney.Presentation.csproj
@@ -94,29 +94,10 @@
<Compile Include="Core\IContentPresenter.cs" />
<Compile Include="Core\IPresenter.cs" />
<Compile Include="Core\PresenterRegistry.cs" />
- <Compile Include="Databindings\binding_selector.cs" />
- <Compile Include="Databindings\binding_selector_specs.cs" />
- <Compile Include="Databindings\ComboBoxDataBindingSpecs.cs" />
- <Compile Include="Databindings\combo_box_property_binding.cs" />
- <Compile Include="Databindings\control_binding_extensions.cs" />
- <Compile Include="Databindings\Create.cs" />
- <Compile Include="Databindings\date_time_picker_property_binding.cs" />
- <Compile Include="Databindings\date_time_property_binding_specs.cs" />
- <Compile Include="Databindings\IPropertyBinding.cs" />
- <Compile Include="Databindings\ListboxExtensions.cs" />
- <Compile Include="Databindings\property_binder.cs" />
- <Compile Include="Databindings\property_binder_specs.cs" />
- <Compile Include="Databindings\property_inspector.cs" />
- <Compile Include="Databindings\property_inspector_factory.cs" />
- <Compile Include="Databindings\property_inspector_specs.cs" />
- <Compile Include="Databindings\TextBoxDataBindingSpecs.cs" />
- <Compile Include="Databindings\text_property_binding.cs" />
<Compile Include="IModule.cs" />
<Compile Include="Model\FileSystem\folder.cs" />
<Compile Include="Model\Interaction\INotification.cs" />
<Compile Include="Model\Interaction\notification_message.cs" />
- <Compile Include="Model\Keyboard\ShortcutKey.cs" />
- <Compile Include="Model\Keyboard\ShortcutKeys.cs" />
<Compile Include="Model\Menu\create.cs" />
<Compile Include="Model\Menu\File\CloseProjectCommand.cs" />
<Compile Include="Model\Menu\File\CloseWindowCommand.cs" />
@@ -228,11 +209,8 @@
<Compile Include="Presenters\Startup\SplashScreenPresenterSpecs.cs" />
<Compile Include="Presenters\Updates\CheckForUpdatesPresenter.cs" />
<Compile Include="Presenters\Updates\CheckForUpdatesPresenterSpecs.cs" />
- <Compile Include="Resources\ApplicationIcon.cs" />
<Compile Include="Resources\ApplicationIcons.cs" />
- <Compile Include="Resources\ApplicationImage.cs" />
<Compile Include="Resources\ApplicationImages.cs" />
- <Compile Include="Resources\HybridIcon.cs" />
<Compile Include="Views\AddCompanyView.cs">
<SubType>Form</SubType>
</Compile>
@@ -273,6 +251,7 @@
</Compile>
<Compile Include="Views\Core\ControlAction.cs" />
<Compile Include="Views\Core\ICommandDialog.cs" />
+ <Compile Include="Views\Core\IDialogLauncher.cs" />
<Compile Include="Views\Core\IDockedContentView.cs" />
<Compile Include="Views\Core\IView.cs" />
<Compile Include="Views\Core\IWindowEvents.cs" />
@@ -286,16 +265,6 @@
<Compile Include="Views\Dialogs\SaveChangesViewSpecs.cs" />
<Compile Include="Views\Dialogs\SelectFileToOpenDialog.cs" />
<Compile Include="Views\Dialogs\SelectFileToSaveToDialog.cs" />
- <Compile Include="Views\Helpers\BindableListFactory.cs" />
- <Compile Include="Views\Helpers\ControlAdapter.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="Views\Helpers\Events.cs" />
- <Compile Include="Views\Helpers\EventTrigger.cs" />
- <Compile Include="Views\Helpers\EventTriggerExtensions.cs" />
- <Compile Include="Views\Helpers\EventTriggerSpecs.cs" />
- <Compile Include="Views\Helpers\IEventTarget.cs" />
- <Compile Include="Views\Helpers\SuspendLayout.cs" />
<Compile Include="Views\IAddCompanyView.cs" />
<Compile Include="Views\Income\AddNewIncomeView.cs">
<SubType>Form</SubType>
@@ -346,8 +315,6 @@
<DependentUpon>ApplicationShell.cs</DependentUpon>
</Compile>
<Compile Include="Views\Shell\ApplicationShellSpecs.cs" />
- <Compile Include="Views\Shell\BitmapRegion.cs" />
- <Compile Include="Views\Shell\button_extensions.cs" />
<Compile Include="Views\Shell\IGettingStartedView.cs" />
<Compile Include="Views\Shell\ILogFileView.cs" />
<Compile Include="Views\Shell\INotificationIconView.cs" />
@@ -471,6 +438,14 @@
<Project>{DD8FD29E-7424-415C-9BA3-7D9F6ECBA161}</Project>
<Name>Gorilla.Commons.Utility</Name>
</ProjectReference>
+ <ProjectReference Include="..\Gorilla.Commons.Windows.Forms.ThirdParty\Gorilla.Commons.Windows.Forms.ThirdParty.csproj">
+ <Project>{8050731D-48B2-4636-9D1C-2B6D052F39DC}</Project>
+ <Name>Gorilla.Commons.Windows.Forms.ThirdParty</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Gorilla.Commons.Windows.Forms\Gorilla.Commons.Windows.Forms.csproj">
+ <Project>{54B55B2B-A58F-45DF-A446-234C9D70DC0B}</Project>
+ <Name>Gorilla.Commons.Windows.Forms</Name>
+ </ProjectReference>
<ProjectReference Include="..\MoMoney.DataAccess\MoMoney.DataAccess.csproj">
<Project>{580E68A8-EDEE-4350-8BBE-A053645B0F83}</Project>
<Name>MoMoney.DataAccess</Name>
@@ -489,7 +464,9 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
+ <Folder Include="Model\Keyboard\" />
<Folder Include="Properties\" />
+ <Folder Include="Views\Helpers\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
trunk/product/MyMoney/MyMoney.csproj
@@ -231,6 +231,10 @@
<Project>{DD8FD29E-7424-415C-9BA3-7D9F6ECBA161}</Project>
<Name>Gorilla.Commons.Utility</Name>
</ProjectReference>
+ <ProjectReference Include="..\Gorilla.Commons.Windows.Forms\Gorilla.Commons.Windows.Forms.csproj">
+ <Project>{54B55B2B-A58F-45DF-A446-234C9D70DC0B}</Project>
+ <Name>Gorilla.Commons.Windows.Forms</Name>
+ </ProjectReference>
<ProjectReference Include="..\MoMoney.DataAccess\MoMoney.DataAccess.csproj">
<Project>{580E68A8-EDEE-4350-8BBE-A053645B0F83}</Project>
<Name>MoMoney.DataAccess</Name>
trunk/solution.sln
@@ -23,6 +23,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gorilla.Commons.Infrastruct
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gorilla.Commons.Infrastructure.ThirdParty", "product\Gorilla.Commons.Infrastructure.ThirdParty\Gorilla.Commons.Infrastructure.ThirdParty.csproj", "{04DC09B4-5DF9-44A6-8DD1-05941F0D0228}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gorilla.Commons.Windows.Forms", "product\Gorilla.Commons.Windows.Forms\Gorilla.Commons.Windows.Forms.csproj", "{54B55B2B-A58F-45DF-A446-234C9D70DC0B}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gorilla.Commons.Windows.Forms.ThirdParty", "product\Gorilla.Commons.Windows.Forms.ThirdParty\Gorilla.Commons.Windows.Forms.ThirdParty.csproj", "{8050731D-48B2-4636-9D1C-2B6D052F39DC}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -73,6 +77,14 @@ Global
{04DC09B4-5DF9-44A6-8DD1-05941F0D0228}.Debug|Any CPU.Build.0 = Debug|Any CPU
{04DC09B4-5DF9-44A6-8DD1-05941F0D0228}.Release|Any CPU.ActiveCfg = Release|Any CPU
{04DC09B4-5DF9-44A6-8DD1-05941F0D0228}.Release|Any CPU.Build.0 = Release|Any CPU
+ {54B55B2B-A58F-45DF-A446-234C9D70DC0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {54B55B2B-A58F-45DF-A446-234C9D70DC0B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {54B55B2B-A58F-45DF-A446-234C9D70DC0B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {54B55B2B-A58F-45DF-A446-234C9D70DC0B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8050731D-48B2-4636-9D1C-2B6D052F39DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8050731D-48B2-4636-9D1C-2B6D052F39DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8050731D-48B2-4636-9D1C-2B6D052F39DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8050731D-48B2-4636-9D1C-2B6D052F39DC}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE