//internal static clsAutoSync New(string chtfilepath) { //load chtfilepath // if (!File.Exists(chtfilepath)) return null; // List<string> lines = Utils.ReadLines(chtfilepath); // try { // if (lines.Count == 0) return null; //empty file // //if (lines[0] == "#Sections") { // if (lines[0].Trim().Contains(" ")) { //sections (2 integers) // return new clsAutoSyncSection(chtfilepath, lines); // //} else if (lines[0] == "#Bars") { // } else { //bars (1 integer) // return new clsAutoSyncBar(chtfilepath, lines); // } // //} else { // // return null; //invalid header on .cht file // //} // } // catch { //eg invalid .cht file // MessageBox.Show("Invalid or missing .cht file"); // return null; // } //} protected void BaseConstructor() //was internal clsAutoSync() { //called from load //if (P.F.CHPFilePath.Length == 0) return; //clsMTime.clsBBT maxbbt = new clsMTime.clsBBT(P.F.MaxTicks); //MaxBar = maxbbt.Bar; //MaxBeatMidi = maxbbt.Beats; //MaxBar = P.F.MaxBBT.Bar; { MaxBeatMidi = P.F.MaxBBT.Beats; int capacity = (int)P.frmStart.nudUndoRedoCapacity.Value; UndoStack = new LLStack <clsElapsed>(capacity); RedoStack = new LLStack <clsElapsed>(capacity); CurrentBBT = new clsMTime.clsBBT(StartBar, 0, 0); if (P.F.BarPaneBBTLo == null) { P.F.BarPaneBBTLo = new clsMTime.clsBBT(0); } if (P.F.BarPaneBBTHi == null) { P.F.BarPaneBBTHi = new clsMTime.clsBBT(0); } dStreamEnd = new delegStreamEnd(P.frmStart.StreamPlayOffAll); }
private void FinalizeStop() { indStop = true; clsFileStream.clsPlay.AllNotesOffStatic(BASSOut); dStreamEnd = new delegStreamEnd(P.frmStart.StreamPlayOffAll); P.frmSC.Invoke(dStreamEnd); if (P.F.frmTrackMap?.RecTrk != null) { FileStream.MergeRecStrm(); } P.frmPCKBIn?.Invoke(new clsSync.delegClosefrmPCKBIn(P.frmPCKBIn.Close)); }