Ejemplo n.º 1
0
        void Next()
        {
            BaseConfigViewModel workspace = null;

            if (IsManual)
            {
                BaseConfig newBaseConfig = new BaseConfig();
                workspace = new BaseConfigViewModel(this, newBaseConfig, _serviceSA1C);
            }
            else
            {
                if (SelectedItem != null)
                {
                    BaseConfig baseConfig = new BaseConfig();
                    baseConfig.baseInfo = SelectedItem;
                    baseConfig.Name     = SelectedItem.Name;
                    workspace           = new BaseConfigViewModel(this, baseConfig, _serviceSA1C);
                }
            }

            if (workspace != null)
            {
                CloseCommand.Execute(true);
                base.Workspaces = workspace;
            }
        }
Ejemplo n.º 2
0
        void OnCustomerViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            if (e.PropertyName != "IsSelected")
            {
                return;
            }

            if ((sender as BaseConfigViewModel).IsSelected)
            {
                CurrentConfig = (BaseConfigViewModel)sender;
                foreach (CommandViewModel command in Commands)
                {
                    if (command.DisplayName == "Изменить настройку" || command.DisplayName == "Удалить настройку")
                    {
                        command.IsEnabled = true;
                    }
                }
            }
            //(sender as BaseConfigViewModel).VerifyPropertyName(IsSelected);
        }