public SpectrumVisorForm() : base() { //инициализация состояния state = new ApplicationModel(); //корректировка размеров Width = ClientRectangle.Width; Height = ClientRectangle.Height; //создание панелей signalPanel = new SignalPanel(state); spectrumPanel = new SpectrumPanel(state.Transform); //добавление панелей Controls.Add(signalPanel); Controls.Add(spectrumPanel); Load += (sender, ev) => OnSizeChanged(EventArgs.Empty); SizeChanged += (sender, ev) => { signalPanel.Size = new Size(Width * 40 / 100, Height - 100); spectrumPanel.SetBounds(Width * 45 / 100, 0, Width / 2, Height - 100); }; }
public SpectrumVisorForm() : base() { Width = 1000; Height = 800; var signal = new SignalManager(10, 1024); signal.AddSignalBySize(0, 1024, 0, 1.0 / 256, 10, 0, 0); //signal.AddSignalBySize(0, 1024, 0, 1.0 / 64, 5, 0, 0); //signal.AddSignalBySize(0, 1024, 0, 1.0 / 32, 1, 5, 0); var transform = new TransformManager(new WindowedFourier(128), signal); signalPanel = new SignalPanel(signal); signalPanel.MaximumSize = new Size(400, 600); spectrumPanel = new SpectrumPanel(signal, transform); Controls.Add(signalPanel); Controls.Add(spectrumPanel); Load += (sender, ev) => OnSizeChanged(EventArgs.Empty); SizeChanged += (sender, ev) => { signalPanel.Size = new Size(Width * 40 / 100, Height - 100); spectrumPanel.SetBounds(Width * 45 / 100, 0, Width / 2, Height - 100); }; }