Fix menus. Fix Parameter sorting. Fix erroneous bindings. Fix issue with display of model name not showing an underscore in the name.
Label control was interpreting it as an accelerator. Other code cleanup.
This commit is contained in:
@@ -4,23 +4,30 @@ using System.Windows.Input;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using TradeBlotter.Command;
|
||||
using Telerik.Windows.Input.Touch;
|
||||
|
||||
namespace TradeBlotter.ViewModels
|
||||
{
|
||||
public delegate void InstantiateWorkspace(SaveParameters saveParameters);
|
||||
public abstract class WorkspaceViewModel : ViewModelBase
|
||||
{
|
||||
// Relay Command
|
||||
private RelayCommand closeCommand;
|
||||
|
||||
// Events
|
||||
public event EventHandler RequestClose;
|
||||
|
||||
private InstantiateWorkspace workspaceInstantiator;
|
||||
private bool canClose=true;
|
||||
private bool isClosed=false;
|
||||
|
||||
private String title="WorkspaceViewModel";
|
||||
public WorkspaceViewModel Referer{get;set;}
|
||||
|
||||
protected WorkspaceViewModel()
|
||||
{
|
||||
}
|
||||
|
||||
public InstantiateWorkspace WorkspaceInstantiator
|
||||
{
|
||||
get
|
||||
@@ -32,14 +39,19 @@ namespace TradeBlotter.ViewModels
|
||||
workspaceInstantiator = value;
|
||||
}
|
||||
}
|
||||
|
||||
public ICommand CloseCommand
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == closeCommand) closeCommand = new RelayCommand(param => this.OnRequestClose());
|
||||
if (null == closeCommand)
|
||||
{
|
||||
closeCommand = new RelayCommand(param => this.OnRequestClose());
|
||||
}
|
||||
return closeCommand;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsClosed
|
||||
{
|
||||
get { return isClosed; }
|
||||
@@ -52,6 +64,7 @@ namespace TradeBlotter.ViewModels
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool CanClose
|
||||
{
|
||||
get { return canClose; }
|
||||
@@ -64,6 +77,7 @@ namespace TradeBlotter.ViewModels
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual String Title
|
||||
{
|
||||
get
|
||||
@@ -76,6 +90,15 @@ namespace TradeBlotter.ViewModels
|
||||
base.OnPropertyChanged("Title");
|
||||
}
|
||||
}
|
||||
|
||||
public virtual String Header
|
||||
{
|
||||
get
|
||||
{
|
||||
return title;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnRequestClose()
|
||||
{
|
||||
EventHandler handler = this.RequestClose;
|
||||
|
||||
Reference in New Issue
Block a user