public bool SendSectionInfo(ref BProfileSection[] sections) { try { if (!Connected()) { MessageBox.Show(this, "Error, no connection to game"); return(false); } MemoryStream memStream = new MemoryStream(); ArrayList ids = new ArrayList(); ArrayList values = new ArrayList(); for (int j = 0; j < mNumSections; j++) { BProfileSection section = sections[j]; ids.Add((int)section.mID); values.Add((section.mEnabled)?(byte)1:(byte)0); } TimelineControlPacket timeControl = new TimelineControlPacket(memStream, TimelineControlPacket.TimelineControlValues.cConfigureSections, ids, values); mActiveClient.write(memStream); return(true); } catch (System.Exception ex) { ErrorHandler.Error(ex.ToString()); //todo: log this error MessageBox.Show(this, "Error Sending Message: " + ex.ToString()); return(false); } }