|
turbosupramk3 wrote: How did you know it only implemented IEnumerable and not IEnumerable<T>?
I looked at the code[^] in the article[^] you linked to.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
hello
I don't understand this, my app is perfectly not leaking memory and responsively and Task Manager "Detail" tab shows my app is consuming stead 350MB (I checked, update speed is Normal, so I am not looking at some stale counter) on this machine with 3900MB (i.e. almost 4GB)
Now, how come, when I close my process, the memory usage drops from 70% to 30%!?! Right away! as reported on Task Manager!? A 40% drop on this 3900GB machine is 1560MB - that's four times memory I am using. What am I reading here...?
Thanks in Advance
dev
|
|
|
|
|
First, STOP using Task Manager to tell you how much memory your .NET app is using.
It's telling you how much memory the .NET CLR has RESERVED for your app, not how much it's actually using.
This has been documented countless thousands of times all over the web. I know I've posted the explanation dozens of times here on CP.
.net memory task manager[^]
|
|
|
|
|
|
devvvy wrote: and second? This is not a C# question.
Veni, vidi, abiit domum
|
|
|
|
|
you have just contributed to the generally well being of code project Rich
dev
|
|
|
|
|
Just? That was nearly a week ago.
Veni, vidi, abiit domum
|
|
|
|
|
You already got the "second", I just didn't specify it.
|
|
|
|
|
dude, if google is more useful than you what good are you
dev
|
|
|
|
|
Google is only as useful as the person using (or NOT using) it.
If you can't do research and teach yourself, you're screwed in this business.
|
|
|
|
|
eat some icecream sour old man
dev
|
|
|
|
|
Funny you should say that...but it has nothing to do with ME being a sour old man.
|
|
|
|
|
Hey, I only speak the truth. If you can't handle it, don't be whiny about it and go get some ice cream yourself.
|
|
|
|
|
Good day
I a use a plugin interface to load a screen from a dll module. I created a thread to load a User Control from a separate dll. The user control form the plugin dll uses WPF to display some charts as a dashboard. When I use a normal WinForm user control it works fine but with the WPF user control I get a thread access error. Is there a way to allow access to the thread of a WPF form?
Here is my thread code that gets the uc from the dll
public void constructStartScreen()
{
ucSystemStartScreen _ucSystemStartScreen = new ucSystemStartScreen();
foreach (PluginInterface Plugin in TPlugins.PluginList)
{
if (Plugin.getSystemTag() == TPlugins.theSelectedPlugin)
{
ucBaseUserControl theStartScreen = new ucBaseUserControl();
theStartScreen = Plugin.getStartScreen();
if (theStartScreen != null)
{
theStartScreen.Dock = DockStyle.Fill;
theStartScreen.UserCurrentInfo.SetUserInfo(TUserInfo.UserID);
theStartScreen.UserCurrentInfo.IsLogedOn = TUserInfo.IsLogedOn;
theStartScreen.UserCurrentInfo.Connection = TUserInfo.Connection;
theStartScreen.theSystemDBTag = Plugin.getSystemDBTag();
_ucSystemStartScreen.setStartScreen(theStartScreen);
_ucSystemStartScreen.Dock = DockStyle.Fill;
DataTable RecentList = _MenuSystemDAO.getRecentList(TUserInfo.UserID);
_ucSystemStartScreen.loadRecentList(RecentList);
_ucSystemStartScreen.CanClose = true;
_ucSystemStartScreen.UserCurrentInfo.SetUserInfo(TUserInfo.UserID);
_ucSystemStartScreen.UserCurrentInfo.IsLogedOn = TUserInfo.IsLogedOn;
_ucSystemStartScreen.UserCurrentInfo.Connection = TUserInfo.Connection;
_ucSystemStartScreen.theSystemDBTag = Plugin.getSystemDBTag();
addStartScreen(_ucSystemStartScreen);
}
break;
}
}
}
The code in the DLL
public ucBaseUserControl getStartScreen()
{
ucHRStartScreen _ucHRStartScreen = new ucHRStartScreen();
return _ucHRStartScreen;
}
The
ucHRStartScreen has a elementhost control that loads the WPF screens.
|
|
|
|
|
There isn't enough code to see exactly what your doing, but the general problem is that you cannot touch/create/use/modify/whatever UI controls from anything other than the UI (startup) thread. Doing this stuff from any other thread will lead to the problems you're seeing, and more. This applies to both WPF and WinForms.
|
|
|
|
|
Please help me on this .... its very urgent and trying from last 10 days, otherwise tell me how save the file directly to disk using web browser control.
|
|
|
|
|
You can't do it directly. Check the documentation[^] to see which methods or properties can get the page content. My guess would be one of the DocumentXxx properties.
Veni, vidi, abiit domum
|
|
|
|
|
You can't do it using the WebBrowser control.
You CAN do it using the WebClient[^] class.
|
|
|
|
|
Hello All,
I've written a Windows application for adding data into an existing XML file that has the following schema:
<lectures>
<lecture>
<speakername>
</speakername>
<subject>
</subject>
<date>
</date>
<time>
</time>
<location>
</location>
</lecture>
</lectures>
There are more than one < lecture > node in the file, the above code just shows the schema of the file. The user adds data to an existing XML file by entering values into textboxes which correspond to the various child nodes of the < lecture > nodes in the XML file. Then when the user is done he/she can simply click the submit button to add data to the existing XML file. As it is, the app works but the data are not sorted. I would like to sort the XML file by date so that the dates are in ascending order. Please point me to a web page that discusses how this can be done or show me an example. Thanks in advance for your help.
modified 24-Nov-13 3:21am.
|
|
|
|
|
ASPnoob wrote: Please point me to a web page Google is very good at doing that.
A fairly simple solution would be to deserialize the XML data into a collection class[^], then sort it before rewriting it back to the XML file.
Veni, vidi, abiit domum
|
|
|
|
|
Hello there,
I am developing an app that will have HTML/JS/CSS as the user interface component and then the back end will be C# that will be dynamically updating this web page. In order to do that i need the C# functions to be able to call JS functions in HTML page and the JS functions to be able to call C# functions.
First of all, is this possible?
If possible, how can i do that?
Please guide me with sample code.
Thanks in advance.
|
|
|
|
|
Well, first of all, you cannot get a server to push to a client over HTTP. It's a request/response protocol only. The reason for this is quite simple. The server has no idea if the client is still on the same page expecting data. The web server NEVER calls the client.
Typically, the client will "refresh" a part of the page, such as data, by calling a method in your webserver to request new data over Ajax.
|
|
|
|
|
First of all, forget about HTTP and all.
I'm talking about a win forms app with a WinBrowser control embedded in it.
No networks calls
|
|
|
|
|
You still can NOT do it. The two runtimes are completely separate and your only bridge between them is some kind of communication transport, such as Ajax.
The JavaScript code is running inside the browser without any knowledge at all of anything outside of the sandbox it's running in in the browser.
|
|
|
|
|
Don Guy wrote: First of all, is this possible?
As expressed - no.
You have two applications. They need to communicate. So you will need a communications protocol that will run over a socket.
How you do that depends on what exactly is running on the client and what exactly is running on the server.
You might want to also insure that you really, really want to push to the client because that is very likely going to make things much more complicated. But if so then that is what you will be doing so you can google for that.
|
|
|
|