public SongMatcher(MainForm main, Database.DatabaseAdapter adapter) { InitializeComponent(); tracks = null; lowGroup = medGroup = highGroup = null; lowGroupIndices = medGroupIndices = highGroupIndices = null; historyMap = null; historyQueue = new Queue <int>(); Matching = false; this.playerForm = main; this.dbAdapter = adapter; this.currTrackIndex = -1; sp = new SignalProcessor(); kp = new KeyboardProcessor(); kp.onDataReady += onKeyboardDataReady; mp = new MouseProcessor(); mp.onDataReady += onMouseDataReady; //to get raw x/y points set mean values to 0 mp.MeanValueX = 0; mp.MeanValueY = 0; mouseXRecordings = new Queue <short[]>(); mouseYRecordings = new Queue <short[]>(); keyboardRecordings = new Queue <short[]>(); mkTrackBar.ValueChanged += trackBarValuesChanged; this.hide(); MatcherVisible = false; this.TopMost = true; main.onSongComplete += onSongComplete; prevAction = ""; rnd = new Random(); actionChangedStopWatch = new Stopwatch(); }
public Grapher(MainForm main) { this.mainForm = main; InitializeComponent(); t = null; chart1.Series.Add("wave"); chart1.Series["wave"].ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.FastLine; chart1.Series["wave"].ChartArea = "ChartArea1"; kp = new KeyboardProcessor(); kp.onDataReady += onKeyboardDataReady; mp = new MouseProcessor(); mp.onDataReady += onMouseDataReady; sp = new SignalProcessor(); sp.onBPMReady += onBPMReady; mouseXYComboBox.Items.Add("X"); mouseXYComboBox.Items.Add("Y"); drawThread = null; this.hide(); GrapherVisible = false; }