Click here to Skip to main content
15,895,836 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have an Windows Forms application that effectively manages workflow on files in a set of predefined folders on a shared drive. i.e users can check files out and check them in and move them to QA etc, which phisically moves the files within the predefined folder structure.

However, at the moment this will obviously only work with a single project (and the single set of folders that i have coded into the program).

What i'd like to be able to do, is have a File menu item that is 'Create new Project'. When selected, a dialog box pops up asking for the project name and maybe a couple of other bits of info, then it creates the folder structure for that new project and away i go.

The user obviously also needs the option to choose which project to work with, and therefore which folder structure.

I have no idea where to start with this, so any pointers would be very useful. Thanks in advance.
Posted

There are many ways to design your application. The following is one "scenario". Look at other applications that your users have. See if any of their design paradigms align with your application type. Use what you judge to be the best ideas from them to design your user interaction processes.

One example
Create a new form that you open with ShowDialog in the click event of the Create New Project menu item. In the new form, use the OpenFileDialog control to allow the user to select the file or directory, then the user fills values in various form controls to define the new project values. When the user clicks the OK button or Create Project button, INSERT the data into your database and close the form to return to your main program. You may want your main program to display a list of all available projects or provide a search capability to find and display selected projects. That is a matter of how you want your program to interact with the user. How would you want it to act if you were the user?

Use the MenuStrip or (the older) MainMenu control from the Toolbox to create menu items.

MenuStrip
Provides a menu system for a form.

MainMenu
Represents the menu structure of a form. Although MenuStrip replaces and adds functionality to the MainMenu control of previous versions, MainMenu is retained for both backward compatibility and future use if you choose.


Use the OpenFileDialog control to allow use to select a file or directory.

OpenFileDialog
Represents a common dialog box that allows a user to specify a filename for one or more files to open.
 
Share this answer
 
v5
Comments
DaedalusAero 7-Feb-13 10:36am    
Thanks Mike, but my question was more to do with how to structure the program - I should have been more specific. How should my program deal with the New Project click event? Perhaps open a new form where the user enters project name etc? Then what? How does my program deal with creating this new project template. Then how does it programatically give me that project as an option the next time the user starts the application?
Mike Meinz 7-Feb-13 12:14pm    
I added further clarification to the Solution. If this answers your question, please Accept the solution so the question gets marked as answered.
choose MenuStrip from the toolbox
then write create new project in the text

after that add a new windows form
and under the text of creat new ptoject
in the first form
calling the creation form with object


like

C#
CreateProjectClass cp=new CreateProjectClass();
cp.show();
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900