aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/TEMP/Tango.Scripting/Tango.Scripting.IDE/ViewModelLocator.cs
blob: ffe78f49d1f561ecb2024ef7c240218bdf4772fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.Core.DI;
using Tango.Scripting.IDE.Dialogs;
using Tango.Scripting.IDE.Notifications;

namespace Tango.Scripting.IDE
{
    /// <summary>
    /// This class contains static references to all the view models in the
    /// application and provides an entry point for the bindings.
    /// </summary>
    public static class ViewModelLocator
    {
        /// <summary>
        /// Initializes a new instance of the ViewModelLocator class.
        /// </summary>
        static ViewModelLocator()
        {
            TangoIOC.Default.Register<INotificationManager, DefaultNotificationManager>();
        }
    }
}
"w"> /// <summary> /// Creates a new TextEditorAutomationPeer instance. /// </summary> public TextEditorAutomationPeer(TextEditor owner) : base(owner) { Debug.WriteLine("TextEditorAutomationPeer was created"); } private TextEditor TextEditor { get { return (TextEditor)base.Owner; } } void IValueProvider.SetValue(string value) { this.TextEditor.Text = value; } string IValueProvider.Value { get { return this.TextEditor.Text; } } bool IValueProvider.IsReadOnly { get { return this.TextEditor.IsReadOnly; } } /// <inheritdoc/> public override object GetPattern(PatternInterface patternInterface) { if (patternInterface == PatternInterface.Value) return this; if (patternInterface == PatternInterface.Scroll) { ScrollViewer scrollViewer = this.TextEditor.ScrollViewer; if (scrollViewer != null) return UIElementAutomationPeer.CreatePeerForElement(scrollViewer); } return base.GetPattern(patternInterface); } internal void RaiseIsReadOnlyChanged(bool oldValue, bool newValue) { RaisePropertyChangedEvent(ValuePatternIdentifiers.IsReadOnlyProperty, Boxes.Box(oldValue), Boxes.Box(newValue)); } } }