Drop a virtual file to a FileDrop receiving target - c#

I have an sftp client, and would like to drag virtual files from my listview (actually ObjectListView) to desktop, or other target accepting drop file. I can drag files from desktop to my listview and then upload it.
The file being dropped is not present on the local filesystem, at the time of drag/drop.
I am not too familiar with drag/drop, so if anyone has any resources related to this, please post them.
Most related drag/drop questions doesn't answer my specific question as far as I looked.

Look for my answer to this question: Drag and drop virtual files using IStream. I must say, that task you want to implement is not easy to do, and (from what I know) there is no simple, working solution on the net for this.
But I've implemented such task by myself in .net, so it is possible of course. You can find all necessary details in the link above.

Related

BLOB file to display via a GUI

This is more of a, "hey, any ideas on how to go about doing this?", type of question.
So,
I'm working on a READ-ONLY GUI in Visual Studios, that loads data from an Oracle database. -- I am currently stumped on how to go about doing something: Loading an BLOB file from the oracle database and having it display via the GUI, so that the person reading it would be able to download said file by clicking a logo or text field or whatever works really. The person wouldn't be the ones uploading files; they should just be able to download them from what the GUI is pulling from the database.
Keep in mind, this file should not be limited to a single file type, should be able to upload .pdf, .txt, .wordx, .png, etc)... from Oracle, into Visual Studio.
I'm not sure which tool to use, nor the best way to go about this.
Tried looking it up, haven't really found any examples worth-mentioning or ideas pertaining to loading FROM Oracle into displaying for C#.
Any examples or ideas would be much appreciated.
SQL Developer offers this feature - via Java. You asked about tools...

making a TreeView of our own file explorer

I'm trying to get a file explorer on c# and I have found nothing about this. Is c# provide a file explorer already ready to work?
If not, is TreeView a good idea to create mine? Have you got some link to perform this?
Thanks in advance for these informations.
C# Doesn't provide file explorer tree as it is, but if you want to create a dialog for selecting the folder you can use FolderBrowserDialog(full dialog for folder selection)
However if you want to create one, yes, It is easy to do it with WPF TreeView.
As a hint
Take TreeView, write HiearchyDataProvider which provides files and folders and templates for each node to display icons and so on
P.S.
Simple google search shows a lot of ready-samples

Set Default Directory for Lotus Notes File Upload Control

I have a lotus notes web form in which computer-illiterate customers will use to attach Excel files and submit them to our company. I am using a Lotus Notes File Upload Control to allow them to do this, however, I need to default this File Upload Control to a certain directory location. I have already created a C# application the customers will be using, which places all of these excel files in a certain directory location, hence the reason I need to focus this File Upload Control. Unfortunately, some of the customers are computer challenged enough to not know how to navigate to these files on their own. Is this possible at all?
I'm assuming the users will be visiting a web page with the File Upload control, yes? If I'm misunderstanding please let me know and I'll delete this answer.
The simple answer is it isn't possible. The problem is that the browser can't know anything about the file structure of the clients that visit the site, so a "default path" property doesn't really make sense. It would likely only work in very specific environments (which is maybe true in your case, but not across the web in general)
I would investigate using the Notes API to have the C# program handle the upload without involving the browser client use of the file upload control. I don't know enough Java to be sure, but perhaps that might also be an option -- basically writing your own custom upload control that only asks the user for the filename.
You may also be seriously underestimating the ability of the users to follow directions. If your page identifies which directory the file will be found in, I expect most users will be able to follow the directions and upload from the correct directory.
So, I'm sure that accomplishing what you want to accomplish is possible in Notes, just not as simply as adding a default directory to the File Upload Control.

C# Google Docs. How to check if a user is currently editing the document?

For my project i need to sync a bunch of XLS files between a SQL server and Google docs (both ways).
When a user is editing a document, this document needs to be skipped and added to a queue. This is all not a problem, but i am unable to find anything about it in the documentation.
Does anyone know something more about this?
So any help is greatly appreciated :D
As of March 2016, Google has not provided any "current users" API.
A work-around based on using an Add-on's onOpen() trigger to note users who have opened a spreadsheet is discussed in the Google Docs Help Forum. That approach could be adopted for documents as well, with a suitable place to store information about who has opened the document. (In your case, a table on the SQL server may suffice.) You'd also need to devise a way to determine when a user is no longer editing - and there is no built-in "onClose()" trigger to help with that. (It's the cloud, so the whole idea of "open" is imprecise.)
Ultimately - I don't think it matters whether a user is currently editing a document. All their edits are being made on their own copy, which is being synchronized with a master copy. Your service would in turn be given its own copy, which you'd presumably snapshot for archival / synchronization with your SQL server.

.NET Windows Explorer extension to browse a file like .zip?

I made a browser program for a archive type with the .mpq extension, which is highly used in Blizzard games.
It is like an explorer but only explores files inside MPQ archives.
Now, we all know how Windows Explorer browses .zip archives and I'd love to make it open the .MPQ files with so many rich features.
Is this even possible? So it is possible...
If so, then how? Shell Folder...
Can someone please point me to an example? (C#) I can't just translate C++ to C#...
This is done via extending the shell classes. You'll need to implement the Basic Folder Object Interfaces to accomplish this.
Although it is a C++ framework, there is a framework that implements exactly what you want, and that I have adapted with success for a similar file format:
TarFolder (by the guy who developed GMail Drive).
You may also be interested in EZNamespaceExtension.Net, even if they do not support extension-based rooting (a workaround is to use URLs with specific protocols).
Finally, check out WindowsShell: it might be exactly what you are looking for !
Sorry for coming so late after the storm...

Categories