- show/hide the context menu items instead of creating and adding new ones each time the context menu opens
- right click menu with rescan/add was not available for empty list or when empty space was clicked
- the condition for the edit button was slightly different from the edit toolstripmenuitem
- improved button layout (part of CA-100083)
- tidied up button event handlers and renamed one or two class members
- removed unused parameter in constructor and method of VDIRow
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
Making the requested changes: Name is now sorted by the generic CompareTo method (which uses name with opaque ref as tiebreaker), and Description also uses opaque ref as tiebreaker for consistency.
Change the sorting on the Name and Description columns to use StringUtility.NaturalCompare, which correctly sorts strings with numbers at the end (eg name, name0, name1, name2, name10 will now sort correctly while alphabetic sorting is incorrect). Also added a tie break on uuid to make sorting behave predictably with duplicates in these columns.
We observed that some threads can reach deadlock-ish state after they have Invoked into a control's UI thread. When it happens they are all in a waiting for join or in sleep state for very long time, although there should not be any deadlock situations.
It seems this has something to do with multiple parent controls and with which control we invoked on. This should not make a difference, because we have got one UI thread (for MainWindow) they should wait for, but we have seen it does.
The solution that fixed this issue was to invoke on the MainWindow instead of various controls (see a4fe507adf ).
This changeset is changing all our Invokes to invoke into MainWindow
instead of a control itself. (MainWindow's UI thread is the only UI thread
all Control is using in XenCenter)
This changeset should be in place until we have found the root cause or the exact reason for the above.
NewAction to use the Action<ActionBase> delegate instead of EventHandler. Thus
there is no need to fire them with Empty or null EventArgs and on several occasions
we avoid casting objects in the event handlers.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
1. Moved Dispose(bool disposing) method to SrStoragePage.cs (from SrStoragePage.Designer.cs).
2. Added private bool disposed field as suggested in review #1998.
Signed-off-by: Adrian Jachacy <Adrian.Jachacy@citrix.com>
Added VDIsDataGridViewBuilder class which refreshes the data grid view with new data using background worker thread.
Signed-off-by: Adrian Jachacy <Adrian.Jachacy@citrix.com>
The logic to determine which rows have to be added/updated/removed has been moved to a separate thread. This improved the performance as the UI thread is blocked only to refresh rows in the dataGridView.
Signed-off-by: Adrian Jachacy <Adrian.Jachacy@citrix.com>
Modified BuildList() method to remove and add dataGridViewRows only when needed (previously all rows were cleared and new rows were added every time BuildList method was executed).
Signed-off-by: Adrian Jachacy <Adrian.Jachacy@citrix.com>