66using System . Windows ;
77using System . Windows . Controls ;
88using System . Windows . Forms ;
9+ using System . Windows . Input ;
910using System . Windows . Media ;
1011using AI_clusterization . DataProcessing ;
12+ using Cursors = System . Windows . Input . Cursors ;
1113
1214namespace AI_clusterization . UI
1315{
@@ -58,6 +60,7 @@ private void SelectDataset(object sender, RoutedEventArgs e)
5860 var result = dialog . ShowDialog ( ) ;
5961 if ( result != System . Windows . Forms . DialogResult . OK ) return ;
6062
63+ Mouse . OverrideCursor = Cursors . Wait ;
6164 DatasetPath . Text = dialog . SelectedPath ;
6265 DatasetItems . Items . Clear ( ) ;
6366
@@ -72,6 +75,8 @@ private void SelectDataset(object sender, RoutedEventArgs e)
7275 DatasetItems . Items . Add ( new DatasetItem ( file ) ) ;
7376 }
7477
78+ Mouse . OverrideCursor = Cursors . Arrow ;
79+
7580 // save initial order of items
7681 _items = DatasetItems . Items . OfType < DatasetItem > ( ) . ToList ( ) ;
7782 }
@@ -91,6 +96,7 @@ private void SelectItem(object sender, SelectionChangedEventArgs e)
9196
9297 private void RunClusterization ( object sender , RoutedEventArgs e )
9398 {
99+ Mouse . OverrideCursor = Cursors . Wait ;
94100 var clusters = Clusterization . Run ( _dataset , Convert . ToInt32 ( Clusters . Text ) ) ;
95101
96102 DatasetItems . Items . Clear ( ) ;
@@ -104,6 +110,7 @@ private void RunClusterization(object sender, RoutedEventArgs e)
104110 _items [ index ] . Background = ClusterColors [ i % ClusterColors . Length ] ;
105111 }
106112 }
113+ Mouse . OverrideCursor = Cursors . Arrow ;
107114 }
108115
109116 private void EditBufferSize ( object sender , RoutedPropertyChangedEventArgs < double > e )
0 commit comments