|
|
Thanx I thought my Boss is crook, but I guess he is not
|
|
|
|
|
He probably is - most are!
Dave
|
|
|
|
|
LOL that was funny. And True
|
|
|
|
|
Hi all,
i have a doubt regarding transfering of data across layers in c#.
In BLLayer,I want to transfer data thru 50 parameters to data access layer then how would be the performance of the application,
Also, how to pass data between DAlayer to BLLayer in c#.
Thanks
Mukkanti
|
|
|
|
|
mukkanti007 wrote: 50 parameters to data access layer
This wouldn't be a large data for the application but definitely a mammoth maintainability issue though.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
I doubt the parameters will be an issue, rather the result set.
|
|
|
|
|
I found OpenGL for C# it is called CsGL.
You can download it from the Internet then you get a .dll file which you need to place in your C:\Windows\system32\ directory.
Unfortunately on the SourceForge.net site where you can download it, it says compatible with Windows9X, WindowsME, WindowsXP, etc, but not Windows Vista.
Is this a problem? Can I use CsGL on my Vista PC? It is 32bit! CsGL hasn't been updated in years!
Please your thoughts on this.
Ranger49
|
|
|
|
|
A quick search of OpenGL in Internet did give a couple of other vista-compatible ones too.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Hello everyone,
I find there is no resource release method for WebClient class, e.g. a method called "Close".
My usage scenario is,
1. Creating a new instance of WebClient;
2. Post byte[] data using UploadData method, and retrieve return data also using byte[].
In my scenario, are there any need to call some methods to release the resource (I suepect there is request stream handle and response stream handle to release)?
thanks in advance,
George
|
|
|
|
|
George_George wrote: I find there is no resource release method for WebClient class
It provides a Dispose() method which you can use to release the resources which it holds.
|
|
|
|
|
Thanks N a v a n e e t h,
Question answered.
regards,
George
|
|
|
|
|
I've convert my .doc document to .html. Maybe do you know if it is possible to read information from html source with C# (for example to read where formatting is changing, for example to bold, italic etc.
Thanks for your help
|
|
|
|
|
|
Hi !
i m using paint.net v3.22 free software in myproject , i added it in my solution so i have two project in
one solution now i want to call paintdotnet thorugh my project i got success , now i like to send image through code in paintdotnet ,
paintdotnet use workspace class i didnt understand yet how to send image through my project and edit them and then send back to myproject its my task
i m very thankfull to you plzzz any one help me .....thanks in advance .
some code are below that i tried plzzz help.
//its a button that is place in form1 its in myproject , and i m calling paint.net in mysoftware thorugh this code i get success but wanna send image that is in picturebox to paint.net but not getting any thing plz help me .
private void button2_Click(object sender, EventArgs e)
{
PaintDotNet.MainForm mF;
mF = new PaintDotNet.MainForm();
//PaintDotNet.PdnResources.GetImageResource(@"C:\Sunset.jpg");
//PaintDotNet.PdnResources.LoadImage(@"C:\Sunset.jpg");
// string[] fileNames ;
////string startingDir = Path.GetDirectoryName(documentWorkspace.FilePath);
// string startingDir = @"C:\Temp";
//public documentWorkspace;
//DialogResult result =PaintDotNet.DocumentWorkspace.ChooseFiles( PaintDotNet.DocumentWorkspace. , out fileNames, true, startingDir);
//PaintDotNet.DocumentWorkspace.ChooseFile(
//PaintDotNet.Actions.ImportFromFileAction(@"C:\Sunset.jpg");
// ImportFromFileAction(@"c:\sunset.jpg");
//PaintDotNet.Actions.OpenFileAction(pictureBox1.Image);
//PaintDotNet.Actions.NewImageAction();
// mF.AppWorkspace.PerformAction(new OpenFileAction());
// PaintDotNet.AppWorkspaceAction(new Image("C:\sunset.jpg"));
//PaintDotNet.AppWorkspaceAction(new OpenFileDialog());
mF.Show();
}
|
|
|
|
|
Hello everyone,
For ManualResetEvent and AutoResetEvent, I noticed some samples which does not call Close after using them.
1.
I think to be of good practices, we should call Close after using them -- the reason is both ManualResetEvent and AutoResetEvent wraps native resources and release immediately will make system have more capability to serve in the future?
2.
What native resources are wrapped?
thanks in advance,
George
|
|
|
|
|
1 - Call the Close() method when you finish using it. You can leave this to GC - AFAIK, wait handles, has very low OS burden. So cleaning it with GCs collection life cycle won't make any issues, I guess. When the application domain ends, all wait handles will be released.
2 - Use reflector to see what native resources it wraps.
|
|
|
|
|
Thanks N a v a n e e t h,
Looks like both of them are wrapping native mutex handle?
regards,
George
|
|
|
|
|
Hai,
Am doing Live chat project in c# using sockets. In that client server interaction(1 to 1) is ok. More than one client is connected (1 to n) to server then problem is if am sending message from server its going to all clients. But i want to send message to particular user. Please any one help me.... sample code for start Lisening in socket...
private void StartListen_Click(object sender, EventArgs e)
{
try
{
string portStr = textBox2.Text;
int port = System.Convert.ToInt32(portStr);
Create the listening socket...
m_mainSocket = new Socket(AddressFamily.InterNetwork,
SocketType.Stream,
ProtocolType.Tcp);
IPEndPoint ipLocal = new IPEndPoint(IPAddress.Any, port);
m_mainSocket.Bind(ipLocal);
m_mainSocket.Listen(4);
m_mainSocket.BeginAccept(new AsyncCallback(OnClientConnect), null);
UpdateControls(true);
}
catch (SocketException se)
{
MessageBox.Show(se.Message);
}
}
Thanking you,
Regards,
Nvrk
|
|
|
|
|
Hello everyone.
I am a relatively new and novice programmer, having only been programming for a few months.
I am trying to figure out what is going wrong with my simple TCP client / server program.
The server reads the bytes from a file, and sends them over a socket to a client, who reads the bytes into a buffer and outputs the bytes to the screen. After a while of doing this successfully, however the data read off the socket is nothing more than a bunch of zeros. After the correct amount of bytes has been read from the socket, it blocks as it expects more data and produces a timeout exception.
My code is as follows:
static void Main(string[] args)
{
if (args.Length > 0)
ServerMode();
else
ClientMode();
}
private static void ServerMode()
{
Socket listen = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
IPEndPoint iep = new IPEndPoint(IPAddress.Any, 8888);
listen.Bind(iep);
listen.Listen(3);
Socket sock = listen.Accept();
byte[] data = File.ReadAllBytes("C:\\bmptemp.bmp");
NetworkStream ns = new NetworkStream(sock);
ns.Write(data, 0, data.Length);
while (true)
{
int i = 2 + 2;
}
}
private static void ClientMode()
{
int recv = 0;
int totalRecv = 0;
Socket connect = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
connect.Connect(IPAddress.Parse("192.168.1.13"), 8888);
NetworkStream ns = new NetworkStream(connect);
do
{
byte[] data = new byte[1024];
recv = ns.Read(data, 0, data.Length);
totalRecv += recv;
foreach (byte b in data)
Console.Write(b.ToString() + " ");
}
while (recv > 0);
Console.WriteLine("Bytes read: {0}", totalRecv.ToString());
Console.ReadKey();
}
If the arguments passed into the command line are greater than 0, ServerMode is started, whereas client mode is started.
I would just read all of the bytes in one lump sum by making an overly large buffer to place the data in, but I wish to do it in small chunks like above so that I can add a progress bar and estimated time of completion to the simple program.
Any ideas as to why this doesn't download off of the socket properly? Any help, thoughts, or comments are greatly appreciated!
|
|
|
|
|
Hi
In a standalone windows app, I create a table, add rows to it, populate a couple of rows and add the table to a dataset.
I bind the table in the dataset to a datagrid.
If I make changes to the grid, the contents of the table are updated and the rowstate is set to modfified.
In a client/server situation, I fill a dataset with a table from a database and pass the dataset to the client.
On the client side I bind the table in the dataset to a datagrid.
The datagrid displays the data.
But if I make changes to the datagrid, no changes are made to the dataset.
In both cases I use
gridUsers.SetDataBinding(dsUsers,"UserList")
Where does the difference come in?
Just say if you need code snippets.
Obviously, until I can get the dataset to reflect changes made to the datagrid, I am going nowhere with developing this app.
Thanks,
Nigel
|
|
|
|
|
i think u need to call AcceptChanges() method on dataset
rahul
|
|
|
|
|
The point is that there aren't any changes in the dataset. That is the whole problem, changes made to the grid contents do not change the dataset.
|
|
|
|
|
|
Thanks, but I can do that just fine. This example is all on one Windows form. The problem occurs when I fill a dataset from a database at the server, send the dataset to the client, and the client binds the dataset to a datagrid.
When I do this, the datagrid does not update the dataset.
If I create a windows form with a datagrid on it, and fill the dataset using code on the same form, then changes to the datagrid update the dataset.
It is as if the compiler knows that the dataset was passed over the network and refuses to implement the data-binding in both directions
Nigel
|
|
|
|