コード例 #1
0
        private void ExecuteEditCommand()
        {
            EditData = new MuteEditViewModel(MuteEditAction.Edit)
            {
                Filter        = SelectedEntry.Filter,
                HasEndDate    = SelectedEntry.EndDate.HasValue,
                CaseSensitive = SelectedEntry.CaseSensitive
            };
            if (EditData.HasEndDate && SelectedEntry.EndDate.HasValue)
            {
                EditData.EndDate = SelectedEntry.EndDate.Value;
            }

            EditData.Cancelled += EditData_Cancelled;
            EditData.Saved     += EditData_Saved;
        }
コード例 #2
0
 private void ExecuteAddCommand()
 {
     EditData            = new MuteEditViewModel(MuteEditAction.Add);
     EditData.Cancelled += EditData_Cancelled;
     EditData.Saved     += EditData_Saved;
 }