Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Need to break up a very large C# program...

Posted on 2006-11-14
7
Medium Priority
?
196 Views
Last Modified: 2010-04-16
I have a very large C# program (currently 740 Kb) that I want to break up (the entire program is developed around a tab control with about 16 tabs on it..)  My thinking is that I might break it up by each tab and it's related functions because the program is just getting too big to manage, especially waiting for VS to re-draw the main form each time I make a change to any of the code.  Although the execution of the program seems to be ok, I just need to figure out a better way to manage the source.

Any suggestions?

0
Comment
Question by:rmmarsh
  • 3
  • 2
7 Comments
 
LVL 15

Accepted Solution

by:
ozymandias earned 1200 total points
ID: 17939878
Create separate custom component classes for each tab as controls that inherit from TabPage ?
0
 

Author Comment

by:rmmarsh
ID: 17939928
What would that buy me?
0
 
LVL 8

Assisted Solution

by:sabeesh
sabeesh earned 800 total points
ID: 17944018
create seperate usercontols for each tab item and place the user control in the tabs. so you could write your code in different different controls. this could be more easy and very easy to maintain the code.
Refer msdn for how to use usercontrols
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 15

Expert Comment

by:ozymandias
ID: 17945175
It would break up your code and make it more managable.
I thought that was what you wanted, quote : ".... I want to break up .... just getting too big to manage..."
0
 

Author Comment

by:rmmarsh
ID: 17951030
OK... just read up (on what I could find) on user controls... please provide some clarification for the following:
1.  There is a "UserCode Designer" component of VS; does or can each user control compile into a .dll?
2.  Any known way of moving existing controls to the Designer? (would probably have to have both projects open at the same time, right?)
3.  Is there an easy way to take some of the code that is pretty much static now and move it into something that will compile into a .dll, like a separate assembly?
0
 
LVL 15

Expert Comment

by:ozymandias
ID: 17951096
>> UserCode designer...not sure what that is.

You can take your controls and compile them into a dll, just create a class library project and move the code into it.
It will compile as a dll.
Create a reference to this dll in your main project and then you can use the controls.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question