|
Colin Angus Mackay wrote: Why not?
Unfortunately, where I work, it is the "Business" that makes tbe technical decision. They want to have a simplified client-side deployment process. One additional DLL and the hell breaks loose!
They've dictated that clients should have "Definitions.dll" and the "ClientConsole.exe" only. Rest of the 3rd party dependent references are already installed, so the installer only copies 2 files on the client machine.
Colin Angus Mackay wrote: State the obvious
I was hoping that from the post build event of "ServerConsole", somehow I could recompile the ClientConsole as a WinExe application.
|
|
|
|
|
malharone wrote: the ClientConsole as a WinExe application
hmm.. I could do that.. I should do that given the constraints
|
|
|
|
|
Hi,
We are using data-binding & typed datasets in our C# .NET 2.0 application (VS2005). We have a bindingsource which has as datasource a dataset and as datamember a datatable.
In the form we have a grid which is binded to that bindingsource. We allow new records to be created on the grid.
When the users navigates to a new row, the "Adding New" event is raised. We would like to handle this event because we need to set the key of the record to a new Guid.
We get as parameter of the "Adding New" function "AddingNewEventArgs e".
Then e.NewObject should be set. Well, this doesn't work. After setting the e.NewObject the program crashes.
It's like it does not accept my Typed DataRow. Maybe the collection underneath in the Bindingsource accepts another type?
Any ideas?
Best regards,
Jens
|
|
|
|
|
JensB wrote: we need to set the key of the record to a new Guid.
I did that in several data-bound DataGridViews with no problems. You don't set the e.NewObject to something. Here is how I did it.
private void MyDataGridView_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
{
MyDataGridView.Rows[e.RowIndex].Cells[0].Value = Guid.NewGuid().ToString();
}
Regards
|
|
|
|
|
Hello
How can i increase level of run my program in the Win XP
Thanks
|
|
|
|
|
Umm... What is "level of run"?
Regards
|
|
|
|
|
in the work with hardware which interrupt in the XP responced!
Thanks
|
|
|
|
|
That didn't clear things up at all.
Are you asking how to write a driver for a hardware device? Or how your application can communicate with a device? What kind of device?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
If you read that in an article or got some link that would explain what you mean, I'd greatly appreciate it.
Regards
|
|
|
|
|
Do you mean the priority of the application? Where increasing the priority of the application will increase the speed of the application but if set to high it will degrade the performance of the rest of the system?
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
|
|
|
|
|
Hi all,
I've been playing with excell for a bit and i saw that i can import data from a xml file...
Is is possible to do so through c#? 2 export data from xml to excell?
-- modified at 9:55 Tuesday 3rd October, 2006
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
Hello
You can write your DataSet to Xml text using DataSet.WriteXml() ,ethod. Then you can write it to an Xml file using XmlDocument class.
Regards
|
|
|
|
|
mejojo-
Thank you for your response. I forgot to specify we have not upgraded to the 2.0 framework. We are on 1.1 System.IO.SearchOption opt = System.IO.SearchOption.AllDirectories; does not seem to work.
My first attempt(b4 the post) was
DirectoryInfo di = new DirectoryInfo(@"C:\Temp");
foreach(DirectoryInfo file in di.GetDirectories())
{
Response.Write("File Info \""+file.FullName+"\""+"
");
}
But this does not go into subdirectiories. Can some one help?
What is the best option for displaying the result set to the web, DataGrid? Instead of Console.WriteLine what would I use for the web? From what I was told I a console app is done the same way from a Web App (ASP.NET) but Console.WriteLine does not display my result set.
Thanks in advance.
|
|
|
|
|
Hello
iamnew2C# wrote: I forgot to specify we have not upgraded to the 2.0 framework
I was postulating here in the forum for sometimes that if you want some functionality of a certain library of .Net framework, you can install it on your machine and explicitly reference to that library. So you'd be using .Net 1.1 for everything else, yet enjoy this new feature of .Net 2.0 or even 3.0.
iamnew2C# wrote: But this does not go into subdirectiories
Sure it won't. You have to put this code in a recursive function and recall it each time.
iamnew2C# wrote: What is the best option for displaying the result set to the web
You are enumerating Directories. I guess a TreeView would do the job.
Regards
|
|
|
|
|
static void Main(string[] args)
{
RecursiveGetDir(@"C:\Temp");
Console.Read();
}
static void RecursiveGetDir(string cDir)
{
DirectoryInfo[] dirs = new DirectoryInfo(cDir).GetDirectories();
if (dirs.Length > 0)
{
foreach(DirectoryInfo dir in dirs)
{
Console.Write("File Info \""+dir.FullName+"\\\n");
RecursiveGetDir(dir.FullName);
}
}
}
--EricDV Sig---------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters
|
|
|
|
|
Thank you. Could you tell me how I display the results to the web, instead of using Console.write? Is there another class output specific for a web app?
Regards
|
|
|
|
|
The best vehicle for displaying this in a web is using a treeview control.
public void MyForm_Load(object sender, EventArgs e)
{
InitializeComponent();
RecursiveGetDir(@"C:\Windows", myTreeView.Nodes);
Console.Read();
}
static void RecursiveGetDir(string cDir, TreeNodesCollection nodes)
{
DirectoryInfo[] dirs = new DirectoryInfo(cDir).GetDirectories();
if (dirs.Length > 0)
{
foreach(DirectoryInfo dir in dirs)
{
TreeNode node = new TreeNode(dir.FullName);
nodes.Add(node);
RecursiveGetDir(dir.FullName, node.Nodes);
}
}
}
|
|
|
|
|
i am calling a web service method in my windows application
the method returns xml file,i would like to set the Connection
timeout for my web service to 20 minutes,
and the counter is reset to zero everytime you Access any of the functions on the web service
So if you access the web service again within 20 minutes you dont need to log on again,
can any of you refer me to articles or samples
thanks
regards paula
|
|
|
|
|
Hi Paula,
20 minutes sounds like a very long timeout for a webservice. Even stranger is that you want it to reset it when accessing other methods. Why would you want to do this? Are you trying to fake events?
One way to go might be (in .NET 2.0) to use the asynchronous methods of the webservice proxy. You can then easily cancel your original call and re-issue it when you call any other method, but this is not good if it really does take say 15 minutes to return the data you asked for, as you'll keep aborting it and restarting.
Regards,
Rob Philpott.
|
|
|
|
|
hi
I m getting this error, while i close the form the window closes but the threads donot stop, The Dispose is executing fine.
My code goes like this....
private void button1_Click(object sender, EventArgs e)
{
Thread th = Thread(fn1);
th.Start();
}
public void fn1()
{ while (true)
{ lock (this)
{
//Do Something
}
Thread.Sleep(1000);
}
}
Thanks in advance
|
|
|
|
|
Hello
For sure you application will keep running.
Either:
1- Make you Thread.IsBackground = true
2- Or Terminate your thread in the Form_Closing event.
Regards
|
|
|
|
|
dear frndz,
i need the equivalent of
intFileNameLength = Instr(1, StrReverse(strFileNamePath), "\\")
instr???
strreverse??
mid??
All I ever wanted is what others have....
CrazySanker
|
|
|
|
|
Hello
If you tell us what you want to do in english, it would be a lot easier.
Regards
|
|
|
|
|
It's plain obvious what he wants to do.
Regards,
Rob Philpott.
|
|
|
|
|
AFAIK there is no equivalent for StrReverse but you can use String.LastIndexOf method to get the index of the last occurence of a substring.
Or for the given problem use Path.GetFileName(strFileNamePath).Length .
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|