|
exactly.
impelment same mechanism as COM object use.
add two methods:
AddReference()
ReleasReference()
and increase, decrease number of it's references in prive variable:
int referenceCount .
When AddReference() is called, referenceCount == 0 and array is dumped to file, recreate the array
When ReleasReference() is called and referenceCount == 1 , dump array to file.
Call AddReference() everytime you need to pass reference to another variable
Call ReleasReference() everytime you dispose this reference
zilo
|
|
|
|
|
(just kidding)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
zilo
|
|
|
|
|
Thank you for the throughtful replies.
An issue is that the app reached a quarter million lines of code and a fair level of complexity before it became clear that temporarily writing these arrays to disk would be necessary. Being able to figure out a way to do this that is transparent to the rest of the app would be a real lifesaver.
|
|
|
|
|
I know it is hard to hear but maybe a bit refactoring is worth. please, don't blame me for
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
I don't blame you....but I still might be crying myself to sleep tonight.
|
|
|
|
|
Well good night then and happy new year.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
My first thought upon reading the subject line was, "If it exists, it's being referenced".
Winkles wrote: a quarter million lines of code
What's a line of code?
Anyway, yeah, you need a class that does all that behind the scenes, sounds like a good weekend project.
Or make some type of database? So all the arrays are always cached to disk?
|
|
|
|
|
Could you help me tisth advise how to protect user login and password
i have an open-source applcication which backups data and i want to prevent unauthirized access to file with options programmatically. There is a login and password of a backup user.
so i have no ideas what to use to prevent such information being disclosed or just copied with other people
|
|
|
|
|
|
Hi all
I Wount to add Footer to DataGridView In C#.Net Windows Application
But In Windows Application The DataDridView Dont Have Footer To Add it
I wount to How i can add footer to DataGridView or A new Free Grid Control Have Footer
Thanks For Any Body Help Me
Thaer
modified on Monday, December 31, 2007 2:34:56 AM
|
|
|
|
|
Create a new class, inherit from DataGridView, and override the OnPaint method to display your footer as follows
public override void OnPaint(...) {
base.OnPaint(...);
} Hope this helps,
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
How can I apply Model View Conrol (MVC) pattern on windows app, If i were to have only a custom user control class, Data class, and ProperGrid control on a Form1.cs in C#. I have went through couple of MVC patterns on google and here as well, but neither of them telling me how can we update raw data if they were to change by two places, first is through PropertyGrid itself and secondly when the custom control is moved through the mouse.
Please advise me if there is any link i can further learn from. Thanks I appreciate ur favor.
|
|
|
|
|
netJP12L wrote: me how can we update raw data if they were to change by two places
I did this using delegates. So when the data class gets changed, delegate will be invoked and it will change the grid data. I don't know whether this is the real MVC pattern
|
|
|
|
|
Thanks for answering, the way I am trying to implements is also the same way you said. I have a ShapeUserControl that get updated by the dataclass through the delegates. But my problem is how can I update the data class through the ShapeUsercontrol. Can you please show me some demo.
|
|
|
|
|
SharePoint & BizTAlk Server.
Among these two, Which one has better future.
For Employment, which course is better ?
Among these two, which one is easy to learn?
Can any one give your views regarding my question???
G. Satish
|
|
|
|
|
Hi, I have set DataSource for a ComboBox and it works properly but now i want to insert another option ALL, how I could do so? Plz help me out.
|
|
|
|
|
I think there are some properties like Add or Items.Add or Insert in combobox. I think you can use it for adding one more item.
ComboBox.Add("ALL");
|
|
|
|
|
Just use the Add method when you want to insert another item into the combobox.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
after populating your combobox from the database
just use the add method to add another item
|
|
|
|
|
Hello
I am a trainee. In a time column we have intime and outtime. For a particular date their may be more than one swipe but i have to take the first time for that particular day as intime and last swipe as outtime. Could any one help me on this how to proceed.
Ex;
abc 29/12/2007 9.00 (AM)
abc 29/12/2007 9.20
abc 29/12/2007 12.00
abc 29/12/2007 13.00
abc 29/12/2007 14.00
abc 29/12/2007 18.00 (PM)
fd 29/12/2007 18.00 (PM)
fd 29/12/2007 19.20
fd 29/12/2007 21.00
fd 29/12/2007 22.00
fd 29/12/2007 4.00 (AM)
so on..... goes on...
How to take the first time as the intime and the last time as outtime. I want to calculate the total time worked for that particular day by any employee (Card number is also avilable) but NO DATA BASE.
|
|
|
|
|
Where are you storing the data ??? in any flat file ??? or in a xml ???
|
|
|
|
|
Hi Abhijit,
I am storing the data in the datatable and there is no database in my project. All the initial information is extracted from MS-Excel Sheet to datagridview. There upon all the data is stored in datatable and displayed.
In the excel sheet there is one column consisting of In/Out Time and i have to calculate the intime and outtime for each employee for given dates. So how should i do it. We cannot segregate as per the department as any one can come any time and go any time.
Waiting for your reply.Thanks for your help in advance.
|
|
|
|
|
Good luck. If you were using a database, it would be alot easier.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Since you file has blank separated fields, for every single line you can extract such fields in a very simple way using String.Split method.
Alternatively, you can use the very powerful Regex Class
http://msdn2.microsoft.com/en-us/library/system.text.regularexpressions.regex(VS.71).aspx[^]
the effort needed to learn its usage is well worth.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|