Example #1
0
 public bool StartEdit()
 {
     if (_vm.Items.Any(i => i.InEditMode))
     {
         return(false);
     }
     else
     {
         _resetItem = _item.DeepCopy();
         InEditMode = true;
         return(true);
     }
 }
Example #2
0
 internal ItemViewModel(int colIndex, int rowIndex, int propIndex, int itemIndex,
                        IPGItem item, IPGColumn column, RowProperty property, PropertiesGridControlViewModel vm)
 {
     this._colIndex   = colIndex;
     this._rowIndex   = rowIndex;
     this._propIndex  = propIndex;
     this._itemIndex  = itemIndex;
     this._item       = item;
     this._column     = column;
     this._inEditMode = false;
     this._isHovered  = false;
     this._vm         = vm;
     this._property   = property;
 }
Example #3
0
        public void ResetValues(IPGItem item)
        {
            DayInfo di = item as DayInfo;

            if (item != null)
            {
                this.BreakTime   = di._breakTime;
                this.GamingHours = di._gamingHours;
                this.OnHoliday   = di._onHoliday;
                this.Sik         = di._sik;
                this.StayAt      = di._stayAt;
                this.WorkHours   = di._workHours;
            }
        }
 internal ItemViewModel(int colIndex, int rowIndex, int propIndex, int itemIndex, 
     IPGItem item, IPGColumn column, RowProperty property, PropertiesGridControlViewModel vm)
 {
     this._colIndex = colIndex;
     this._rowIndex = rowIndex;
     this._propIndex = propIndex;
     this._itemIndex = itemIndex;
     this._item = item;
     this._column = column;
     this._inEditMode = false;
     this._isHovered = false;
     this._vm = vm;
     this._property = property;
 }
Example #5
0
 public void StopEdit()
 {
     this.InEditMode = false;
     _resetItem      = null;
 }
Example #6
0
 public void ResetValues(IPGItem item)
 {
     DayInfo di = item as DayInfo;
     if(item != null)
     {
         this.BreakTime = di._breakTime;
         this.GamingHours = di._gamingHours;
         this.OnHoliday = di._onHoliday;
         this.Sik = di._sik;
         this.StayAt = di._stayAt;
         this.WorkHours = di._workHours;
     }
 }
 public void StopEdit()
 {
     this.InEditMode = false;
     _resetItem = null;
 }
 public bool StartEdit()
 {
     if (_vm.Items.Any(i => i.InEditMode))
     {
         return false;
     }
     else
     {
         _resetItem = _item.DeepCopy();
         InEditMode = true;
         return true;
     }
 }