public void StartBatchDesign() { BatchDesignView view = (this.DataContext as ViewModel).MyBatchDesignView; view.BatchDesign.Type = (GlobalClusteringCB.IsChecked ?? false) ? ClusteringType.Global : ClusteringType.Local; view.DisplayDesignClusters(); view.DisplayAllClusters(); view.GetCurrentPerformance(); }
public void Clustering_Clicked(object sender, RoutedEventArgs e) { CheckBox cb = sender as CheckBox; BatchDesignView view = (this.DataContext as ViewModel).MyBatchDesignView; if (cb.Name == "LocalClusteringCB") { view.BatchDesign.Type = ClusteringType.Local; if ((GlobalClusteringCB.IsChecked ?? false) && (LocalClusteringCB.IsChecked ?? false)) { view.DisplayAllClusters(); } LocalClusteringCB.IsChecked = true; GlobalClusteringCB.IsChecked = false; } else if (cb.Name == "GlobalClusteringCB") { view.BatchDesign.Type = ClusteringType.Global; if ((GlobalClusteringCB.IsChecked ?? false) && (LocalClusteringCB.IsChecked ?? false)) { view.DisplayAllClusters(); } GlobalClusteringCB.IsChecked = true; LocalClusteringCB.IsChecked = false; } bool b = GlobalClusteringCB.IsChecked ?? false; DomainCB.IsEnabled = b; MinXDim.IsEnabled = b; MinYDim.IsEnabled = b; MaxXDim.IsEnabled = b; MaxYDim.IsEnabled = b; IncrXDim.IsEnabled = b; IncrYDim.IsEnabled = b; ListCB.IsEnabled = b; ColumnSizesTB.IsEnabled = b; // update clustering }
public void EndHighlight(object sender, MouseEventArgs e) { BatchDesignView view = this.DataContext as BatchDesignView; if (view.ActiveCluster < 0) { view.DisplayAllClusters(compute: false, updateKeys: false); } else { view.DisplayOneCluster(view.ActiveCluster); } }