Esempio n. 1
0
        public void Add(IEnumerable <string> existingNames)
        {
            _isAdd = true;
            Title  = "New Template";

            _fieldsChanged = false;

            InitPredefinedFieldValues();
            ResetFieldValuesForAllBuffers();

            _unmodifiedValue = Container.Resolve <TemplateDialogViewModel>();
            _unmodifiedValue.CopyFrom(this);

            _existingNames = existingNames;
        }
Esempio n. 2
0
        public void Edit(IEnumerable <string> existingNames)
        {
            _isAdd = false;
            Title  = $"Editing \"{Name}\"";

            _existingNames = existingNames.Where(t => !string.Equals(t, Name, StringComparison.OrdinalIgnoreCase)).ToList();

            _fieldsChanged = false;

            InitPredefinedFieldValues();
            ResetFieldValuesForAllBuffers();

            // Save unmodified properties.
            _unmodifiedValue = Container.Resolve <TemplateDialogViewModel>();
            _unmodifiedValue.CopyFrom(this);
        }