示例#1
0
文件: DupDlg.cs 项目: renyh1013/dp2
        private void listView_browse_DoubleClick(object sender, System.EventArgs e)
        {
            if (this.OpenDetail == null)
                return;

            string[] paths = BrowseList.GetSelectedRecordPaths(this.listView_browse, true);

            if (paths.Length == 0)
                return;
            /*
            string [] paths = new string [this.listView_browse.SelectedItems.Count];
            for(int i=0;i<this.listView_browse.SelectedItems.Count;i++)
            {
                string strPath = this.listView_browse.SelectedItems[i].Text;

                // paths[i] = this.textBox_serverUrl.Text + "?" + strPath;
                paths[i] = ResPath.GetRegularRecordPath(strPath);

            }
            */

            OpenDetailEventArgs args = new OpenDetailEventArgs();
            args.Paths = paths;
            args.OpenNew = true;

            this.listView_browse.Enabled = false;
            this.OpenDetail(this, args);
            this.listView_browse.Enabled = true;
        }
示例#2
0
文件: MainForm.cs 项目: renyh1013/dp2
        public void OpenDetailCallBack(object sender, OpenDetailEventArgs e)
        {
            // ZhongcihaoDlg dlg = (ZhongcihaoDlg)sender;

            for (int i = 0; i < e.Paths.Length; i++)
            {
                DetailForm child = null;

                if (!(Control.ModifierKeys == Keys.Control))
                    child = this.TopDetailForm;

                if (child == null)
                {
                    child = new DetailForm();
                    child.MdiParent = this;
                    child.Show();
                }
                else
                {
                    child.Activate();
                }


                child.LoadRecord(e.Paths[i], null);
            }

        }
示例#3
0
        void OnLoadDetail()
        {
            if (this.OpenDetail == null)
                return;

            if (this.listView_records.SelectedItems.Count == 0)
                return;

            string[] paths = new string[this.listView_records.SelectedItems.Count];
            for (int i = 0; i < this.listView_records.SelectedItems.Count; i++)
            {
                string strPath = this.listView_records.SelectedItems[i].Text;

                paths[i] = ResPath.GetRegularRecordPath(strPath);

            }

            OpenDetailEventArgs args = new OpenDetailEventArgs();
            args.Paths = paths;
            args.OpenNew = true;

            this.listView_records.Enabled = false;
            this.OpenDetail(this, args);
            this.listView_records.Enabled = true;
        }
示例#4
0
        /// <summary>
        /// 装入第一条记录到详细窗
        /// </summary>
        /// <param name="bCloseWindow"></param>
        public void LoadFirstDetail(bool bCloseWindow)
        {
            if (this.listView_records.Items.Count == 0)
                return;

            string[] paths = new string[1];
            paths[0] = ResPath.GetRegularRecordPath(this.listView_records.Items[0].Text);

            OpenDetailEventArgs args = new OpenDetailEventArgs();
            args.Paths = paths;
            args.OpenNew = false;

            this.listView_records.Enabled = false;
            this.OpenDetail(this, args);
            this.listView_records.Enabled = true;

            if (bCloseWindow == true)
            {
                this.DialogResult = DialogResult.OK;
                this.Close();
            }
        }
示例#5
0
        // 装入详细记录
        void browseWindow_OpenDetail(object sender, OpenDetailEventArgs e)
        {
            if (e.Paths.Length == 0)
                return;

            ResPath respath = new ResPath(e.Paths[0]);

            string strError = "";
            int nRet = LoadBiblioRecord(
                respath.Path,
                out strError);
            if (nRet == -1)
                goto ERROR1;

            return;
        ERROR1:
            MessageBox.Show(this, strError);
            return;
        }
示例#6
0
        // 书目记录路径的标签双击
        private void label_biblioRecPath_DoubleClick(object sender, EventArgs e)
        {
            if (this.OpenDetail == null)
                return;

            string[] paths = new string[1];
            paths[0] = ServerUrl + "?" + BiblioRecPath;

            OpenDetailEventArgs args = new OpenDetailEventArgs();
            args.Paths = paths;
            args.OpenNew = true;

            this.label_biblioRecPath.Enabled = false;
            this.OpenDetail(this, args);
            this.label_biblioRecPath.Enabled = true;
        }