Index: Core/Common/src/Core.Common.Controls.Swf/Core.Common.Controls.Swf.csproj =================================================================== diff -u -r5dc6b11ada2c7d2e4ca14413b1ddca577ba34d08 -re29972e3a754b192d4f792639e599eb193e6ea8d --- Core/Common/src/Core.Common.Controls.Swf/Core.Common.Controls.Swf.csproj (.../Core.Common.Controls.Swf.csproj) (revision 5dc6b11ada2c7d2e4ca14413b1ddca577ba34d08) +++ Core/Common/src/Core.Common.Controls.Swf/Core.Common.Controls.Swf.csproj (.../Core.Common.Controls.Swf.csproj) (revision e29972e3a754b192d4f792639e599eb193e6ea8d) @@ -175,10 +175,11 @@ - + UserControl - + + UserControl @@ -195,10 +196,10 @@ FindAndReplaceControl.cs - + UserControl - + ComboBoxTypeEditor.cs Fisheye: Tag e29972e3a754b192d4f792639e599eb193e6ea8d refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Controls.Swf/Editors/ButtonTypeEditor.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag e29972e3a754b192d4f792639e599eb193e6ea8d refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Controls.Swf/Editors/ComboBoxTypeEditor.Designer.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag e29972e3a754b192d4f792639e599eb193e6ea8d refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Controls.Swf/Editors/ComboBoxTypeEditor.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag e29972e3a754b192d4f792639e599eb193e6ea8d refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Controls.Swf/Editors/MultiLineTextEdior.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Core/Common/src/Core.Common.Controls.Swf/Table/Editors/ButtonTypeEditor.cs =================================================================== diff -u --- Core/Common/src/Core.Common.Controls.Swf/Table/Editors/ButtonTypeEditor.cs (revision 0) +++ Core/Common/src/Core.Common.Controls.Swf/Table/Editors/ButtonTypeEditor.cs (revision e29972e3a754b192d4f792639e599eb193e6ea8d) @@ -0,0 +1,48 @@ +using System; +using System.Drawing; +using System.Windows.Forms; + +namespace Core.Common.Controls.Swf.Table.Editors +{ + public class ButtonTypeEditor : UserControl, ITypeEditor + { + /// + /// Caption for this button. Not visible when property is set. + /// + public string Caption { get; set; } + + /// + /// Tooltip for this button. + /// + public string Tooltip { get; set; } + + /// + /// Image for this button. If this property is set, it will override the of this button. + /// + public Image Image { get; set; } + + public bool HideOnReadOnly { get; set; } + + public Action ButtonClickAction { get; set; } + + public object EditableValue { get; set; } + + public bool CanAcceptEditValue() + { + return false; + } + + public bool CanPopup() + { + return false; + } + + protected override void Dispose(bool disposing) + { + EditableValue = null; + ButtonClickAction = null; + + base.Dispose(disposing); + } + } +} \ No newline at end of file Index: Core/Common/src/Core.Common.Controls.Swf/Table/Editors/ComboBoxTypeEditor.Designer.cs =================================================================== diff -u --- Core/Common/src/Core.Common.Controls.Swf/Table/Editors/ComboBoxTypeEditor.Designer.cs (revision 0) +++ Core/Common/src/Core.Common.Controls.Swf/Table/Editors/ComboBoxTypeEditor.Designer.cs (revision e29972e3a754b192d4f792639e599eb193e6ea8d) @@ -0,0 +1,24 @@ +namespace Core.Common.Controls.Swf.Table.Editors +{ + partial class ComboBoxTypeEditor + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + } + + #endregion + } +} Index: Core/Common/src/Core.Common.Controls.Swf/Table/Editors/ComboBoxTypeEditor.cs =================================================================== diff -u --- Core/Common/src/Core.Common.Controls.Swf/Table/Editors/ComboBoxTypeEditor.cs (revision 0) +++ Core/Common/src/Core.Common.Controls.Swf/Table/Editors/ComboBoxTypeEditor.cs (revision e29972e3a754b192d4f792639e599eb193e6ea8d) @@ -0,0 +1,66 @@ +using System; +using System.Collections; +using System.Windows.Forms; + +namespace Core.Common.Controls.Swf.Table.Editors +{ + public partial class ComboBoxTypeEditor : UserControl, ITypeEditor + { + public ComboBoxTypeEditor() + { + InitializeComponent(); + + ItemsMandatory = true; + } + + /// + /// Determines if the are mandatory + /// (if true -> values that are not in the list will be shown as blank) + /// + public bool ItemsMandatory { get; set; } + + /// + /// List of values that the user can choose from + /// + public IEnumerable Items { get; set; } + + /// + /// Sets the displayformat of the column. For example c2, D or AA{0} + /// + public string DisplayFormat { get; set; } + + /// + /// Allows to override the way cell text is rendered. + /// + public ICustomFormatter CustomFormatter { get; set; } + + public object EditableValue { get; set; } + + public bool CanAcceptEditValue() + { + return true; + } + + public bool CanPopup() + { + return true; + } + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + Items = null; + EditableValue = null; + + components.Dispose(); + } + + base.Dispose(disposing); + } + } +} \ No newline at end of file Index: Core/Common/src/Core.Common.Controls.Swf/Table/Editors/ITypeEditor.cs =================================================================== diff -u --- Core/Common/src/Core.Common.Controls.Swf/Table/Editors/ITypeEditor.cs (revision 0) +++ Core/Common/src/Core.Common.Controls.Swf/Table/Editors/ITypeEditor.cs (revision e29972e3a754b192d4f792639e599eb193e6ea8d) @@ -0,0 +1,21 @@ +using System.ComponentModel; + +namespace Core.Common.Controls.Swf.Table.Editors +{ + /// + /// Type editors are controls / components used to edit complex objects of a specific type. + /// For example cell editors in the TableView, PropertyGrid, etc. + /// + public interface ITypeEditor : IComponent + { + event CancelEventHandler Validating; + + object EditableValue { get; set; } + + bool Validate(); + + bool CanAcceptEditValue(); + + bool CanPopup(); + } +} \ No newline at end of file Index: Core/Common/src/Core.Common.Controls.Swf/Table/Editors/MultiLineTextEdior.cs =================================================================== diff -u --- Core/Common/src/Core.Common.Controls.Swf/Table/Editors/MultiLineTextEdior.cs (revision 0) +++ Core/Common/src/Core.Common.Controls.Swf/Table/Editors/MultiLineTextEdior.cs (revision e29972e3a754b192d4f792639e599eb193e6ea8d) @@ -0,0 +1,19 @@ +using System.Windows.Forms; + +namespace Core.Common.Controls.Swf.Table.Editors +{ + public class MultiLineTextEdior : UserControl, ITypeEditor + { + public object EditableValue { get; set; } + + public bool CanAcceptEditValue() + { + return false; + } + + public bool CanPopup() + { + return true; + } + } +} \ No newline at end of file Index: Core/Common/src/Core.Common.Controls.Swf/Table/TableView.cs =================================================================== diff -u -r5dc6b11ada2c7d2e4ca14413b1ddca577ba34d08 -re29972e3a754b192d4f792639e599eb193e6ea8d --- Core/Common/src/Core.Common.Controls.Swf/Table/TableView.cs (.../TableView.cs) (revision 5dc6b11ada2c7d2e4ca14413b1ddca577ba34d08) +++ Core/Common/src/Core.Common.Controls.Swf/Table/TableView.cs (.../TableView.cs) (revision e29972e3a754b192d4f792639e599eb193e6ea8d) @@ -8,8 +8,8 @@ using System.Linq; using System.Text; using System.Windows.Forms; -using Core.Common.Controls.Swf.Editors; using Core.Common.Controls.Swf.Properties; +using Core.Common.Controls.Swf.Table.Editors; using Core.Common.Controls.Swf.Table.Validation; using Core.Common.Utils; using Core.Common.Utils.Collections; @@ -1820,7 +1820,7 @@ /// Type of the data the column is going to display /// Index of the column /// Editor to use for editing the values of this column - public void AddUnboundColumn(string columnName, Type columnType, int index = -1, ITypeEditor editor = null) + public void AddUnboundColumn(string columnName, Type columnType, int index = -1, Editors.ITypeEditor editor = null) { var unbColumn = dxGridView.Columns.AddField(columnName); var column = new TableViewColumn(dxGridView, dxGridControl, unbColumn, this, true); Index: Core/Common/src/Core.Common.Controls.Swf/Table/TableViewColumn.cs =================================================================== diff -u -rd074ae083b5fff2532fd5d0bbf63df83365ee7db -re29972e3a754b192d4f792639e599eb193e6ea8d --- Core/Common/src/Core.Common.Controls.Swf/Table/TableViewColumn.cs (.../TableViewColumn.cs) (revision d074ae083b5fff2532fd5d0bbf63df83365ee7db) +++ Core/Common/src/Core.Common.Controls.Swf/Table/TableViewColumn.cs (.../TableViewColumn.cs) (revision e29972e3a754b192d4f792639e599eb193e6ea8d) @@ -17,7 +17,7 @@ private readonly GridColumn dxColumn; private readonly TableView tableView; private readonly GridControl dxGridControl; - private ITypeEditor editor; + private Editors.ITypeEditor editor; private string displayFormat = ""; private int visibleIndex; @@ -199,7 +199,7 @@ } } - public ITypeEditor Editor + public Editors.ITypeEditor Editor { get { Index: Core/Common/src/Core.Common.Controls.Swf/Table/XtraGridRepositoryItemBuilder.cs =================================================================== diff -u -rdd1a980616ea0f7eaf5593353dc8012a09f4c8c1 -re29972e3a754b192d4f792639e599eb193e6ea8d --- Core/Common/src/Core.Common.Controls.Swf/Table/XtraGridRepositoryItemBuilder.cs (.../XtraGridRepositoryItemBuilder.cs) (revision dd1a980616ea0f7eaf5593353dc8012a09f4c8c1) +++ Core/Common/src/Core.Common.Controls.Swf/Table/XtraGridRepositoryItemBuilder.cs (.../XtraGridRepositoryItemBuilder.cs) (revision e29972e3a754b192d4f792639e599eb193e6ea8d) @@ -4,7 +4,7 @@ using System.Drawing; using System.Linq; using System.Windows.Forms; -using Core.Common.Controls.Swf.Editors; +using Core.Common.Controls.Swf.Table.Editors; using DevExpress.Utils; using DevExpress.XtraEditors; using DevExpress.XtraEditors.Controls; @@ -19,7 +19,7 @@ { private static readonly ILog Log = LogManager.GetLogger(typeof(TableViewColumn)); - public static RepositoryItem CreateFromTypeEditor(ITypeEditor typeEditor, GridControl gridControl, GridColumn column, string caption) + public static RepositoryItem CreateFromTypeEditor(Editors.ITypeEditor typeEditor, GridControl gridControl, GridColumn column, string caption) { if (typeEditor is MultiLineTextEdior) { @@ -201,7 +201,7 @@ /// /// Called when the popup is closed /// - private static void RepositoryItemCloseUp(CloseUpEventArgs e, ITypeEditor editor) + private static void RepositoryItemCloseUp(CloseUpEventArgs e, Editors.ITypeEditor editor) { if (e.CloseMode == PopupCloseMode.Cancel) { @@ -216,14 +216,14 @@ private static void RepositoryItemValidating(object sender, CancelEventArgs e) { var popupContainer = (PopupContainerEdit) sender; - var typeEditor = (ITypeEditor) popupContainer.Properties.PopupControl.Controls[0]; + var typeEditor = (Editors.ITypeEditor) popupContainer.Properties.PopupControl.Controls[0]; if (!typeEditor.Validate()) { e.Cancel = true; } } - private static void ButtonTypeEditorRepositoryItemButtonClick(ButtonPressedEventArgs e, ITypeEditor editor) + private static void ButtonTypeEditorRepositoryItemButtonClick(ButtonPressedEventArgs e, Editors.ITypeEditor editor) { var buttonTypeEditor = (ButtonTypeEditor) editor; if (buttonTypeEditor.ButtonClickAction != null) @@ -235,15 +235,15 @@ private static void RepositoryItemQueryResultValue(object sender, QueryResultValueEventArgs e) { var popupContainer = (PopupContainerEdit) sender; - var typeEditor = (ITypeEditor) popupContainer.Properties.PopupControl.Controls[0]; + var typeEditor = (Editors.ITypeEditor) popupContainer.Properties.PopupControl.Controls[0]; e.Value = typeEditor.EditableValue; } private static void RepositoryItemQueryPopUp(object sender, CancelEventArgs e) { var popupContainer = (PopupContainerEdit) sender; - var typeEditor = (ITypeEditor) popupContainer.Properties.PopupControl.Controls[0]; + var typeEditor = (Editors.ITypeEditor) popupContainer.Properties.PopupControl.Controls[0]; if (!typeEditor.CanPopup()) { Log.Warn("repositoryItem_QueryPopUp ! CanPopup"); Index: Core/Common/src/Core.Common.Controls/Core.Common.Controls.csproj =================================================================== diff -u -re392d6abff8f363ed6fbcef2b7ddd1dd54c77348 -re29972e3a754b192d4f792639e599eb193e6ea8d --- Core/Common/src/Core.Common.Controls/Core.Common.Controls.csproj (.../Core.Common.Controls.csproj) (revision e392d6abff8f363ed6fbcef2b7ddd1dd54c77348) +++ Core/Common/src/Core.Common.Controls/Core.Common.Controls.csproj (.../Core.Common.Controls.csproj) (revision e29972e3a754b192d4f792639e599eb193e6ea8d) @@ -81,7 +81,6 @@ - Fisheye: Tag e29972e3a754b192d4f792639e599eb193e6ea8d refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Controls/ITypeEditor.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Core/Common/test/Core.Common.Controls.Swf.Test/Table/TableViewPasteControllerTest.cs =================================================================== diff -u -rdc06f24147cb5d1f94cec6f3705d07dc3142d175 -re29972e3a754b192d4f792639e599eb193e6ea8d --- Core/Common/test/Core.Common.Controls.Swf.Test/Table/TableViewPasteControllerTest.cs (.../TableViewPasteControllerTest.cs) (revision dc06f24147cb5d1f94cec6f3705d07dc3142d175) +++ Core/Common/test/Core.Common.Controls.Swf.Test/Table/TableViewPasteControllerTest.cs (.../TableViewPasteControllerTest.cs) (revision e29972e3a754b192d4f792639e599eb193e6ea8d) @@ -3,8 +3,8 @@ using System.Data; using System.Linq; using System.Windows.Forms; -using Core.Common.Controls.Swf.Editors; using Core.Common.Controls.Swf.Table; +using Core.Common.Controls.Swf.Table.Editors; using Core.Common.Controls.Swf.Test.Table.TestClasses; using NUnit.Framework; Index: Core/Common/test/Core.Common.Controls.Swf.Test/Table/TableViewTest.cs =================================================================== diff -u -rd074ae083b5fff2532fd5d0bbf63df83365ee7db -re29972e3a754b192d4f792639e599eb193e6ea8d --- Core/Common/test/Core.Common.Controls.Swf.Test/Table/TableViewTest.cs (.../TableViewTest.cs) (revision d074ae083b5fff2532fd5d0bbf63df83365ee7db) +++ Core/Common/test/Core.Common.Controls.Swf.Test/Table/TableViewTest.cs (.../TableViewTest.cs) (revision e29972e3a754b192d4f792639e599eb193e6ea8d) @@ -8,8 +8,8 @@ using System.Linq; using System.Threading; using System.Windows.Forms; -using Core.Common.Controls.Swf.Editors; using Core.Common.Controls.Swf.Table; +using Core.Common.Controls.Swf.Table.Editors; using Core.Common.Controls.Swf.Test.Table.TestClasses; using Core.Common.TestUtils; using Core.Common.Utils.Collections.Generic;