예제 #1
0
        private void deleteButton_Click(object sender, EventArgs e)
        {
            var files = filesDG.SelectedRows
                        .Cast <DataGridViewRow>()
                        .Select(row => new File
            {
                Catalog = row.Cells[0].Value.ToString(),
                Name    = row.Cells[1].Value.ToString()
            });

            OnDeleteRequest.Invoke(files);
        }
예제 #2
0
 public static void InvokeDeleteRequest(NetState state, int index)
 {
     OnDeleteRequest?.Invoke(state, index);
 }
 /// <summary>
 /// Default constructor
 /// </summary>
 public ListTimeTaskItemViewModel()
 {
     // Create commands
     EditCommand   = new RelayCommand(() => OnEditRequest.Invoke(this));
     DeleteCommand = new RelayCommand(() => OnDeleteRequest.Invoke(this));
 }