|
Thanx!
I'll try to use it
Ante
|
|
|
|
|
Hi
Im using VS 2005 and C# and the Enterprise Library 2.0. I want to design an application that can't be affected by the Database engine i used (SQL Server, Orcale, My Sql, Postegree) how can i acheive that since MySql and Postegree is not supported in Ado.net as
provider.
Thanks for your help
|
|
|
|
|
Cross posting??? Tisk tisk tisk....
|
|
|
|
|
there are three providers in .NET.
odbc
oledb
sql.
oledb I use mainly for Acces, Oracle and sybase connections. The odbc I used once for a DBase V database. Sql is for the Sql server.
What you probably need to do is find the connection string for either the oledb or odbc providers.
oledb is not possible for older databases (like Dbase V) but is faster then odbc.
Sql is the fastest, but will only work with Sql Server.
Hope this helps.
I've found a living worth working for, but I haven't found work worth living for.
<marquee>
|
|
|
|
|
|
Hi! Recently I have bumped into a problem which I never have had before.
I've got an object which have a couple of onChange events,
I am doing some clones of this object and I really need to "copy" the events that the original object had into the new ones.
Anyone who can help me
Thanks
//
Daniel
|
|
|
|
|
1. make a subclass and call base.MemberwiseClone()
2. serialize then deserialize (caution, it would be a deep copy)
3. Use reflection to call the protected MemberwiseClone() method (requires full trust)
|
|
|
|
|
Thanks for your answer, I implemented it using MemberwiseClone() easiest right now and I think it will do.
But if for some reason any of you have got a nice way to show ... please feel free to do so.
|
|
|
|
|
I have a compiled DLL by VC6.0, in with:
<br />
<br />
#include "argedit.h"<br />
<br />
#include "allocpool.h"<br />
<br />
<br />
<br />
template <class Node, class Edge><br />
<br />
<br />
class StreamARGLoader: public ARGEdit<br />
<br />
{ public:<br />
<br />
typedef Allocator<Node> NodeAllocator;<br />
<br />
typedef Allocator<Edge> EdgeAllocator;<br />
<br />
<br />
StreamARGLoader(NodeAllocator *nalloc, EdgeAllocator *ealloc, <br />
<br />
istream &in);<br />
<br />
<br />
static void write(ostream &out, ARGraph<Node, Edge> &g);<br />
<br />
static void write(ostream &out, ARGLoader &g);<br />
<br />
<br />
private:<br />
<br />
<br />
enum { MAX_LINE=512 };<br />
<br />
void readLine(istream &in, char *line);<br />
<br />
int readCount(istream &in);<br />
<br />
void readNode(NodeAllocator *alloc, istream &in);<br />
<br />
void readEdge(EdgeAllocator *alloc, istream &in);<br />
<br />
};
instruction file :
<br />
int main()<br />
{
NewAllocator<Point> node_allocator;<br />
NullAllocator<Empty> edge_allocator;<br />
<br />
ifstream in("graph.txt");<br />
<br />
<br />
StreamARGLoader<Point, Empty> loader(&node_allocator, <br />
&edge_allocator, <br />
in);<br />
<br />
ARGraph<Point, Empty> graph(&loader);<br />
<br />
And finally hihi i don't know how to using it in C#, i face problem about NodeAllocator and istream &in
Is this "StreamARGLoader" a void or a function?
[DllImport("GraphMatching270606.dll",
EntryPoint="StreamARGLoader",CharSet=CharSet.Auto)]
public static extern void StreamARGLoader(NodeAllocator *nalloc, EdgeAllocator *ealloc, istream &in);
|
|
|
|
|
STreamArgLoader is a template class. You're gonna have one helluva time trying to expose that to C#. It's basically impossible, AFAIK.
What you *can* do, though, is write a C++/CLI class that does the manipulation of the StreamARGLoader class instance. C++/CLI methods are automatically exposed to all .NET assemblies, including C#, and can still deal with regular native C++ classes including template classes. That's what I would do: write a C++/CLI shim that does whatever your C# code needs to do to the StreamARGLoader.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Goof around music jam with my brothers (with video)
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
Hi
I have SplitContainer with two panels where in one panel there are many controls. During Resize event I would like all controls in the panel be resized too. Is there any way to do that automatically (any property) or should I do it by counting the size of each control depending on size of panel? (for me not a good solution).
Thanks for help
Ela
|
|
|
|
|
|
You could try to do an Anchor left, top, right. However all controls in your panel must be in a single collumn for this to work correctly.
What you may have to do if Anchoring does not help is to subscribe to the Resize event on the panel. Then based on the size of Panel1 or Panel2 (whichever side your controls are in) you set the new sizes of your controls. I found one or two situations where Anchoring just did not do it for all of my controls.
|
|
|
|
|
Thanks for the answers. Anchoring is not a good solution. Controls are not resized. I have to do what I was affraid of. I will have to count the size of cotrols depends on size of panel.
Thanks
Ela
|
|
|
|
|
Hi,
In my Java course as part of my degree we did class relationships based on the UML diagram. I would like to implement this same technique with C#.
If I create a Customer and Order class, how can I implement a class relation in code?
Is this the correct way to go in C#, or how is this technique implemented in C#? If any one has any good articles on this, please let me know.
Regards,
ma se
|
|
|
|
|
ma se wrote: If I create a Customer and Order class, how can I implement a class relation in code?
More or less the same way you would with Java. Most likely, you will have an instance of a Customer class which holds a list (or collection) of Order class instances.
The .NET 1.x way was to create a typed Collection (OrderCollection), but .NET 2.x introduced Generics which negate the need to do so. Start with your Customer class and go from there!
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
At the IDE level, if you had unlimited funds you could get Visual Studio Team Developer (or is it Team Architect??). From within here you can construct a UML class diagram and spin out the base classes and methods that support the diagram.
The nice part of this is when you make changes in your code, they are reflected in the class diagram. But the expense is out there.
Now with your class definitions your would just have something like this:
public class Customer
{
private Orders orders;
public Orders OrderInformation
{
get{ return orders; }
set{ orders = value; }
}
}
public class Orders : List%lt;Order%gt;{}
public class Order
{
}
-- modified at 14:28 Thursday 29th June, 2006
|
|
|
|
|
Hi to all,
How can I add code to User Control Unload Event? ( Code at time of Form Close in UserControl Code).
What is the use of RowHeader in DataGridView? Can I show index automatically to each row?
How Can I validate a path of a file?
Thanks & Best Regrads,
Aniket Salunkhe
|
|
|
|
|
what do you mean by validating the path of a file?
Check if it contains "valid" characters? use regexp.
If you wan't to check if the folder specified exist use: System.IO.Directory.Exists(folder)
If you wan't to check if the file exists use:
System.IO.File.Exists(file)
You will have to explain a little bit more for me what you mean by your first question. Every form has a FormClosing event, maybe you could use it to trigger other events/methods to do your work...
|
|
|
|
|
Hi,
I have designed an User Control having 'DataGridView' in it, which uses XML-File to show data in grid.
But I want to Write the XML-File (changes made in grid ) when application closes.
How to do that? What event should I use for that in the 'User Control '? Is there any Unload event for User Control?
Thanks & Best Regards,
Aniket Salunkhe
|
|
|
|
|
ok, so what if you make a function in your control, let's call it SaveStructure()
In your mainform/mainwindows/mainapplication you add this code to FormClosing event:
MyFancyInstanceOfMyObject.SaveStructure();
done ...
To be honest I don't know(I don't think there is an UnLoad event for user-controls by standard). But this should work anyway...
|
|
|
|
|
Hi,
Thanks.
Same think I have done. I thought that I am missing some thing. But if you have another solution for my User Control just tell me.
Also I have another query...
What is the use of RowHeader in DataGridView? Can I add a column (1st column) such that it will show index (automatically increasing/decreasing) of each row? i.e. same as Numbering done in Word Document
Thanks & Best Regards,
Aniket Salunkhe
|
|
|
|
|
Hello,
I have a problem with DataTable.
I read records by Stored Procedure and I put records in MyDataTable.
My DataGridView.DataSource = MyDataTable;
When I click "Next Record" button, the property
of
MyDataTable.Rows[this.BindingContext[dtNominativi].Position].RowState
become Modified, but I haven't modified filed.
WHY????
HELP ME PLEASE!!!!!
|
|
|
|
|
BindingContext is reactive to you location in the table, so by clicking next you are modifing it.
Why where you hoping for it not to be changed?
|
|
|
|
|
Hi,
Can anyone tell me how to send images in the mail. Not as a attachment, I want to embed images in the mail.
Thanks,
Sushant Duggal.
|
|
|
|