Ejemplo n.º 1
0
        private void treeList1_DoubleClick(object sender, EventArgs e)
        {
            if (FocusedObject == null)
            {
                return;
            }
            if (FocusedObject.ParentID == "0")
            {
                return;
            }

            string path = Application.StartupPath + "\\BlogData";

            if (!Directory.Exists(path))
            {
                Directory.CreateDirectory(path);
            }

            RtfAttachFiles raf      = Services.BaseService.GetOneByKey <RtfAttachFiles>(FocusedObject.UID);
            string         filepath = path + "\\" + raf.FileName;

            FrmCommon.getDoc(raf.FileByte, filepath);


            WaitDialogForm wait = new WaitDialogForm("", "正在下载数据, 请稍候...");

            try
            {
                System.Diagnostics.Process.Start(filepath);
            }
            catch { System.Diagnostics.Process.Start(path); }
            wait.Close();
        }
Ejemplo n.º 2
0
        private void gridView_DoubleClick(object sender, EventArgs e)
        {
            if (FocusedObject == null)
            {
                return;
            }


            string path = Application.StartupPath + "\\BlogData";

            if (!Directory.Exists(path))
            {
                Directory.CreateDirectory(path);
            }

            RtfAttachFiles raf      = Services.BaseService.GetOneByKey <RtfAttachFiles>(FocusedObject.UID);
            string         filepath = path + "\\" + raf.FileName;

            FrmCommon.getDoc(raf.FileByte, filepath);


            WaitDialogForm wait = new WaitDialogForm("", "正在下载数据, 请稍候...");

            try
            {
                System.Diagnostics.Process.Start(filepath);
            }
            catch { System.Diagnostics.Process.Start(path); }
            wait.Close();

            // 判断"双击允许修改"标志
            //////if (!AllowUpdate)
            //////{
            //////    return;
            //////}

            ////////如果鼠标点击在单元格中,则编辑焦点对象。
            //////Point point = this.gridControl.PointToClient(Control.MousePosition);
            //////if (GridHelper.HitCell(this.gridView, point))
            //////{
            //////    UpdateObject();
            //////}
        }