예제 #1
0
 public EditVm(BaseModel model, UserModel user, bool isNewObject = false)
     : base(user)
 {
     _model = model;
     Properties = new ObservableCollection<PropertyEssentials>(GetModelProperties());
     _isNewObject = isNewObject;
 }
예제 #2
0
 private void InitEditorControl(BaseModel model, UserModel user)
 {
     var editorControl = new EditorControl(model, user, _isNewCharacter);
     Grid.SetRow(editorControl, 0);
     Grid.SetColumn(editorControl, 0);
     Grid.SetColumnSpan(editorControl, 1);
     CharacterPropertiesGrid.Children.Add(editorControl);
 }
예제 #3
0
        public EditorControl(BaseModel model, UserModel user, bool isNewObject)
        {
            Guard.VerifyObjectNotNull(model, nameof(model));
            Guard.VerifyObjectNotNull(user, nameof(user));


            InitializeComponent();
            _editVm = new EditVm(model, user, isNewObject);

            DataContext = _editVm;

            AssembleFields();
        }
예제 #4
0
        public EditWindow(BaseModel model, UserModel user, bool isNewObject = false)
        {
            Guard.VerifyObjectNotNull(model, nameof(model));
            Guard.VerifyObjectNotNull(user, nameof(user));

            InitializeComponent();

            _user = user;
            _isNewObject = isNewObject;
            _model = model;
            DataContext = new EditVm(model, _user, _isNewObject);
            InitEditorControl();
        }