public MainWindow() { InitializeComponent(); wavs = new List <WAV>(); pl = new Polyline(); timeLine = new Line(); posX = 1; blockWidth = 4; render = RenderWAV.Bars; }
public MainWindow() { InitializeComponent(); wavs = new List<WAV>(); pl = new Polyline(); timeLine = new Line(); posX = 1; blockWidth = 4; render = RenderWAV.Bars; }
//Choisir un rendu pour le canvas private void Render_Click(object sender, RoutedEventArgs e) { var currentItem = e.OriginalSource as MenuItem; if (currentItem.IsCheckable && currentItem.Tag != null) { var items = GetGroupItems(currentItem); if (items != null) { for (int i = 0; i < items.Count; i++) { if (items[i] != currentItem) { items[i].IsChecked = false; } else { switch (i) { case 0: render = RenderWAV.Bars; break; case 1: render = RenderWAV.Fill; break; case 2: render = RenderWAV.Largers; break; case 3: render = RenderWAV.Line; break; } if (!currentItem.IsChecked) { currentItem.IsChecked = true; } } } } } if (wav != null) { DrawSignal(); } }
//Choisir un rendu pour le canvas private void Render_Click(object sender, RoutedEventArgs e) { var currentItem = e.OriginalSource as MenuItem; if (currentItem.IsCheckable && currentItem.Tag != null) { var items = GetGroupItems(currentItem); if (items != null) { for (int i = 0; i < items.Count; i++) { if (items[i] != currentItem) { items[i].IsChecked = false; } else { switch (i) { case 0: render = RenderWAV.Bars; break; case 1: render = RenderWAV.Fill; break; case 2: render = RenderWAV.Largers; break; case 3: render = RenderWAV.Line; break; } if (!currentItem.IsChecked) currentItem.IsChecked = true; } } } } if (wav != null) DrawSignal(); }