コード例 #1
0
ファイル: Form1.eventLog.cs プロジェクト: hnjm/accounting-1
            public void addEvent(myCellEvent e, int rowindex, int colindex)
            {
                Debug.WriteLine("addEvent e {0} row {1} col {2}", e, rowindex, colindex);
                do
                {
                    if (rowindex != m_rowindex)
                    {
                        clear(); break;
                    }
                    if (colindex != m_colindex)
                    {
                        clear(); break;
                    }
                    if (e == m_data[m_cursor])
                    {
                        return;
                    }
                } while (false);

                m_rowindex = rowindex;
                m_colindex = colindex;

                if (m_count == 0)
                {
                    m_count   = 1;
                    m_cursor  = 0;
                    m_data[0] = e;
                }
                else
                {
                    m_count++;
                    m_cursor         = (m_cursor + 1) % m_data_size;
                    m_data[m_cursor] = e;
                }

                printData();
            }
コード例 #2
0
ファイル: Form1.eventLog.cs プロジェクト: hnjm/accounting-1
 public void addEvent(myCellEvent e)
 {
     addEvent(e, m_rowindex, m_colindex);
 }