Example #1
0
        private void listView_browse_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (this.listView_browse.SelectedItems.Count == 1)
            {
                ListViewItem item    = this.listView_browse.SelectedItems[0];
                int          nLineNo = this.listView_browse.SelectedIndices[0] + 1;
                if (item.ImageIndex == ITEMTYPE_OVERTHRESHOLD)
                {
                    if (item.Text == this.RecordPath)
                    {
                        this.label_message.Text = "序号 " + nLineNo.ToString() + ": 发起查重的记录(自己)";
                    }
                    else
                    {
                        this.label_message.Text = "序号 " + nLineNo.ToString() + ": 重复的记录";
                    }
                }
                else
                {
                    this.label_message.Text = "序号 " + nLineNo.ToString();
                }
            }
            else
            {
                this.label_message.Text = "";
            }

            // 装入(未装入的)浏览列
            if (this.listView_browse.SelectedItems.Count > 0)
            {
                List <string>       pathlist = new List <string>();
                List <ListViewItem> itemlist = new List <ListViewItem>();
                foreach (ListViewItem item in this.listView_browse.SelectedItems)
                {
                    string strFirstCol = ListViewUtil.GetItemText(item, 2);
                    if (string.IsNullOrEmpty(strFirstCol) == false)
                    {
                        continue;
                    }
                    pathlist.Add(item.Text);
                    itemlist.Add(item);
                }

                if (pathlist.Count > 0)
                {
                    string strError = "";
                    int    nRet     = GetBrowseCols(pathlist,
                                                    itemlist,
                                                    out strError);
                    if (nRet == -1)
                    {
                        MessageBox.Show(this, strError);
                    }
                }
            }

            ListViewUtil.OnSelectedIndexChanged(this.listView_browse,
                                                0,
                                                null);
        }
Example #2
0
        private void listView_browse_SelectedIndexChanged(object sender, EventArgs e)
        {
            ListViewUtil.OnSelectedIndexChanged(this.listView_browse,
                                                0,
                                                null);

            if (this.listView_browse.SelectedItems.Count == 1)
            {
                this.SelectedRecPath = ListViewUtil.GetItemText(this.listView_browse.SelectedItems[0], 0);
                ItemTag tag = (ItemTag)this.listView_browse.SelectedItems[0].Tag;
                if (tag != null)
                {
                    this.SelectedTimestamp = tag.Timestamp;
                }
                else
                {
                    this.SelectedTimestamp = null;
                }

                DisplaySelectedRecord(this.listView_browse.SelectedItems[0]);
            }
            else
            {
                this.SelectedRecPath   = "";
                this.SelectedTimestamp = null;

                // Global.ClearHtmlPage(this.webBrowser1, this.TempDir);
                DisplaySelectedRecord(null);
            }
        }
Example #3
0
        private void listView_records_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (this.listView_records.SelectedItems.Count > 0)
            {
                this.button_OK.Enabled = true;
            }
            else
            {
                this.button_OK.Enabled = false;
            }

            ListViewUtil.OnSelectedIndexChanged(this.listView_records,
                                                0,
                                                null);
        }