not reliable.... just tanembaum and deitel..... i´d like something more....
Gianpaolo Barci
Posts
-
Building a FAT emulator -
Building a FAT emulatorHello everyone!!! I need to do a job to college that consists in build a simple file allocation table (FAT) emulator... The FAT itself will be a simple unidimentional array.. and it just have to do basic operations of a very Basic File System (create, remove, update and delete files) I´d like to do something ellegant with a friendly GUI containing the array and buttons wich triggers the operations.. Something simple and preety.... Can be C#, C++... C#´s most welcome!!! Do anyone know something good to start reading about? Someone did somehing like? I´m already searching by the way but found nothing reliable to start.... Thanks
-
loading a file on the lisview conttrol by a double click (c#)I did this! private void lvFiles_SelectedIndexChanged(object sender, System.EventArgs e) { string filePath = lvFiles.SelectedItems.ToString(); ShellLib.ShellExecute shellExecute = new ShellLib.ShellExecute(); shellExecute.Verb = ShellLib.ShellExecute.OpenFile; shellExecute.Path = @"F:\\Painel de Controle ETECH\\Projetos ETECH" + filePath; shellExecute.Execute(); } Am I close??
-
a way to execute the file on list view by doubleclickI did this!
private void lvFiles_SelectedIndexChanged(object sender, System.EventArgs e)
{
string filePath = lvFiles.SelectedItems.ToString();
ShellLib.ShellExecute shellExecute = new ShellLib.ShellExecute();
shellExecute.Verb = ShellLib.ShellExecute.OpenFile;
shellExecute.Path = @"F:\\Painel de Controle ETECH\\Projetos ETECH" + filePath;
shellExecute.Execute();}
Am I close??
-
a way to execute the file on list view by doubleclickDave I got your point!!! Working on it right now!!! Thanks
-
a way to execute the file on list view by doubleclickshellExecute.Path = someString;
andsomeString
represents the path to the file I selected on the listView control. Yes, It means that I´m in the right way now. The problem is right here... select the file in the ListView and put it´s path and it´s name on a string... I´m a totally dummy with event oriented programming. My knowledge is structured C, Data Structures on C.. I can do an entire B-Tree using C but I can´t implement a simple event.. oh shame on me... =( -
a way to execute the file on list view by doubleclickHello everyone!!! Me and this problem again!!! =D This is my code:
private void lvFiles_SelectedIndexChanged(object sender, System.EventArgs e)
{
ShellLib.ShellExecute shellExecute = new ShellLib.ShellExecute();
shellExecute.Verb = ShellLib.ShellExecute.OpenFile;
shellExecute.Path = @"F:\Painel de Controle ETECH\Projetos ETECH\{0}\80010005.dwg";
shellExecute.Execute();}
It works BUT open only the file written in the
shellExecute.Path
statement I need to find a way to execute a selected file on the list view... Well I´d many ideas and none worked.. I was thinking to put the selected file on a string and then to put this string on the end of the path statement but I didn´t figure out how to do it and mainly how to put the file name on a string when I select it on the list view control! Could anyone help me?? I´m very desperate!!!! best wishes for all!!! -
executing a program by double clicking on a file shown in list view ( C# )Hello folks! I´m almost reaching what I wanted to do! Now It does open the file... BUT JUST that file specified in the path on the code as you will see right down!
private void lvFiles_SelectedIndexChanged(object sender, System.EventArgs e)
{
ShellLib.ShellExecute shellExecute = new ShellLib.ShellExecute();
shellExecute.Verb = ShellLib.ShellExecute.OpenFile;
shellExecute.Path = @"F:\Painel de Controle ETECH\Projetos ETECH\Acessórios\80010005.dwg";
shellExecute.Execute();
}It will open ONLY 80010005.dwg "Projetos ETECH" is the root node (folder) and contains a lot of childs (subfolders of especific projects) wich contains CAD drawings (thousands millions of DWGs). I need a way to get the path of any selected file. What I thought was to create a method that gets the path where you are and the name of the file you selected (string) and put them together to for the path to te file to be executed... Am I in the right way or there is something easier???? Best Regards for all you!!!!
-
executing a program by double clicking on a file shown in list view ( C# )Hello Dave!!! getFullPath returns the path from the root to the current node! Yeah it makes sense to me now!!! It´s totally silly to pass something that is pointing to a directory to execute a file.... It doesn´t needs to know WHERE THE FIE IS because it is already showing me the files! I´m beginning to understand!
-
executing a program by double clicking on a file shown in list view ( C# )It´s using both!!!! But treeView shows only folders ald list view only files!! I liked this way because it keeps wiewing more organized! I tried another method BUT I´m also trying this nodeCurrent is used to popuate lvFiles with files... it gets the current node and shows files. getFullPath gets the path from the root to the current node... I tried shell too you might see it because it almost worked.. just for the detail that it opns the program but not the file (I know that I´m missing a line or some statement) I´m lost because it´s my first c# experience!!!!
-
executing a program by double clicking on a file shown in list view ( C# )Hi Sebastian I just tried another method that is ALMOST working!! Just a tiny detail that it open the program by doubleclicking the file BUT it doesn´t open the file itself!!!
private void lvFiles_SelectedIndexChanged(object sender, System.EventArgs e)
{
ShellLib.ShellExecute shellExecute = new ShellLib.ShellExecute();
shellExecute.Path = @"C:\Arquivos de programas\AutoCAD 2008\acad.exe";
shellExecute.Execute();
}just a simple shell dll command! Now I need to open the file itself!!! Any clue??? tnx!
-
executing a program by double clicking on a file shown in list view ( C# )Hi Sebastian! The compiler says! Well the method just call execute file!!! Nothing more!
private void executeFile(TreeNode nodeCurrent)
{
Process.Start(getFullPath(nodeCurrent.FullPath));
Process.Start(String.Format("\"{0}\"", getFullPath(nodeCurrent.FullPath)));
}private void lvFiles\_SelectedIndexChanged(object sender, System.EventArgs e) { executeFile(nodeCurrent); }
I tried to use shell dll too! But a little bit lost with it.... I know that I maybe doing something wrong but... I´m more familiar with structured C.
-
executing a program by double clicking on a file shown in list view ( C# )Hey people I´m still having a little problem here!!! I´m trying to execute a program by double clicking on a file shown in List View... The methods to show fthe files and folder I did and it´s working well... to execute a file I created a new mwthod
executeFile
private void executeFile(TreeNode nodeCurrent)
{
Process.Start(getFullPath(nodeCurrent.FullPath));
Process.Start(String.Format("\"{0}\"", getFullPath(nodeCurrent.FullPath)));
}as you can see
getFullPath(nodeCurrent.FullPath)
gets the path for the directory where the file is. I don´t know if I did right but do call the method I greated another by doubleclickin on th list viewlvFiles_SelectedIndexChanged
and called the methodexecuteFile(nodeCurrent)
but It doesn´t work... it says nodeCurrent doesn´t exists on the namespace... I don´t know if I didexecuteFile
right... Could some good soul please help me???? Thanks! -
Shell Programming - Loading a file selected on list view componentYeah! That´s where I´m placing the method executeFile. I´ll call by an event like listView_Click or eiter the listView_SelectedIndex The code to populate I found here at CP and with a few changes I made it point to an expecific folder to be the root (just basic programming and basic O.O. concepts). My professors at college helped me a little because they are not quite familiar with .NET Framework. Even I got more familiarity with Assemble Languages and Structured C/Pascal... and few notions of O.O C++ and Objective C(Mac) (I HATE JAVA). I´m still junior in .NET but I´m trying!!!! I almost did it... just a few errors!!! I appreciate all the help!!! I owe you guys a beer!!!! Thanks
-
Shell Programming - Loading a file selected on list view componenthehehehehehehe no problem dude!!!! just one last question... on the header of the code a put just
using System.Diagnostics;
??? because System.Diagnostic.Process is unrecognized too : / :) Thank you dudes.. I really owe you one!!!!
-
Shell Programming - Loading a file selected on list view componenthahahahahaha sorry for that, my mistake :)!!!! It was just if you wanted to to test it!!! So I showed the whole thing!!!! Well, as you can see I´m bloody new on c# and .net!!! The other question is where I call the executeFile method??? but the complier is still yelling me that System.Diagnosics.Process namespace doesn´t exists!!! There is something else I should do? Thanks!!! I really appreciate the whole support you are giving me!!!
-
Shell Programming - Loading a file selected on list view componentI´ll try to explain my code while my poor English let :P!! It´s a file manager (a TreeView and a ListView). The Tree View shows only FOLDERS and List View only FILES. A file manager similar to Windows explorer but with a RootNode set to an especific folder on an external HD. Only the Root node and subnodes are visible. This I´ve done but not working properlly... just working... The problem I´m having is to load the program by double-clicking on the file in the ListView. The code is shown down
using System;
using System.Drawing;
using System.Collections;
using System.Diagnostics;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.IO;
using System.Management;
using System.Globalization;namespace Painel_de_Controle_ETECH
{
public class Workspace : System.Windows.Forms.Form
{
private System.Windows.Forms.TreeView tvFolders;
private System.Windows.Forms.ImageList m_imageListTreeView;
private System.Windows.Forms.ToolBar toolBar1;
private System.Windows.Forms.Splitter splitter1;
private System.Windows.Forms.ListView lvFiles;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Button button1;
private System.ComponentModel.IContainer components;public Workspace() { InitializeComponent(); //Metodo para preencher a tvFolder PopulateDriveList(); } protected override void Dispose( bool disposing ) { if( disposing ) { if(components != null) { components.Dispose(); } } base.Dispose( disposing ); } #region Windows Form Designer generated code /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Workspace)); this.tvFolders = new System.Windows.Forms.TreeView(); this.m\_imageListTreeView = new System.Windows.Forms.ImageList(this.components); this.toolBar1 = new System.Windows.Forms.ToolBar(); this.splitter1 = new System.Windows.Forms.Splitter(); this.lvFiles = new System.Windows.Forms.ListView(); this.textBox1 = new System.Windows.Forms.TextBox(); this.button1 = new System.Windows.Forms.Button(); this.SuspendLayout(); // // tvFolders // this.tvFolders.Dock = System.Windows.Forms.DockStyle.Lef
-
Shell Programming - Loading a file selected on list view componentDave, I tried but the namespace doesn´t exists.... I´m using VisualStudio 2003!!! I think I can´t avoid shell....
modified on Friday, October 10, 2008 11:13 AM
-
Shell Programming - Loading a file selected on list view componentHello folks!!! I have a serious problem. I´making a "file explorer" in C# and it has to set a root node from an external HDD and show only files and folders hierarchically down it. This I´ve done and it´s working "fine"... with some problems but working! The major problem is that I´ve to load a file by double clicking it on the list view (DWGs MUST open with AutoCAD, DOCs and Spreadsheets MUST open with MS Ofiice, Pictures must open with paint and whatever!) I know that I need to use ShellAPI BUT I´m having problems to use it properlly... I´ve been reading some HotTo´s, articles, walkthroughs (including C# does Shell) but none answer my question especifically..... Can some one please help me? I´m desperate!!!! thanks PS. I´m using framework 1.1/2.0 with .NET 2003