コード例 #1
0
 public static void ProccesAsync()
 {
     MainGateClient mainGate = new MainGateClient(new InstanceContext(new DummyListener()));
     /*System.IO.DirectoryInfo dir= new System.IO.DirectoryInfo(@"..\..\..\..\..");
     Console.WriteLine("{0}", dir.FullName);
     Console.ReadLine();*/
     PldParser pldParser = new PldParser(@"..\..\..\..\..\Emulators\Data\pldx\C1_01.10.2011.pldx");
     for (;;)
     {
         foreach (Fusion fusion in pldParser.Fusions)
         {
             foreach (TrendPoint point in fusion.Points)
             {
                 mainGate.PushEvent(new OffGasEvent(point.H2,point.O2,point.CO,point.CO2,point.N2,point.Ar));
                 Console.WriteLine("{0}", string.Format("H2={0} O2={1} CO={2} CO2={3} N2={4} Ar={5} send",
                           point.H2,point.O2,point.CO,point.CO2,point.N2,point.Ar));
                 System.Threading.Thread.Sleep(200);
             }
         }
     }
 }
コード例 #2
0
 private void открытьФайлToolStripMenuItem_Click(object sender, EventArgs e)
 {
     OpenFileDialog ofd = new OpenFileDialog();
     if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         pldParser = new PldParser(ofd.FileName);
         ShowFusion(pldParser.Fusions.ElementAt<Fusion>(currentFusionIndex));
     }
 }