mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-23 20:36:33 +01:00
The designed class should be the first one in the file, otherwise VisualStudio's designer breaks.
In this case, the CheckableDataGridViewRowEventArgs are very specialised and can be nested in the CheckableDataGridView. Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
parent
79684617eb
commit
6a36bf37ff
@ -32,7 +32,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using XenAdmin.Core;
|
||||
@ -40,17 +39,17 @@ using XenAPI;
|
||||
|
||||
namespace XenAdmin.Controls.CheckableDataGridView
|
||||
{
|
||||
public class CheckableDataGridViewRowEventArgs : EventArgs
|
||||
{
|
||||
public int RowIndex { get; set; }
|
||||
public bool RefreshGrid { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// NOTE: Ensure your first column is a checkbox column
|
||||
/// </summary>
|
||||
public class CheckableDataGridView : DataGridViewEx.DataGridViewEx, ICheckableDataGridViewView
|
||||
{
|
||||
public class CheckableDataGridViewRowEventArgs : EventArgs
|
||||
{
|
||||
public int RowIndex { get; set; }
|
||||
public bool RefreshGrid { get; set; }
|
||||
}
|
||||
|
||||
protected static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
private const string RowUpdatedEventKey = "CheckableDataGridViewRowUpdatedEventKey";
|
||||
private const string RowCheckedEventKey = "CheckableDataGridViewRowCheckedEventKey";
|
||||
|
@ -80,7 +80,7 @@ namespace XenAdmin.Dialogs
|
||||
|
||||
}
|
||||
|
||||
void checkableDataGridView_RowChecked(object sender, CheckableDataGridViewRowEventArgs e)
|
||||
void checkableDataGridView_RowChecked(object sender, CheckableDataGridView.CheckableDataGridViewRowEventArgs e)
|
||||
{
|
||||
Controller.UpdateButtonEnablement();
|
||||
}
|
||||
@ -100,7 +100,7 @@ namespace XenAdmin.Dialogs
|
||||
Controller.ReleaseLicenses(checkableDataGridView.CheckedRows);
|
||||
}
|
||||
|
||||
private void checkableDataGridView_RowUpdated(object sender, CheckableDataGridViewRowEventArgs e)
|
||||
private void checkableDataGridView_RowUpdated(object sender, CheckableDataGridView.CheckableDataGridViewRowEventArgs e)
|
||||
{
|
||||
LicenseCheckableDataGridView senderGrid = sender as LicenseCheckableDataGridView;
|
||||
if (senderGrid == null || e.RowIndex >= senderGrid.Rows.Count || e.RowIndex < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user