public Computing()
        {
            Result = new Moment(0);
            //Tmr = new Timer(3000);
            //Tmr.AutoReset = true;
            //Tmr.Elapsed += Tmr_Elapsed;

            InpFileName = @"D:\ballistics\ballisticwpf\config.txt";
            OutFileName = @"D:\ballistics\ballisticwpf\result.txt";

            //string InpFileName = @"C:\Users\Andrey\Documents\Visual Studio 2015\Projects\ballistics\ballisticwpf\config.txt";
            //string OutFileName = @"C:\Users\Andrey\Documents\Visual Studio 2015\Projects\ballistics\ballisticwpf\result.txt";
            Config = new Configuration(0);
            Config.ReadConfugurationFromFile(InpFileName);

            bool ExistFlag = File.Exists(OutFileName);
            if (ExistFlag)
            {
                File.Delete(OutFileName);
            }

            Positions = new PointCollection();
            Positions.Add(new Point(0, 0));

            Chart = new Polyline();
            Chart.Points = Positions;

            //BgrWork = ((BackgroundWorker)this.FindResource("bgrWork"));
            //ComplexArg = new ComplexForAsyns(Config);
        }
Exemple #2
0
 public Moment(Moment arg)
 {
     CurrentTime = arg.CurrentTime;
     CurrentX = arg.CurrentX;
     CurrentY = arg.CurrentY;
     CurrentSpeed = arg.CurrentSpeed;
     CurrentSpeedX = arg.CurrentSpeedX;
     CurrentSpeedY = arg.CurrentSpeedY;
 }
        public void UpdateWindow(Moment Result)
        {
            textBlockOutX.Text = Result.CurrentX.ToString();
            textBlockOutZ.Text = Result.CurrentZ.ToString();
            textBlockOutSpeedZ.Text = Result.CurrentSpeedZ.ToString();

            UpdateLayout();
        }