示例#1
0
        public MainWindow()
        {
            InitializeComponent();

            wavs     = new List <WAV>();
            pl       = new Polyline();
            timeLine = new Line();

            posX       = 1;
            blockWidth = 4;
            render     = RenderWAV.Bars;
        }
示例#2
0
        public MainWindow()
        {
            InitializeComponent();

            wavs = new List<WAV>();
            pl = new Polyline();
            timeLine = new Line();

            posX = 1;
            blockWidth = 4;
            render = RenderWAV.Bars;
        }
示例#3
0
        //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();
            }
        }
示例#4
0
        //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();
        }