|
CLR Profiler[^] is a very handy program when it comes to memory profiling .NET applications, try it out!
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Hi guys, In my parent class I have a context menu with 3 times and in the drived class i am adding two more items in the contextmenu. They do get added up and working but what i want is that i want to show drvied class items on the top in the context menu. Is that even possible. Thanks
|
|
|
|
|
|
Hi All,
I'm just creating a Background worker to fill a datatable from an SQLCE database but i'm having trouble then passing that from the DoWork eventEventHandler to the WorkerCompleted event hander on the GUI thread in order to bind it to the datagrid ...
Can anyone advise on that?
TIA,
Jammer
Going where everyone here has gone before!
My Blog
|
|
|
|
|
Use the Result property of DoWorkEventArgs and RunWorkerCompletedEventArgs classes to pass and retrieve result.
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
Oh my ... thanks very much for this info!!
Jammer
Going where everyone here has gone before!
My Blog
|
|
|
|
|
Glad to help you
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
I am using the PrintPreviewDialog to display reports created via a class that inherits the PrintDocument. I have no problem displaying the reports, but I would also like to be able to capture any keystrokes the user makes while the preview dialog has the focus; in particular I want to be able to capture the escape key. Unfortunately even though I have added handlers for the PreviewKeyDown, KeyDown, KeyPress, and KeyUp events of the print preview dialog, my class still does not capture any of the keystroke events in the print preview dialog. Does anyone know of a way I can capture keystroke events for the print preview dialog?
Thank you...
|
|
|
|
|
Well, I have an answer to my own question. If anyone is curious, I went ahead and created another class that inherits the PrintPreviewDialog, and by using that class to perform the preview functions I am able to capture keystrokes on the preview form, including escape, from within that class.
I would prefer not to have to create another class but if that is what is needed, I will live.
|
|
|
|
|
Hi,
Any points will be greatly appreciated.
Code shippet, etc..
Thanks.
|
|
|
|
|
There isn't too much to it. Here is a small sample class. It should be named something like WebServiceListner.asmx
Hope this gets you started.
Hogan
<br />
using System;<br />
using System.Data;<br />
using System.Web;<br />
using System.Collections;<br />
using System.Web.Services;<br />
using System.Web.Services.Protocols;<br />
using System.ComponentModel;<br />
<br />
public class Class1<br />
{<br />
[WebService(Namespace = "http://your.url.here.com/")]<br />
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]<br />
[ToolboxItem(false)]<br />
public class Class1: System.Web.Services.WebService<br />
{<br />
[WebMethod]<br />
public string WebServiceMethod(string xmlData)<br />
{<br />
return "";<br />
}<br />
}<br />
}<br />
|
|
|
|
|
Thank you.
That is exactly what I had in mind.
|
|
|
|
|
hello
can i set the location of the open/Save filedialog box
best regards
dghdfghdfghdfghdgh
|
|
|
|
|
Yes you can. Use the InitialDirectory property.
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
hello
hey i mean the place of the dialog in the screen
10x
dghdfghdfghdfghdgh
|
|
|
|
|
|
Hi!
i'm having some trouble with message queing.
to check if the queue exists I use MessageQueue.Exists(queueAddress) and the address is "machine.domain\queueName"
everything works fine when using this on a machine within the domain. but on a machine outside the domain Exists returns false.
i read that msmq uses windows authentication. my best guess is that this "false" is due to this beeing outside the domain security issue..
is there any workaround? passing some credentials or sth?
btw. it's a public transactional queue
thanks for any help!
life is study!!!
|
|
|
|
|
Hi,
I'm trying to build a generic Tree structure. The structure is based around parent node objects that are connected with edge object to its children node objects, everything starting from a root node object. The structure is contained in a tree object. For increased usability there is also a separate edge-connector object that stores each child- and parent node with its edge object.
Each node object contains a node element object and each edge object contains a edge element object, which are represented as respectively the generic types N and E.
To calculate the cost of traversing all edges to the leaf nodes, I've implemented a call from the tree object method GetEdgeElementsCost() that access the method int GetCost(TreeNode<N, E> ChildNode) of the generic type E through the implementation of an interface. There seem however to be something wrong with this approach as I keep getting errors when I try to compile.
I got the following errors:
Error 1 The type 'N' cannot be used as type parameter 'N' in the generic type or method 'WindowsFormsTestApplication1.TreeNode<N,E>'. There is no boxing conversion or type parameter conversion from 'N' to 'WindowsFormsTestApplication1.INodeElement'.
Error 2 The type 'E' cannot be used as type parameter 'E' in the generic type or method 'WindowsFormsTestApplication1.TreeNode<N,E>'. There is no boxing conversion or type parameter conversion from 'E' to 'WindowsFormsTestApplication1.IEdgeElement<N,E>'.
Here is an extract of the code:
public interface IEdgeElement<N, E>
{
int GetCost(TreeNode<N, E> ChildNode);
}
public interface INodeElement
{
}
public class Tree<N, E>
where N : INodeElement
where E : IEdgeElement<N, E>
{
private List<EdgeConnector<N, E>> _EdgeList;
public Tree()
{
_EdgeList = new List<EdgeConnector<N, E>>();
}
public int GetEdgeElementsCost()
{
int cost = 0;
for (int i = 0; i < this._EdgeList.Count; i++)
{
cost = cost + this._EdgeList[i].Edge.Element.GetCost(this._EdgeList[i].ChildNode);
}
return cost;
}
}
public class EdgeConnector<N, E>
where N : INodeElement
where E : IEdgeElement<N, E>
{
private TreeEdge<N, E> _Edge = null;
private TreeNode<N, E> _ChildNode = null;
public TreeEdge<N, E> Edge
{
get
{
return _Edge;
}
set
{
_Edge = value;
}
}
public TreeNode<N, E> ChildNode
{
get
{
return _ChildNode;
}
set
{
_ChildNode = value;
}
}
}
public class TreeEdge<N, E>
where N : INodeElement
where E : IEdgeElement<N, E>
{
private E _Element;
public TreeEdge(E Element)
{
this._Element = Element;
}
public E Element
{
get
{
return this._Element;
}
}
}
public class TreeNode<N, E>
where N : INodeElement
where E : IEdgeElement<N, E>
{
}
Anyone who knows how to solve this problem?
Thanks
|
|
|
|
|
public interface IEdgeElement<n, e="">
where N : INodeElement
where E : IEdgeElement<n, e="">
{
int GetCost(TreeNode<n, e=""> ChildNode);
}</n,></n,></n,>
|
|
|
|
|
I have a context menu I use for multiple DataGridView objects. When I click a menu option, the sender info seems to be the label of the context menu item, not the grid associated with the actual click event.
How can I retrieve the name of the grid associate with the context menu click?
|
|
|
|
|
By examining SourceControl property.
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
Excelent! I knew there had to be a way to do this but was not readily finding it.
Works perfect!
|
|
|
|
|
Glad to help you
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
Hi, my application works in different cultures i.e. in french, german and english in C#. Now, the problem is, I shud add a support e-mail which shud be different for each culture. Is that is possible to dirrectly add in web config file? or there any other methods that can be performed?
Thankx
|
|
|
|
|
If you put the information in a configuration file it would mean you having a copy of the configuration file for each culture or finding a way to change the configuration setting as part of the installation of the application. Perhaps it is easier to add the culture specific email address as a string in a resource file.
|
|
|
|