Пример #1
0
        private void CreateVisibilityControl(NameAttribute displayNameAttribute)
        {
            var visibilityControl = new ConfigVisibilityControl(_localController.GetLocalStrings <SDGuiStrings>(), _coreConfigSection, _buildController);

            visibilityControl.ConfigItemDisplayName = _localController.GetLocalString(displayNameAttribute.LocalType, displayNameAttribute.DisplayName);

            configItemPanel.Children.Add(visibilityControl);
        }
Пример #2
0
        public void ShouldGetLocalizedDEStrings()
        {
            // Arrange
            Thread.CurrentThread.CurrentCulture = new CultureInfo("de");
            var localController = new LocalController(new ILocalStrings[] { new TestLocalStrings() });

            // Act
            var strings = localController.GetLocalStrings<TestLocalStrings>();

            // Assert
            Assert.AreEqual(strings.TestString1, "TestString1DE");
        }
Пример #3
0
        public void ShouldGetLocalizedDEStrings()
        {
            // Arrange
            Thread.CurrentThread.CurrentCulture = new CultureInfo("de");
            var localController = new LocalController(new ILocalStrings[] { new TestLocalStrings() });

            // Act
            var strings = localController.GetLocalStrings <TestLocalStrings>();

            // Assert
            Assert.AreEqual(strings.TestString1, "TestString1DE");
        }
Пример #4
0
        public void ShouldGetTestLocalStrings()
        {
            // Arrange
            Thread.CurrentThread.CurrentCulture = new CultureInfo("en");
            var localController = new LocalController(new ILocalStrings[] { new TestLocalStrings() });

            // Act
            var strings = localController.GetLocalStrings <TestLocalStrings>();

            // Assert
            Assert.IsNotNull(strings);
            Assert.AreEqual("TestString1", strings.TestString1);
        }
Пример #5
0
        public void ShouldGetTestLocalStrings()
        {
            // Arrange   
            Thread.CurrentThread.CurrentCulture = new CultureInfo("en");
            var localController = new LocalController(new ILocalStrings[] { new TestLocalStrings() });

            // Act
            var strings = localController.GetLocalStrings<TestLocalStrings>();

            // Assert
            Assert.IsNotNull(strings);
            Assert.AreEqual("TestString1", strings.TestString1);
        }
Пример #6
0
        public Shell(IConfigController configController, IExporter[] allExporters, LocalController localController, IBuildController buildController)
        {
            var guiStrings = localController.GetLocalStrings <SDGuiStrings>();

            DataContext = new ShellViewModel(guiStrings, configController, buildController, ExecuteOnClose);
            Strings     = guiStrings;

            InitializeComponent();

            svBody.Content = new ConfigGridControl(configController, allExporters, localController, buildController);

            MouseLeftButtonDown += (s, a) => OnMouseDown(s, a);
            MouseLeftButtonUp   += (s, a) => OnMouseUp(s, a);
        }