|
Hi,
maybe you have to use "//DOC" instead of "./DOC"?
Regards
Sebastian
|
|
|
|
|
|
I'm in the process of learning C#/.NET & UML, having previously done many years of embedded C/C++, with a smidgen of UML and VS6/MFC. I'm doing a home project, and can now at least put *simple* windows apps together. I want to now do a good object oriented design for a C# project - I've got Visual Paradigm for UML to help me here.
The problem I have is this: How best to model in an OOD the windows infrastructure elements of the design:-
* GUI components. Forms, buttons, text windows, etc etc.
* Event handlers. Being event-drive they just "pop up from nowhere" and then disappear again.
* How the underlying infrastructure knits it all together.
I can imagine that if I have a "PressMeHere" button, then it would be an object having a "PressMeHere_ButtonClick" event handler as one of its public methods, but it would be nice to see what it is in the system that invokes this method, and how the major .NET components interact.
Can anyone point me to a UML modelling of a typical .NET Windows application? Something that clearly identifies the demarcation between .NET/Windows infrastructure, versus application. I'd be very grateful if anyone can.
modified on Wednesday, January 28, 2009 9:10 AM
|
|
|
|
|
Hello All,
Here I have a problem with downloading a file.
I have a file "Sample.dat" of 600Mb in my IIS root directory.
Now I have a client application to download file to local drive.
am using DownloadFileAsync(URI,file);
it takes 2 mins to download the complete file but while downloading the file if delete the source file in server it is still getting downloaded, how is it possible?
ashok
|
|
|
|
|
ashok_rgm wrote: it takes 2 mins to download the complete file
2 mins for 600 MB.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
It is in LAN..
ie,. I have configured my IIS to my IP, and downloading from different system in same network.
ashok
|
|
|
|
|
You are not giving a URL to user for download.
But you are pushing a download to user.
In this case, file content is buffered in system memory and the content is pushed from memory only(not from disk).
Now if you delete the Source there will be no issue to one downloading the file.
|
|
|
|
|
Hi alll
I have a windows application using c# in framework 3.5(VS 2008)..
My starting page is Form1...i have put one ShowImage button in that..now on click of that ShowImage button 2 things should happen:
1.form1 should get closed
2. ShowImageForm should get opened
if i give
this.close();
Form Main1;
Main1 = new ShowImage();
Main1.Show();
the entire application is getting closed..
how can i do this?
|
|
|
|
|
may be u can use this.hide();
rahul
|
|
|
|
|
i have tried ...but no use...
|
|
|
|
|
ok..Thanks for ur fast reply... ...befor i tried that it ws giving an error...
now again i tried after,it worked well...
|
|
|
|
|
Your application will close when the initial form closes.
Quick and dirty way is to call Hide instead of Close, call ShowDialog() for the new form and then call close on the initial form after that.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
ok..Thanks for ur fast reply...
|
|
|
|
|
Another way (I'm not too keen on this but in some ways is better) is to take control of the Application thread yourself.
The reason the application closes when your initial form does is because of the Application.Run(new Form1()); in the Main method of Program.cs.
If you show the form yourself before this line and then just call Application.Run(); the application then won't close until Application.ExitThread() is called.
This method is static so can be called from anywhere. Just make sure it is definately called from any place that should be able to close the program.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
hi every body
i have desktop application which convert from mp3 to wav
i want to make all mp3 files in my pc have new item in it context menu which can open my application
and then i want the application receive the file name which open it to make convert
how can i do this ??
|
|
|
|
|
and this is a c# question how?? You do this using windows explorer file association or reg edits.
|
|
|
|
|
thanks for reply
but my question is how from my program recieve file name which open my program
|
|
|
|
|
sorry misunderstood you.
You need to look into using the args that is passed to the main function.
|
|
|
|
|
I am using a 3rd party DLL that uses the J# runtime. If J# isnt installed, i get a FileIO exception. I want to be able to check when my program starts up if J# is installed, I think the best way is to load the assembly, if its found, then carry on, if not, notify the user.
I tried:
Assembly.Load("vjslib"); and Assembly.Load("vjslib.dll"); but both throw not found exceptions.
The below works fine, but that means the path is hard coded. Is it possible to get the DLL's location dynamically?
string path = "C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727\\vjslib.dll";
Assembly assembly = Assembly.LoadFile(path);
Regards,
Gareth.
(FKA gareth111)
|
|
|
|
|
Just a thought, try if you can write a small search routine and search the dll in %systemroot%\\Microsoft.NET\\
If J# runtime is installed is it definite to have the dll in C:\WINDOWS\system32\? If yes use %systemroot%\\system32\\vjslib.dll
string path = "%systemroot%\\Microsoft.NET\\Framework\\v2.0.50727\\vjslib.dll";
Assembly assembly = Assembly.LoadFile(path);
regards
Karmendra
|
|
|
|
|
KSuthar,
That still doesn't get around the problem of having a hard coded path.
Regards,
Gareth.
(FKA gareth111)
|
|
|
|
|
|
Since DOC node doesn't have child, you only need one loop which iterates the child nodes of BIBLE . See the following code
for (int i = 0; i < bNode.ChildNodes.Count; i++)
{
XmlNode node = bNode.ChildNodes[i];
string strElement = node.Name;
if (strElement.ToLower().Trim() == "doc")
{
string strDocClientID = node.Attributes["CLIENT_ID"].Value;
string strDocMatterID = node.Attributes["MATTER_ID"].Value;
string strDocNumber = node.Attributes["DOCNUMBER"].Value;
string strDocName = node.Attributes["DOCNAME"].Value;
}
} This can be done in a better way if you use XPath .
|
|
|
|
|
Hi,
This only returns the data from the first DOC only
Any thoughts please?
Thanks
|
|
|
|
|
Get a XmlElement and SelectSingleNode of that, instead of the XmlDocument. I am not sure why it is returning SECOND, I am beginner, I had this information thought of sharing, might help you, Let me know if it do help.
XmlDocument doc = new XmlDocument();
doc.Load(strFullPath);
XmlElement root = doc.DocumentElement;
XmlNode bNode = root.SelectSingleNode("BIBLE");
string strBibleClientID = doc.DocumentElement.GetAttribute("CLIENT_ID");
string strBibleMatterID = doc.DocumentElement.GetAttribute("MATTER_ID");
string strBibleDocNumber = doc.DocumentElement.GetAttribute("DOCNUMBER");
for (int i = 0; i < bNode.ChildNodes.Count; i++)
{
XmlNode bibleNode = bNode.ChildNodes[i];
int intElements = bibleNode.ChildNodes.Count;
for (int x = 0; x < intElements; x++)
{
string strElement = bibleNode.ChildNodes[x].Name.ToString();
if (strElement.ToLower().Trim() == "doc")
{
string strDocClientID = bibleNode.ChildNodes[x].Attributes["CLIENT_ID"].Value;
string strDocMatterID = bibleNode.ChildNodes[x].Attributes["MATTER_ID"].Value;
string strDocNumber = bibleNode.ChildNodes[x].Attributes["DOCNUMBER"].Value;
string strDocName = bibleNode.ChildNodes[x].Attributes["DOCNAME"].Value;
}
}
}
|
|
|
|