public void SetInfo(HpglFile hpgl) { var info = new Info() { FileName = hpgl.FileName, Width = HpglUnit.PluToReadableString(hpgl.Width), Height = HpglUnit.PluToReadableString(hpgl.Height), PenDownLength = HpglUnit.PluToReadableString(hpgl.PenDownLength), PenUpLength = HpglUnit.PluToReadableString(hpgl.PenUpLength), }; propertyGrid1.SelectedObject = info; }
private void openToolStripMenuItem_Click(object sender, EventArgs e) { OpenFileDialog dlg = new OpenFileDialog() { Multiselect = false, Filter = "HPGL Files (*.hpg,*.plt)|*.hpg;*.plt|All files (*.*)|*.*" }; if (dlg.ShowDialog() != DialogResult.OK) { return; } base.Cursor = Cursors.WaitCursor; HpglFile hpgl = new HpglFile(dlg.FileName); errorList1.SetErrorList(hpgl.Errors); plotControl1.Plot(hpgl); plotInfoControl1.SetInfo(hpgl); base.Cursor = Cursors.Default; }
public void Plot(HpglFile hpgl) { m_hpgl = hpgl; Invalidate(); }