|
Thank you Vasudevan
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Hello,
Does anybody know what is new in .Net 3.0 related to file archiving methods?
If nothing new, what classes from .Net 2.0 are recomanded in doing this task?
Thanks,
Lukas
|
|
|
|
|
".NET 3.0" is a stupid Microsoft marketing name. Absolutely nothing has changed in the CLR, WinForms or ASP.NET from 2.0 - it's exactly the same binaries. The only new stuff is in WPF, WCF, Workflow Foundation and ObjectSpaces.
|
|
|
|
|
What do you mean by archiving? You mean adding files to a zip or rar file?
|
|
|
|
|
Hello, again!
By Archiving I mean adding files\directories to a zip or rar file.
Thamk you for your interest!
Lukas
|
|
|
|
|
Lukas22 wrote: dding files\directories to a zip or rar file.
Thamk you f
Lukas, you have a number of options: the System.IO.Compression APIs[^] in the .NET framework v2. You can use the free and open source #ZipLib[^]. You can also use the J# runtime zip libraries[^]. I recommend using the #ZipLib -- I've heard about some nasty bugs in the System.IO.Compression APIs, and the J# zip libraries forces a dependency on the J# libraries, which aren't installed by default on most .NET setups (including the default Windows Vista install). So, I recommend #ZipLib.
|
|
|
|
|
Hello My application is often launched while the user is logged on via Remote Desktop Connection. My question is-is there any way for my application to determine if it is being launched in this way. Because of Directory permissions my application writes configuration files to the hard drive. Alot of the people that log in via Remote desktop connection do not have rights to the directory, this is the scenario and the customers IT dep. does not want to change it. So I will be able to open the app in readonly mode if it is launched via RDC Connection. Do you know how to do this or can you point me in the right direction.
BTW the config files are written to the user Docs & Settings\user folder\application data\Our Company\Configuration file. I am using .Net 2003 C# of course.
Thanks in advance for any information.
"All of us who served in one war or another know very well that all wars are the glory and the agony of the young."
Gerald Ford
|
|
|
|
|
|
There is no difference between a user logging in over Remote Desktop and the same user logging in at the console (i.e. at the physical keyboard). You should work out whether the file you intend to write is writable, which you should do simply by trying to open it for writing. Ensure that you don't accidentally truncate it in the process!
|
|
|
|
|
Thank both you and Vasudevan Deepak Kumar for your responses.
"All of us who served in one war or another know very well that all wars are the glory and the agony of the young."
Gerald Ford
|
|
|
|
|
yes there is.
google...[^]
public object BufferOverFlow<br />
{<br />
__get { return BufferOverFlow; }<br />
__set { BufferOverFlow = value; }<br />
}
|
|
|
|
|
I can assure you that I do not need Beginner Tutorials, thanks for the insult though. My suggestion is that if you do not have anything pertinent to say, please quit trolling.
"All of us who served in one war or another know very well that all wars are the glory and the agony of the young."
Gerald Ford
|
|
|
|
|
Yes, but isn't it the schools job to teach you?
Just start with some beginner tutorials. Visual Studio is quite important, and you can use the object browser to learn a lot about objects/classes, etc... Just do some research, I wouldn't know where to start, and I really don't have the time either. Goodluck
-- modified at 12:58 Monday 19th March, 2007
Either something is wrong with the CP message board, or you modified your posts. Proof of this might be that the reply you can read above, makes absolutely no sense anymore.
When I read your original post, "programming in c#", it just said "Are there any C# tutorials?" in your post. And thus I replied with giving you a link to c# tutorials. I can't really see how this is at all insulting, on the contrary, at the moment I feel insulted by your reply.
I'm sorry you were offended, although I don't feel I should apologise
-- modified at 13:05 Monday 19th March, 2007
Also... checking the emails I got, the post was originally made by a user called 'babyhannah', and she/he replied this to my google link:
thanks for replying..actually, i hav a project in our class...were supposed to do a game using c#...the game is a maze...and im not really familiar on the methods or functions in c#...wt im supposed to do is to let my player move from the starting point to the finish point..and im not xur how to put my algorithm into the "C# language"...do u hv ny idea?
can anyone tell me what's going on?
public object BufferOverFlow<br />
{<br />
__get { return BufferOverFlow; }<br />
__set { BufferOverFlow = value; }<br />
}
|
|
|
|
|
Well Sorry, after reading your reply[Modified] it seems as though the site may have crossed a couple of posts.
"All of us who served in one war or another know very well that all wars are the glory and the agony of the young."
Gerald Ford
|
|
|
|
|
Hi,
I'm adding TreeView nodes in the following way:
<br />
foreach (System.IO.DirectoryInfo di in dirs) {<br />
inTreeNode.Nodes.Add(new TreeNode(di.Name));<br />
<br />
...<br />
}<br />
But now i want to put custom icon, so i added a ImageList and i searched for the overloaded method which permits me to select the icon index:
<br />
inTreeNode.Nodes.Add(new TreeNode(di.Name));<br />
inTreeNode.Nodes.Add(di.Name, di.Name, this.folderIndex);<br />
The thing is that the overloaded method doesnt accept a TreeNode as parameter, so i have first created the node and then made the association with the image index i want.
This didnt worked as now i have two copies of the same node with different icons. How can i solve this?
Thx,
Nuno
|
|
|
|
|
it clearly _does_ accept TreeNode as a paramter.
try this:
TreeNode tn = new TreeNode(di.name);<br />
tn.ImageIndex = ...;<br />
inTreeNode.Nodes.Add(tn);
public object BufferOverFlow<br />
{<br />
__get { return BufferOverFlow; }<br />
__set { BufferOverFlow = value; }<br />
}
|
|
|
|
|
I was just exploring that option!!
I now discovered other problem.
When i select a item in the tree, it stays with the first image list index, even when i have already defined a index for it. Is this normal?
Thx for your help in the other thread, the treeview its working!
Nuno
|
|
|
|
|
No problem and I'd like to continue to help you, but I don't understand the problem. Can you rephrase it, maybe with some code samples?
public object BufferOverFlow<br />
{<br />
__get { return BufferOverFlow; }<br />
__set { BufferOverFlow = value; }<br />
}
|
|
|
|
|
I cant show code sample for this problem.
When i run up, everything is fine. The tree is filled up and the file types which have a special icon are set up.
However, when i select an item in the tree, the icon changes to other icon, in this case, the first icon i have in my image list.
Was i clear now?
Thx,
Nuno
|
|
|
|
|
Yes, very
you should use SelectedImageIndex
public object BufferOverFlow<br />
{<br />
__get { return BufferOverFlow; }<br />
__set { BufferOverFlow = value; }<br />
}
|
|
|
|
|
Its perfect now!
Thx a lot!
Nuno
|
|
|
|
|
Hi,
I am extending the Generic list class for defining my own methods like
Sum,Average,Min and Max for the collection.Here i want to make my collection
access in Thread safe manner. i.e. when one threading is accessing the
collection for finding the sum or clearing the collection other Threads
should not be able to access it.i dont think lock is the best way to do so.
If any one knows the better way of implementing synchronization, Please let
me know.
With Thanks,
Sakthi.
|
|
|
|
|
Why don't you think lock is the best way to go?
Thread safety is a matter of design as well as locking of crucial issues. One thing I do is to iterate over a shallow clone of collections rather than the actual collection allowing the collection to be thread-safe while someone else is iterating.
But then if the underlying objects are not thread-safe you still have the same problem. Basically, focus on Static Methods, decent design, and locking where appropriate and test. If you are not able to see threading in your head then you will have to hack at it. Many will say threading is a difficult concept to master.
File Not Found
|
|
|
|
|
i have crated a chatting application.
chatting workes well.
but when the form is minimized. i could not get the new message. each time i have to open and see.
how to do popup like other chatting application?
thank u
|
|
|
|
|
I think this is what you're looking for:
ADSS Tray Popup Window
public object BufferOverFlow<br />
{<br />
__get { return BufferOverFlow; }<br />
__set { BufferOverFlow = value; }<br />
}
|
|
|
|