/// <summary> /// Initializes a new instance of the <see cref="DataGridViewModel"/> class. /// </summary> /// <param name="title">The title.</param> /// <param name="openFileService">The open file service.</param> /// <param name="saveFileService">The save file service.</param> /// <param name="uiVisualizerService">The UI visualizer service.</param> /// <param name="messageMediator">The message mediator.</param> public DataGridViewModel(string title, IOpenFileService openFileService, ISaveFileService saveFileService, IUIVisualizerService uiVisualizerService, IMessageMediator messageMediator, IContextualViewModelManager contextualViewModelManager) : this(openFileService, saveFileService, uiVisualizerService, messageMediator, contextualViewModelManager) { if (!string.IsNullOrWhiteSpace(title)) { Title = title; } }
/// <summary> /// Initializes static members of the <see cref="AvalonDockHelper"/> class. /// </summary> static AvalonDockHelper() { ContextualViewModelManager = ServiceLocator.Default.ResolveType <IContextualViewModelManager>(); DockingManager = ServiceLocator.Default.ResolveType <DockingManager>(); DockingManager.DocumentClosing += OnDockingManagerDocumentClosing; DockingManager.DocumentClosed += OnDockingManagerDocumentClosed; DockingManager.ActiveContentChanged += DockingManagerActiveContentChanged; LayoutDocumentPane = ServiceLocator.Default.ResolveType <LayoutDocumentPane>(); LayoutAnchorGroup = ServiceLocator.Default.ResolveType <LayoutAnchorGroup>(); RightLayoutAnchorablePane = (LayoutAnchorablePane)ServiceLocator.Default.ResolveType(typeof(LayoutAnchorablePane), "rightPropertiesPane"); LeftLayoutAnchorablePane = (LayoutAnchorablePane)ServiceLocator.Default.ResolveType(typeof(LayoutAnchorablePane), "leftPropertiesPane"); BottomPropertiesPane = (LayoutAnchorGroup)ServiceLocator.Default.ResolveType(typeof(LayoutAnchorGroup), "bottomPropertiesPane"); TopPropertiesPane = (LayoutAnchorGroup)ServiceLocator.Default.ResolveType(typeof(LayoutAnchorGroup), "topPropertiesPane"); }
/// <summary> /// Initializes a new instance of the <see cref="BrowserViewModel" /> class. /// </summary> /// <param name="messageService">The message service.</param> /// <param name="orchestraService">The orchestra service.</param> /// <param name="messageMediator">The message mediator.</param> /// <param name="contextualViewModelManager">The contextual view model manager.</param> public BrowserViewModel(IMessageService messageService, IOrchestraService orchestraService, IMessageMediator messageMediator, IContextualViewModelManager contextualViewModelManager) { Argument.IsNotNull(() => orchestraService); Argument.IsNotNull(() => orchestraService); Argument.IsNotNull(() => messageMediator); _messageService = messageService; _orchestraService = orchestraService; _messageMediator = messageMediator; _contextualViewModelManager = contextualViewModelManager; GoBack = new Command(OnGoBackExecute, OnGoBackCanExecute); GoForward = new Command(OnGoForwardExecute, OnGoForwardCanExecute); Browse = new Command(OnBrowseExecute, OnBrowseCanExecute); Test = new Command(OnTestExecute); CloseBrowser = new Command(OnCloseBrowserExecute); this.Title = "Browser"; }
/// <summary> /// Initializes a new instance of the <see cref="DataGridViewModel"/> class. /// </summary> /// <param name="openFileService">The open file service.</param> /// <param name="saveFileService">The save file service.</param> /// <param name="uiVisualizerService">The UI visualizer service.</param> /// <param name="messageMediator">The message mediator.</param> public DataGridViewModel(IOpenFileService openFileService, ISaveFileService saveFileService, IUIVisualizerService uiVisualizerService, IMessageMediator messageMediator, IContextualViewModelManager contextualViewModelManager) { Argument.IsNotNull(() => openFileService); Argument.IsNotNull(() => saveFileService); Argument.IsNotNull(() => uiVisualizerService); Argument.IsNotNull(() => messageMediator); Argument.IsNotNull(() => contextualViewModelManager); _openFileService = openFileService; _saveFileService = saveFileService; _uiVisualizerService = uiVisualizerService; _messageMediator = messageMediator; _contextualViewModelManager = contextualViewModelManager; Items.CollectionChanged += ItemsCollectionChanged; Title = "Datagrid"; }
/// <summary> /// Initializes a new instance of the <see cref="PropertiesViewModel"/> class. /// </summary> public PropertiesViewModel(IMessageService messageService, IOrchestraService orchestraService, IMessageMediator messageMediator, IContextualViewModelManager contextualViewModelManager) { Argument.IsNotNull(() => orchestraService); Argument.IsNotNull(() => orchestraService); Argument.IsNotNull(() => messageMediator); _messageService = messageService; _orchestraService = orchestraService; _messageMediator = messageMediator; Title = "Properties"; // Comands DocMapSelectedCommand = new Command(OnDocMapSelectedCommandExecute, OnDocMapSelectedCommandCanExecute); }
/// <summary> /// Initializes a new instance of the <see cref="PropertiesViewModel"/> class. /// </summary> /// <param name="title">The title.</param> /// <param name="messageService">The message service.</param> /// <param name="orchestraService">The orchestra service.</param> /// <param name="messageMediator">The message mediator.</param> /// <param name="contextualViewModelManager">The contextual view model manager.</param> public PropertiesViewModel(string title, IMessageService messageService, IOrchestraService orchestraService, IMessageMediator messageMediator, IContextualViewModelManager contextualViewModelManager) : this(messageService, orchestraService, messageMediator, contextualViewModelManager) { Title = title; }
/// <summary> /// Initializes a new instance of the <see cref="TextEditorViewModel" /> class. /// </summary> /// <param name="messageService">The message service.</param> /// <param name="orchestraService">The orchestra service.</param> /// <param name="messageMediator">The message mediator.</param> /// <param name="contextualViewModelManager">The contextual view model manager.</param> /// <param name="textEditorModule">The Main Module Class.</param> /// <param name="processService">The process service.</param> public TextEditorViewModel(TextEditorModule textEditorModule, IMessageService messageService, IOrchestraService orchestraService, IMessageMediator messageMediator, IContextualViewModelManager contextualViewModelManager, IProcessService processService) { Argument.IsNotNull(() => orchestraService); Argument.IsNotNull(() => orchestraService); Argument.IsNotNull(() => messageMediator); Argument.IsNotNull(() => processService); Document = new TextDocument(); _messageService = messageService; _orchestraService = orchestraService; _messageMediator = messageMediator; _contextualViewModelManager = contextualViewModelManager; _textEditorModule = textEditorModule; _processService = processService; #region TextEditor related TextOptions = new TextEditorOptions() { ShowSpaces = true }; // Set Highlightning to C# HighlightDef = HighlightingManager.Instance.GetDefinition("C#"); //SelectedLanguage = "C#"; IsDirtyDoc = false; IsReadOnly = false; ShowLineNumbers = true; WordWrap = false; // Comands ShowLineNumbersCommand = new Command(OnShowLineNumbersCommandExecute); WordWrapCommand = new Command(OnWordWrapCommandExecute); EndLineCommand = new Command(OnEndLineCommandExecute); ShowSpacesCommand = new Command(OnShowSpacesCommandExecute); SaveAsCommand = new Command(OnSaveAsCommandExecute, OnSaveAsCommandCanExecute); SaveCommand = new Command(OnSaveCommandExecute, OnSaveCommandCanExecute); CloseDocument = new Command(OnCloseDocumentExecute); UpdateCommand = new Command(OnUpdateCommandExecute, OnUpdateCommandCanExecute); DocumentMapOpenCommand = new Command(OnDocumentMapOpenExecute); ScriptCSCommand = new Command(OnScriptCSCommandExecute, OnScriptCSCommandCanExecute); #endregion #region Document related Title = FileName; #endregion string directory = Catel.IO.Path.GetApplicationDataDirectory("Orchestra.TextEditor"); // Set the path and Load the default Document Map Settings _path = Path.Combine(directory, "mapsettings.txt"); if (File.Exists(_path)) { _regextPattern = File.ReadAllText(_path); } else { // Set the default value _regextPattern = "^.*\b(private|public|sealed|protected|virtual|internal)\b.*$"; } messageMediator.Register <string>(this, OnDocMapRegexChange); // Invalidate the current viewmodel ViewModelActivated(); }
/// <summary> /// Initializes a new instance of the <see cref="TextEditorViewModel" /> class. /// Main TextEdtior Class is passed by reference to this Class /// </summary> /// <param name="title">The title.</param> /// <param name="messageService">The message service.</param> /// <param name="orchestraService">The orchestra service.</param> /// <param name="messageMediator">The message mediator.</param> /// <param name="contextualViewModelManager">The contextual view model manager.</param> /// <param name="textEditorModule">The Main Module Class.</param> /// <param name="processService">The process service.</param> public TextEditorViewModel(string title, TextEditorModule textEditorModule, IMessageService messageService, IOrchestraService orchestraService, IMessageMediator messageMediator, IContextualViewModelManager contextualViewModelManager, IProcessService processService) : this(textEditorModule, messageService, orchestraService, messageMediator, contextualViewModelManager, processService) { if (!string.IsNullOrWhiteSpace(title)) { Title = title; } _textEditorModule = textEditorModule; // Set Highlightning to C# this.HighlightDef = HighlightingManager.Instance.GetDefinition("C#"); //this._isDirty = false; this.IsReadOnly = false; this.ShowLineNumbers = true; this.WordWrap = false; }
/// <summary> /// Initializes a new instance of the <see cref="BrowserViewModel" /> class. /// </summary> /// <param name="title">The title.</param> /// <param name="messageService">The message service.</param> /// <param name="orchestraService">The orchestra service.</param> /// <param name="messageMediator">The message mediator.</param> /// <param name="contextualViewModelManager">The contextual view model manager.</param> public BrowserViewModel(string title, IMessageService messageService, IOrchestraService orchestraService, IMessageMediator messageMediator, IContextualViewModelManager contextualViewModelManager) : this(messageService, orchestraService, messageMediator, contextualViewModelManager) { if (!string.IsNullOrWhiteSpace(title)) { Title = title; } }