| Plug-In Downloads Download plug-ins in here. |
 |
|
August 17th, 2008, 06:59 PM
|
#1 (permalink)
|
|
10 Farad - Flux Capacity
Join Date: Aug 2007
Location: Melbourne, Australia
Vehicle: Audi S3
Posts: 537
|
New File Added: File Manager
Downloads: A new file has been added by diablo_sv21:
File Manager
This plugin allows you to browse and maintain the files on your local disks. You can Cut (aka Move), Copy, and Delete Files/Folders at your leisure. Just as a warning, deleted files/folders are not sent to the recycle bin, they really are deleted! Be sure you know what you are doing before attempting to use this feature.
This plugin was created by request
I didn't include a manual so here are the basic instructions:
The plugin will begin initially in the C:\ Directory. If this is not appropriate, you can change it in the plugin settings.
Single clicking any file/folder will only select it, allowing you to choose cut/copy. Clicking 'Paste' will place the file/folder in the folder you are VIEWING. You will be prompted if you would like to overwrite existing files should they exist.
Double clicking a folder will go into that folder while double clicking a file will attempt to open that file with whatever your PC is set up to do. For example a JPG file might open up in Picture Viewer or something.
In the plugin settings you can also set the visibility of Hidden and System Files. By default these are both hidden. Only make them visible if you know what you are doing.
That about covers all the current features. If you have any requests don't hesitate to contact me, I'm always open to suggestions
|
|
|
|
The Following User Says Thank You to diablo_sv21 For This Useful Post:
|
|
August 19th, 2008, 04:12 AM
|
#2 (permalink)
|
|
10 Farad - Flux Capacity
Join Date: Aug 2007
Location: Melbourne, Australia
Vehicle: Audi S3
Posts: 537
|
File Manager has been updated!
|
|
|
August 19th, 2008, 02:34 PM
|
#3 (permalink)
|
|
Administrator
Join Date: Oct 2004
Location: Atlanta, GA
Posts: 5,012
|
there is another cool thing you could add... You can add support for launching files in your file browser directly into external applications loaded inside Centrafuse, this already works with attachments in email...
Basically inside LocalAppData\Centrafuse\Plugins\Email\appattachmen ts.xml you can assign external applications to extensions, this file is then read and the file you double click would be passed as a parameter to load the file inside Centrafuse... I will post relevant code below...
Code:
public static ExternalAppCollection externalApplications;
public static bool checkExtension(string ext)
{
bool retvalue = false;
try
{
for(int i=0;i<Email.externalApplications.Count;i++)
{
string[] extarray = Email.externalApplications[i].extensions.Split('|');
for(int a=0;a<extarray.Length;a++)
{
if(extarray[a].ToUpper().Trim() == ext.ToUpper().Trim())
{
retvalue = true;
break;
}
}
}
}
catch(Exception errmsg) { CFTools.writeError(errmsg.Message, errmsg.StackTrace); }
return retvalue;
}
private void loadApp(string ext, string filename)
{
try
{
for(int i=0;i<Email.externalApplications.Count;i++)
{
string[] extarray = Email.externalApplications[i].extensions.Split('|');
for(int a=0;a<extarray.Length;a++)
{
if(extarray[a].ToUpper().Trim() == ext.ToUpper().Trim())
{
this.CF_loadExternalApplication(Email.externalApplications[i].appdisplayname, Email.externalApplications[i].apppausemusic, Email.externalApplications[i].guiapplication, Email.externalApplications[i].appinputdevice, Email.externalApplications[i].appinputline, Email.externalApplications[i].display, Email.externalApplications[i].apppath, filename, Email.externalApplications[i].appwindowname, Email.externalApplications[i].appstartfullscreen);
break;
}
}
}
}
catch(Exception errmsg) { CFTools.writeError(errmsg.Message, errmsg.StackTrace); }
}
public void readExternalApps()
{
try
{
XmlDocument extdoc = new XmlDocument();
extdoc.Load(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\Centrafuse\\Plugins\\Email\\appattachments.xml");
XmlNodeList appnodes = extdoc.SelectNodes("/APPATTACHMENTS/APPLICATION");
Email.externalApplications = new ExternalAppCollection();
foreach(XmlNode mynode in appnodes)
{
try
{
string appdisplayname = System.Web.HttpUtility.HtmlDecode(mynode.SelectSingleNode("@APPNAME").InnerText);
string apppath = System.Web.HttpUtility.HtmlDecode(mynode.SelectSingleNode("PATH").InnerText);
string appwindowname = System.Web.HttpUtility.HtmlDecode(mynode.SelectSingleNode("WINDOWNAME").InnerText);
string appdisplay = System.Web.HttpUtility.HtmlDecode(mynode.SelectSingleNode("DISPLAY").InnerText);
string extensions = System.Web.HttpUtility.HtmlDecode(mynode.SelectSingleNode("EXTENSIONS").InnerText);
int display;
bool apppausemusic = false;
bool appstartfullscreen = false;
bool guiapplication = true;
try { display = Int32.Parse(System.Web.HttpUtility.HtmlDecode(mynode.SelectSingleNode("DISPLAY").InnerText)); }
catch { display = 1; }
try { apppausemusic = Boolean.Parse(System.Web.HttpUtility.HtmlDecode(mynode.SelectSingleNode("PAUSEMUSIC").InnerText)); }
catch { apppausemusic = false; }
try { appstartfullscreen = Boolean.Parse(System.Web.HttpUtility.HtmlDecode(mynode.SelectSingleNode("STARTFULLSCREEN").InnerText)); }
catch { appstartfullscreen = false; }
try { guiapplication = Boolean.Parse(System.Web.HttpUtility.HtmlDecode(mynode.SelectSingleNode("GUIAPPLICATION").InnerText)); }
catch { guiapplication = true; }
if(apppath != "" && (!guiapplication || (guiapplication && appwindowname != "")))
{
ExternalApplication newapplication = new ExternalApplication();
newapplication.appdisplayname = appdisplayname;
newapplication.apppausemusic = apppausemusic;
newapplication.guiapplication = guiapplication;
try
{
newapplication.appinputdevice = Int32.Parse(System.Web.HttpUtility.HtmlDecode(mynode.SelectSingleNode("LINECONTROL").InnerText).Split('|')[0]);
newapplication.appinputline = Int32.Parse(System.Web.HttpUtility.HtmlDecode(mynode.SelectSingleNode("LINECONTROL").InnerText).Split('|')[1]);
}
catch
{
mynode.SelectSingleNode("LINECONTROL").InnerText = "-1|-1";
extdoc.SelectSingleNode("/APPATTACHMENTS/APPLICATION[@APPNAME='" + mynode.Attributes["APPNAME"].Value + "']/LINECONTROL").InnerText = "-1|-1";
extdoc.Save(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\Centrafuse\\Plugins\\Email\\appattachments.xml");
newapplication.appinputdevice = -1;
newapplication.appinputline = -1;
}
newapplication.display = display;
newapplication.apppath = apppath;
newapplication.appwindowname = appwindowname;
newapplication.appstartfullscreen = appstartfullscreen;
newapplication.extensions = extensions;
Email.externalApplications.Add(newapplication);
}
}
catch(Exception errmsg) { CFTools.writeError(errmsg.Message, errmsg.StackTrace); }
}
}
catch(Exception errmsg) { CFTools.writeError(errmsg.Message, errmsg.StackTrace); }
}
You will need the methods listed above... This is what you would run inline when a file was double clicked....
Code:
//UPDATE STATIC EMAIL REFERENCE WITH YOUR NAMESPACE
//UPDATE THIS WITH CORRECT PATH
string emailresultdata = "path to the file that was clicked";
if(this.CF_checkFormat(emailresultdata, CFTools.ExtensionType.Music) || this.CF_checkFormat(emailresultdata, CFTools.ExtensionType.Pictures) || this.CF_checkFormat(emailresultdata, CFTools.ExtensionType.Video) || Email.checkExtension(Path.GetExtension(emailresultdata).Replace(".", "")))
{
if(!Email.checkExtension(Path.GetExtension(emailresultdata).Replace(".", "")))
{
int startindex = -1;
ArrayList listarray = new ArrayList();
CFTools.ExtensionType extType = CFTools.ExtensionType.MusicVideo;
string[] attfiles = Directory.GetFiles(Path.GetDirectoryName(emailresultdata));
if(this.CF_checkFormat(emailresultdata, CFTools.ExtensionType.Music))
extType = CFTools.ExtensionType.Music;
else if(this.CF_checkFormat(emailresultdata, CFTools.ExtensionType.Pictures))
extType = CFTools.ExtensionType.Pictures;
else if(this.CF_checkFormat(emailresultdata, CFTools.ExtensionType.Video))
extType = CFTools.ExtensionType.Video;
for(int i=0;i<attfiles.Length;i++)
{
if(this.CF_checkFormat(attfiles[i], extType))
{
if(this.CF_checkFormat(attfiles[i], CFTools.ExtensionType.Video))
listarray.Add(new CFControls.skinListboxItem(Path.GetFileName(attfiles[i]),attfiles[i],2,false));
else
listarray.Add(new CFControls.skinListboxItem(Path.GetFileName(attfiles[i]),attfiles[i],-1,false));
}
}
if(listarray.Count > 0)
{
for(int a=0;a<listarray.Count;a++)
{
if(((CFControls.skinListboxItem)listarray[a]).Value == emailresultdata)
{
startindex = a;
break;
}
}
this.DialogResult = DialogResult.Cancel;
Application.DoEvents();
if(this.CF_checkFormat(emailresultdata, CFTools.ExtensionType.Pictures))
this.CF_loadMediaPlaylist(((CFControls.skinListboxItem[])listarray.ToArray(typeof(CFControls.skinListboxItem))), startindex, true);
else
this.CF_loadMediaPlaylist(((CFControls.skinListboxItem[])listarray.ToArray(typeof(CFControls.skinListboxItem))), startindex, false);
}
else
this.CF_systemDisplayDialog(CF_Dialogs.OkBox, this.pluginLang.readPluginField("/APPLANG/ATTACHMENT/NOFORMAT"));
}
else
{
this.DialogResult = DialogResult.Cancel;
Application.DoEvents();
this.loadApp(Path.GetExtension(emailresultdata).Replace(".", ""), emailresultdata);
}
}
else
this.CF_systemDisplayDialog(CF_Dialogs.OkBox, this.pluginLang.readPluginField("/APPLANG/ATTACHMENT/NOFORMAT"));
}
So what this will do above is if it is a video, music, or picture file that is clicked, it will load it directly inside the Centrafuse music player, if it is another extension that is setup and support such as PDF or DOC, which have to be setup first inside appattachments.xml, it will launch the external application passing the file to open as a parameter...
david
|
|
|
August 19th, 2008, 03:54 PM
|
#4 (permalink)
|
|
10 Farad - Flux Capacity
Join Date: Nov 2006
Location: RI, USA
Vehicle: 03 Accord EX
Posts: 1,407
|
This is a really cool plugin. I had one request/suggestion.
Is there anyway that this plugin can interact with the CF media library? For example if a song/album/folder is deleted, it will automatically update the CF library. So if you have duplicate songs etc, it will update that album and remove it automatically.
Maybe this question is more for David. Does CF monitor the folder already? I remember in the past, CF used to update the library when you copy something to the media folder while CF is running so you dont have to rebuild the library. I believe it still works with the File Sync plugin. Would this apply here too? Specially when you remove a file.
|
|
|
August 19th, 2008, 03:56 PM
|
#5 (permalink)
|
|
Administrator
Join Date: Oct 2004
Location: Atlanta, GA
Posts: 5,012
|
CF monitors the folder, this should already work...
david
|
|
|
August 19th, 2008, 03:59 PM
|
#6 (permalink)
|
|
10 Farad - Flux Capacity
Join Date: Nov 2006
Location: RI, USA
Vehicle: 03 Accord EX
Posts: 1,407
|
Sweeet... LOL
Say hello to my little friend... (file manager plugin)
Say good bye to duplicates mp3... (mp3 with -1 in the file names)
|
|
|
August 20th, 2008, 02:30 AM
|
#7 (permalink)
|
|
10 Farad - Flux Capacity
Join Date: Aug 2007
Location: Melbourne, Australia
Vehicle: Audi S3
Posts: 537
|
Quote:
Originally Posted by David
[Awesome Code]
|
Thanks David that is great! I'll give it a go asap.
nintwala, sounds like you could also make good use out of a 'Search' Function. I'd really like to write one so I'll make that too.
In doing so I'll probably make the plugin bigger, trying to squish everything into that center space probably isn't going to end well. Would it be better if I used up the upper or lower section of the screen? I'm leaning to towards the upper half so as you can still use the play/pause etc buttons.
This plugin is far from over!
__________________
Released 3.1: MBM Reader - SpeedFan - VWCDPIC - Save Location - Song Announcer - BOM Radar - Street Name Announcer - System Monitor - Delete Song - Twitter - Screensaver
Released 2.1 (Only): Sudoku - File Manager - Lap-time Racing Plugin - Emergency - Chameleon - Blackout - GPX Recorder
Testing: Shoutcast - Lap-time Racing Plugin
Developing: VoIP - Facebook
Designing: Soundboard - ZAVAS
|
|
|
August 20th, 2008, 05:32 PM
|
#8 (permalink)
|
|
10 Farad - Flux Capacity
Join Date: Nov 2006
Location: RI, USA
Vehicle: 03 Accord EX
Posts: 1,407
|
Search function would be great...
May I suggest a "..." button. This can have additional advance options, so that way you can keep the main screen clean and not look messy.
|
|
|
November 25th, 2008, 12:46 AM
|
#9 (permalink)
|
|
10 Farad - Flux Capacity
Join Date: Nov 2008
Vehicle: Suzuki Swift Sport Mega Option JDM 2006
Posts: 349
|
Any idea what could be the reason for encountering the installation error as per the screenshot attached?
I've yet to install any previous or current version of File Manager and also cannot find any appearing in add/remove programs.
I've cleared the internet temp file, redownloaded the msi multiple times, thinking the download may be corrupted but still face the same error.
Using CF2 and have other plug-ins installed.
|
|
|
November 25th, 2008, 06:38 PM
|
#10 (permalink)
|
|
10 Farad - Flux Capacity
Join Date: Aug 2007
Location: Melbourne, Australia
Vehicle: Audi S3
Posts: 537
|
Ahh bugger. I know what that is. :-( I'm sorry I'll have it fixed up in the next release!
Thanks for letting me know.
__________________
Released 3.1: MBM Reader - SpeedFan - VWCDPIC - Save Location - Song Announcer - BOM Radar - Street Name Announcer - System Monitor - Delete Song - Twitter - Screensaver
Released 2.1 (Only): Sudoku - File Manager - Lap-time Racing Plugin - Emergency - Chameleon - Blackout - GPX Recorder
Testing: Shoutcast - Lap-time Racing Plugin
Developing: VoIP - Facebook
Designing: Soundboard - ZAVAS
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|