Esempio n. 1
0
        void menuKeyWord_Click(object sender, EventArgs e)
        {
            if (fileListView.SelectedItems.Count == 0)
            {
                MessageBox.Show("请选择文件!", "文档管理系统", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                return;
            }

            try
            {
                KeyWdForm keyword = new KeyWdForm();
                keyword.Closed += new EventHandler(keyword_Closed);
                keyword.ShowDialog();
            }
            catch (Exception ex)
            {
                MessageBox.Show("系统错误:" + ex.Message, "文档管理系统", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Esempio n. 2
0
        void keyword_Closed(object sender, EventArgs e)
        {
            KeyWdForm keyWd = (KeyWdForm)sender;

            if (keyWd.DialogResult != DialogResult.OK)
            {
                return;
            }

            try
            {
                foreach (ListViewItem item in fileListView.SelectedItems)
                {
                    _currentUser.KeyWordChange((int)item.Tag, keyWd.KeyWord);
                    LoadFiles();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("系统错误:" + ex.Message, "文档管理系统", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }