Ejemplo n.º 1
0
        public TransformViewChangeBox(TransformControler controller)
        {
            Items.Add(new BoxItem(ViewVersion.Round, "Окружность"));

            SelectedIndexChanged += (sender, ev) => {
                controller.SwitchView(((BoxItem)SelectedItem).Type);
            };
        }
Ejemplo n.º 2
0
        public SpectrumView(TransformControler transformer)
        {
            //кнопка изменения типа представления
            var changeBox = new TransformViewChangeBox(transformer);
            //панель представления преобразования
            var viewer = new TransformViewDisplay(transformer);

            //viewButton.Dock = DockStyle.Top;
            viewer.Dock = DockStyle.Fill;

            Controls.Add(changeBox);
            Controls.Add(viewer);
        }
Ejemplo n.º 3
0
        public SpectrumPanel(TransformControler transformer)
        {
            var view    = new SpectrumView(transformer);
            var options = new SpectrumOptionsPanel();

            Controls.Add(options);
            Controls.Add(view);

            SizeChanged += (sender, ev) =>
            {
                var chartSize = Math.Min(Width, Height * 70 / 100);
                view.Size = new Size(chartSize, chartSize);
                options.SetBounds(0, chartSize + 25, Width, Math.Max(250, Height / 4));
                Invalidate();
            };
        }
Ejemplo n.º 4
0
        public TransformViewDisplay(TransformControler controller)
        {
            transform = controller;

            viewers = new Dictionary <ViewVersion, ISpectrumViewer>
            {
                [ViewVersion.Round] = new RoundSpectrum(transform.View)
            };

            DoubleBuffered = true;

            transform.ViewChanged += () =>
            {
                Invalidate();
            };

            Paint += (sender, ev) =>
            {
                RedrawView(ev.Graphics);
            };

            Invalidate();
        }
Ejemplo n.º 5
0
 public ApplicationModel()
 {
     Signal    = new SignallController();
     Transform = new TransformControler(Signal);
 }