예제 #1
0
        private void bSaveProgram_Click(object sender, EventArgs e)
        {
            this.Flow.NzUsed.Clear();
            this.Flow.NzOffset.Clear();
            this.Flow.NzUOffset.Clear();
            this.Flow.NzUsed.Add(Nozzle.Nz1, this.bUsedNz1.Checked);
            this.Flow.NzUsed.Add(Nozzle.Nz2, this.bUsedNz2.Checked);
            this.Flow.NzUsed.Add(Nozzle.Nz3, this.bUsedNz3.Checked);
            this.Flow.NzUsed.Add(Nozzle.Nz4, this.bUsedNz4.Checked);
            this.Flow.NzOffset.Add(Nozzle.Nz1, new PointF((float)this.nz1OffsetX.Value,
                                                          (float)this.nz1OffsetY.Value));
            this.Flow.NzOffset.Add(Nozzle.Nz2, new PointF((float)this.nz2OffsetX.Value,
                                                          (float)this.nz2OffsetY.Value));
            this.Flow.NzOffset.Add(Nozzle.Nz3, new PointF((float)this.nz3OffsetX.Value,
                                                          (float)this.nz3OffsetY.Value));
            this.Flow.NzOffset.Add(Nozzle.Nz4, new PointF((float)this.nz4OffsetX.Value,
                                                          (float)this.nz4OffsetY.Value));

            this.Flow.NzUOffset.Add(Nozzle.Nz1, (double)this.nz1ROffset.Value);
            this.Flow.NzUOffset.Add(Nozzle.Nz2, (double)this.nz2ROffset.Value);
            this.Flow.NzUOffset.Add(Nozzle.Nz3, (double)this.nz3ROffset.Value);
            this.Flow.NzUOffset.Add(Nozzle.Nz4, (double)this.nz4ROffset.Value);

            if (ProgramFlow.Save(this.Flow))
            {
                MessageBox.Show("保存成功!!");
            }
            else
            {
                MessageBox.Show("保存失敗!!");
            }
        }
예제 #2
0
 private void bUpdateToFlow_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show($"是否保存程式? Y/N", "警告", MessageBoxButtons.YesNo) == DialogResult.Yes)
     {
         if (ProgramFlow.Save(this.Flow))
         {
             MessageBox.Show("检验保存成功,请清理重新导入程式!!!");
         }
     }
 }
예제 #3
0
        public override void Execute()
        {
            ProgramFlow flow = new ProgramFlow(TestName, SourceDirectory)
            {
                CanAssemblyMetadata = false
            };

            flow.Combine(program);

            string filename = flow.Save();

            OpenEditor(filename);
        }