Revision 0a9d4d18 trunk/Pithos.Client.WPF/FileProperties/FilePropertiesViewModel.cs

b/trunk/Pithos.Client.WPF/FileProperties/FilePropertiesViewModel.cs
273 273
            }
274 274
        }
275 275

  
276
        private string _permissionName;
277
        public string PermissionName
278
        {
279
            get { return _permissionName; }
280
            set
281
            {
282
                _permissionName = value;
283
                NotifyOfPropertyChange(()=>PermissionName);
284
            }
285
        }
286

  
287
        private bool _permissionIsReadOnly;
288
        public bool PermissionIsReadOnly
289
        {
290
            get { return _permissionIsReadOnly; }
291
            set
292
            {
293
                _permissionIsReadOnly = value;
294
                NotifyOfPropertyChange(()=>PermissionIsReadOnly);
295
            }
296
        }
297

  
298
        public bool CanAddPermission
299
        {
300
            get { return !String.IsNullOrWhiteSpace(PermissionName); }
301
        }
302

  
303
        public void AddPermission()
304
        {
305
            Permissions.Add(new Permission{Read=PermissionIsReadOnly,UserName=PermissionName,Write=!PermissionIsReadOnly});   
306
        }
307

  
308

  
276 309
        public bool TagsChanged { get; private set; }
277 310
        public bool PermissionsChanged { get; private set; }
278 311

  

Also available in: Unified diff