Esempio n. 1
0
 //-------------------------------------------------
 public void Init(int lc = 12, int fc = 72)
 {
     if (lc < 6)
     {
         lc = 6;
     }
     Array.Resize(ref m_data, lc);
     for (int i = 0; i < lc; i++)
     {
         char s = ((char)((int)'A' + i));
         m_data[i] = new TS_CellLayer(fc, "" + s);
     }
     m_LayerCount = m_data.Length;
     m_FrameCount = m_data[0].FrameCount;
 }
Esempio n. 2
0
 //----------------------------------------------------------
 public void SetLayerCount(int lc)
 {
     if (lc < 6)
     {
         lc = 6;
     }
     if (m_LayerCount != lc)
     {
         int fc = m_FrameCount;
         if (lc < 6)
         {
             lc = 6;
         }
         int l2 = m_LayerCount;
         int l3 = lc - l2;
         Array.Resize(ref m_data, lc);
         if (l3 > 0)
         {
             for (int i = l2; i < lc; i++)
             {
                 char c = 'A';
                 if (i > 0)
                 {
                     string s = m_data[i - 1].Caption;
                     if (s != "")
                     {
                         c = (char)((int)s[0] + 1);
                     }
                 }
                 m_data[i] = new TS_CellLayer(fc, c + "");
             }
         }
         m_LayerCount = lc;
         OnChangeLayerEvent(new EventArgs());
     }
 }