public Bezcontrol(Bez bez, int x, int y, int w, int h) { this.bez = bez; controls.Add(this); this.Size = new Size(w - 6, h); this.Location = new Point(x + 3, y); this.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; Label lbl = new Label(); lbl.Text = bez.name; lbl.AutoSize = false; lbl.Location = new Point(5, 0); lbl.Size = new Size(95, h); lbl.TextAlign = ContentAlignment.MiddleCenter; lbl.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Bottom; this.panel = new PictureBox(); this.panel.Location = new Point(100, 0); this.panel.Size = new Size(w - 106 - 20, h); this.panel.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Bottom; this.panel.Paint += new PaintEventHandler(panel_Paint); this.panel.MouseMove += new MouseEventHandler(panel_MouseMove); this.panel.MouseDown += new MouseEventHandler(panel_MouseDown); this.panel.MouseUp += new MouseEventHandler(panel_MouseUp); this.Controls.Add(lbl); this.Controls.Add(this.panel); bbg = new SolidBrush(Color.FromArgb(0xFF, 0, 30, 66)); bwhite = new SolidBrush(Color.White); bred = new SolidBrush(Color.Red); blime = new SolidBrush(Color.Lime); bblue = new SolidBrush(Color.Blue); pgraph = new Pen(Color.FromArgb(0xFF, 254, 228, 151)); drawtobuffer(); }
static void Main() { all.Widescreen = true; CultureInfo customCulture = (CultureInfo)Thread.CurrentThread.CurrentCulture.Clone(); customCulture.NumberFormat.NumberDecimalSeparator = "."; Thread.CurrentThread.CurrentCulture = customCulture; try { Bez.init(); } catch (Exception e) { MessageBox.Show("Invalid bez.txt or wrong working directory"); throw e; } harr.read(); fft = new FFT(); zs = new List <Z>(); font = new Font(); eq_init(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new opts()); //new form(); if (opts.export) { export(false); } }