示例#1
0
		private void ToolBarInfo_Click() {
			ImageNodeId nodeId=(ImageNodeId)treeDocuments.SelectedNode.Tag;
			if(nodeId.NodeType==ImageNodeType.None) {
				return;
			}
			if(nodeId.NodeType==ImageNodeType.Mount) {
				FormMountEdit form=new FormMountEdit(MountSelected);
				form.ShowDialog();//Edits the MountSelected object directly and updates and changes to the database as well.
				FillDocList(true);//Refresh tree in case description for the mount changed.}
			}
			else if(nodeId.NodeType==ImageNodeType.Doc) {
				//The FormDocInfo object updates the DocSelected and stores the changes in the database as well.
				FormDocInfo formDocInfo2=new FormDocInfo(PatCur,DocSelected,GetCurrentFolderName(treeDocuments.SelectedNode));
				formDocInfo2.ShowDialog();
				if(formDocInfo2.DialogResult!=DialogResult.OK) {
					return;
				}
				FillDocList(true);
			}
		}
示例#2
0
		private void TreeDocuments_MouseDoubleClick(object sender,MouseEventArgs e) {
			TreeNode clickedNode=treeDocuments.GetNodeAt(e.Location);
			if(clickedNode==null) {
				return;
			}
			ImageNodeId nodeId=(ImageNodeId)clickedNode.Tag;
			if(nodeId.NodeType==ImageNodeType.None) {
				return;
			}
			if(nodeId.NodeType==ImageNodeType.Mount) {
				FormMountEdit fme=new FormMountEdit(MountSelected);
				fme.ShowDialog();//Edits the MountSelected object directly and updates and changes to the database as well.
				FillDocList(true);//Refresh tree in case description for the mount changed.
				return;
			}
			else if(nodeId.NodeType==ImageNodeType.Doc) {
				Document nodeDoc=Documents.GetByNum(nodeId.PriKey);
				string ext=ImageStore.GetExtension(nodeDoc);
				if(ext==".jpg" || ext==".jpeg" || ext==".gif") {
					return;
				}
				//We allow anything which ends with a different extention to be viewed in the windows fax viewer.
				//Specifically, multi-page faxes can be viewed more easily by one of our customers using the fax
				//viewer. On Unix systems, it is imagined that an equivalent viewer will launch to allow the image
				//to be viewed.
				try {
					Process.Start(ImageStore.GetFilePath(nodeDoc,PatFolder));
				}
				catch(Exception ex) {
					MessageBox.Show(ex.Message);
				}
			}
		}