示例#1
0
        private void SetImageInfo()
        {
            CoreImageInfo info = m_group.images[m_index];

            m_fileSizeLabel.Text  = info.GetFileSizeString();
            m_imageSizeLabel.Text = string.Format("{0}×{1}", info.width, info.height);
            m_imageTypeLabel.Text = (info.type == CoreDll.ImageType.None ? "   " : info.GetImageTypeString());
            m_fileNameLabel.Text  = Path.GetFileNameWithoutExtension(info.path);

            bool[] selected = m_core.GetSelection(m_group.id, (uint)m_index, 1);
            m_checkBox.Checked = selected[0];
        }
示例#2
0
        private void UpdateRows()
        {
            if (m_results.Length == 0)
            {
                Rows.Clear();
                RowCount = 1;
                SetCurrentRow(0);
            }
            else
            {
                if (m_results.Length < RowCount - 1000)//rows are removed very slowly!!!
                {
                    Rows.Clear();
                }
                RowCount = m_results.Length;

                bool[] selection = m_core.GetSelection(0, (uint)m_results.Length);

                for (int i = 0; i < Rows.Count; i++)
                {
                    DataGridViewCustomRow row = (DataGridViewCustomRow)Rows[i];
                    row.updated = false;
                    if (selection != null)
                    {
                        row.selected = selection[i];
                    }
                }
                int current = m_core.GetCurrent();
                if (current != -1)
                {
                    SetCurrentRow(current);
                }
                else
                {
                    SetCurrentRow(0);
                    SetRowSelection(0, 1, true);
                }
            }
        }