Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
        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);
            }

        }
Ejemplo n.º 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;
        }
Ejemplo n.º 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();
            }
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 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;
        }