}//Английский //public event PropertyChangedEventHandler PropertyChanged; //public void OnPropertyChanged([CallerMemberName]string prop = "") //{ // if (PropertyChanged != null) // PropertyChanged(this, new PropertyChangedEventArgs(prop)); //} private void timerTick(object sender, EventArgs e) { deltime = (500d / Tsteps) * Tstep++; CosPoint.Add(new DataPoint(Tstep, cos.CalcAcceleration(500, deltime, 500) * 10000)); SinPoint.Add(new DataPoint(Tstep, sin.CalcAcceleration(500, deltime, 500) * 10000)); LinearPoint.Add(new DataPoint(Tstep, linear.CalcAcceleration(500, deltime, 500) * 10000)); ConstPoint.Add(new DataPoint(Tstep, const_.CalcAcceleration(500, deltime, 500) * 10000)); if (Tsteps == Tstep) { timer.Stop(); } }
private void ReadFileIntoArray(string filename, FHash[] fpMap) { try { ConstPoint[] constMap = new ConstPoint[100000]; byte[] midiFile = File.ReadAllBytes(filename); int[] midiData = new int[midiFile.Length]; ConvertBytesToIntegers(midiFile, midiData); textBox2.Text = ("Processing... 50%"); MakeConstellationMap(midiData, constMap); textBox2.Text = ("Processing... 75%"); MakeFingerprints(constMap, fpMap); textBox2.Text = ("Processing done"); } catch (FileNotFoundException) { textBox2.Text = ("Please enter the name of a Midi file that exists\nFile:"); string nfilename = Console.ReadLine(); ReadFileIntoArray(nfilename, fpMap); } }