Exemple #1
0
        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;
        }
Exemple #2
0
        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;
        }
Exemple #3
0
 public void Plot(HpglFile hpgl)
 {
     m_hpgl = hpgl;
     Invalidate();
 }