예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="LanguageControlVm"/> class.
        /// </summary>
        /// <param name="imsOpcBridgeSettings">The ims opc bridge settings.</param>
        public LanguageControlVm(ImsOpcBridgeSettings imsOpcBridgeSettings)
        {
            this.host                = null;
            this.CurrentLanguages    = new ObservableCollection <LanguageControlItemVm>();
            this.nextPageCommand     = new DelegateCommand(this.GoToNextPage);
            this.previousPageCommand = new DelegateCommand(this.GoToPreviousPage);

            this.Title = Resources.SelectLanguage;
            this.imsOpcBridgeSettings = imsOpcBridgeSettings;
            this.FillAvailableLanguages();

            this.UpdatePage();
        }
        /// <summary>
        /// Initializes the settings.
        /// </summary>
        private void InitializeSettings()
        {
            this.settings = ImsOpcBridgeSettings.Singleton as ImsOpcBridgeSettings;

            if (this.settings != null)
            {
                this.AllowExecutionOnMachine = this.settings.AllowExecutionOnMachine;
                this.CommandAlignment        = this.settings.CommandAlignment;
                this.DoShowDeviceCommands    = this.settings.ShowDeviceCommands;
                this.DoLoggingCommands       = this.settings.LoggingCommands;
                this.Manufacturer            = this.settings.Manufacturer;
                this.WindowsPosHeight        = this.settings.WindowsPosHeight;
                this.WindowsPosLeft          = this.settings.WindowsPosLeft;
                this.WindowsPosTop           = this.settings.WindowsPosTop;
                this.WindowsPosWidth         = this.settings.WindowsPosWidth;
            }
        }