コード例 #1
0
        private void ProcessFile(string fileName)
        {
            string lastStatus;

            lastStatus = lblMode.Text;

            if (fileName == null)
            {
                return;
            }
            if (!System.IO.File.Exists(fileName))
            {
                lblStatus.Text = "File does not exist!";
                return;
            }
            lblMode.Text = "PROCESSING";
            MG_CS_BasicViewer.MotionBlocks.Clear();
            mProcessor.Init(mSetup.Machine);
            mProcessor.ProcessFile(fileName, MG_CS_BasicViewer.MotionBlocks);

            if (mViewer.BreakPoint > MG_CS_BasicViewer.MotionBlocks.Count - 1)
            {
                mViewer.BreakPoint = MG_CS_BasicViewer.MotionBlocks.Count - 1;
            }
            mViewer.GatherTools();
            Progress.Value = 0;
            lblMode.Text   = lastStatus;
        }
コード例 #2
0
        private void ProcessFile(string fileName)
        {
            if (fileName == null)
            {
                return;
            }
            MG_CS_BasicViewer.MotionBlocks.Clear();
            mProcessor.Init(mSetup.Machine);
            mProcessor.ProcessFile(fileName, MG_CS_BasicViewer.MotionBlocks);

            if (mViewer.BreakPoint > MG_CS_BasicViewer.MotionBlocks.Count - 1)
            {
                mViewer.BreakPoint = MG_CS_BasicViewer.MotionBlocks.Count - 1;
            }
            mViewer.GatherTools();
        }