//------------------------------------------------------- public string MakeScriptLayer( ) { if (tsg == null) { return(string.Empty); } string ret = ScriptLoad(m_ScriptLayerPath); if (ret == "") { ret = AE_RemapExceed.Properties.Resources.ScriptLayer; } string oName = "RX"; Regex r = new Regex("<RX>", RegexOptions.IgnoreCase); ret = r.Replace(ret, oName); r = new Regex("<frameCount>", RegexOptions.IgnoreCase); ret = r.Replace(ret, tsd.FrameCount.ToString()); r = new Regex("<frameRate>", RegexOptions.IgnoreCase); ret = r.Replace(ret, ((int)tsd.FrameRate).ToString()); r = new Regex("<caption>", RegexOptions.IgnoreCase); ret = r.Replace(ret, "\"" + tsd.CellCaption(tsg.sel.Index) + "\""); string cellData = ""; string lineHead = "\t" + oName + ".setKeyData("; string lineFoot = ");\n"; int[] c = tsd.GetCellDataTrue(tsg.sel.Index); if (c.Length > 0) { cellData += lineHead + "0," + c[0].ToString() + lineFoot; for (int j = 1; j < c.Length; j++) { if (c[j - 1] != c[j]) { cellData += lineHead + j.ToString() + "," + c[j].ToString() + lineFoot; } } } r = new Regex("<cellData>", RegexOptions.IgnoreCase); ret = r.Replace(ret, cellData); return(ret); }
//****************************************************** private bool GetData() { if (chkFps() == false) { return(false); } m_FrameCount = 0; if (m_IsFrameEnabled == true) { m_FrameCount = tsd.FrameCountTrue; } else { m_FrameCount = tsd.FrameCount; } m_Sheet3 = (tsd.PageSec == TSPageSec.sec3); m_PageFrame = ((int)tsd.PageSec * (int)tsd.FrameRate); m_PageFrameH = m_PageFrame / 2; int p = (m_FrameCount / m_PageFrame); if ((m_FrameCount % m_PageFrame) > 0) { p++; } m_PageCount = p; m_LastCount = m_FrameCount % (int)tsd.FrameRate; m_CellCount = tsd.CellCount; if (m_Sheet3) { if (m_CellCount > CellCount3) { MessageBox.Show("すみません。3秒シートでは、セルレイヤは、" + CellCount3.ToString() + "枚までしか印刷されません。"); m_CellCount = CellCount3; } } else { if (m_CellCount > CellCount) { MessageBox.Show("すみません。6秒シートでは、セルレイヤは、" + CellCount.ToString() + "枚までしか印刷されません。"); m_CellCount = CellCount; } } Array.Resize(ref m_data, m_CellCount); for (int i = 0; i < m_CellCount; i++) { Array.Resize(ref m_data[i], m_FrameCount); int[] cd; if (m_IsFrameEnabled == true) { cd = tsd.GetCellDataTrue(i); } else { cd = tsd.GetCellData(i); } for (int j = 0; j < m_FrameCount; j++) { m_data[i][j] = cd[j]; } } if (m_memo.Length != m_FrameCount) { Array.Resize(ref m_memo, m_FrameCount); } GetPrintSize(); return(true); }