|
You have to create ActiveX object to use the device.
Regards
Saanj
Either you love IT or leave IT...
|
|
|
|
|
You can write a Server application from asp.net using socket which listens a port.
|
|
|
|
|
I have several list collections(i.e list1,list2 list3...etc)
and i have one xml file(i.e data.xml).I am storing the xml data to my suitable lists(i.e edge data in list1, subpart data in list2 like this...)
Now after storing the xml data in list collections i want to save this data from list to data base.
Till my coding is doing fine working properly and date are geting save into database.
But this entire process is time taking and user does not know when this process will completeed.Basicaly the xml file is not fixed.i will get sevaral xml file with more or less data(data structure of xml file is same).
I want to implement the progress bar here to inform how many hours or minutes or seconds left to to finise the entire process from storing xml data into list to saving data in database
can anyone give me idea about it...
with regards
tarak
|
|
|
|
|
TARAK NATH ROY wrote: I want to implement the progress bar here to inform how many hours or minutes or seconds left to to finise the entire process from storing xml data into list to saving data in database
You can't really do this. When you think about it, progress is dependent on many factors outside your control, such as network latency, server load, type of operation to be performed, other processes running on your machine, and so on. So all you can do is give (at best), a rough approximation of how long it will take.
Most algorithms work by knowing how many operations need to be performed, and then start by calculating how long one operation takes - then extrapolating the total time from this. After a certain number of operations, this figure is refined because there is greater statistical sampling at this stage. This is done over and over, until the operation is finally completed.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
The following code shows you how I created a DataSet and added it to the DataGridView.
To define the default column style, I added 2 columns to the DataGridView before and set their DataPropertyName.
<br />
DataSet ds = new DataSet();<br />
ds.Tables.Add();<br />
<br />
ds.Tables[0].Columns.Add("a");<br />
ds.Tables[0].Columns.Add("b");<br />
<br />
colColumn1.DataPropertyName = "a";<br />
colColumn2.DataPropertyName = "b";<br />
<br />
for (int i = 0; i < 10; i++)<br />
{<br />
ds.Tables[0].Rows.Add("a" + i, "b" + i);<br />
}<br />
<br />
dataGridView1.DataSource = ds.Tables[0];
Now I have the problem that I can't change any style (BackColor) of the rows that will be added by setting the DataSource.
Can I define it somehow in the DataSet (DataRow) OR is there any event that will be called after the row finished adding?
[I don't want to go through each row after the DataSource is setted and set the new style]
modified on Friday, June 5, 2009 3:33 AM
|
|
|
|
|
In that way i currently solved it:
<br />
private void dataGridView1_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e)<br />
{<br />
int i = 0;<br />
<br />
try<br />
{<br />
dataGridView1.Rows[e.RowIndex].DefaultCellStyle.BackColor = Color.White;<br />
if (dataGridView1.Rows[e.RowIndex].Cells[1].Value.ToString().Contains(textBox1.Text))<br />
{<br />
dataGridView1.Rows[e.RowIndex].DefaultCellStyle.BackColor = Color.ForestGreen;<br />
}<br />
int ii = 1 / i;<br />
}<br />
catch<br />
{<br />
<br />
}<br />
}<br />
I used the RowPrePaint event. So everytime when the row will be painted there is a check if the BackColor should be changed.
I tested it with 1,000,000 rows in fullscreen and the performance is (not the best but) ok.
But if you have another solution, feel free to post it.
|
|
|
|
|
Instead of trying to set the background through code its better to use CSS.
Regards
Venkatesh Ellur
Engineer - Software
+919886417764
+919886235553
|
|
|
|
|
I forgot: It's a Windows.Forms application. So i can't do it in that way.
But in Websites it's also a solution.
|
|
|
|
|
Hi,
I am experimenting with hosting a workflow within a Windows Forms application. From within a Code box in the workflow, I want to bring up a window in the host application, but am struggling with giving the workflow visibility of anything in the host application.
I realise it is questionable design that the workflow know anything too intimate from the hosting application, but can I get workflow code to call delegates in the host application perhaps? If so, what is the best way of 'passing' these delegates to the workflow.
Or am I missing some fundamental generic method that I should be using for doing stuff like this?
Any help or advice or pointers to good articles on this would be very much appreciated.
Best wishes, Patrick
|
|
|
|
|
Just a question on your design (that you mentioned is questionable ), workflows are normally not in a presentation layer and run as background functionality (hence can be called by any application, forms or ASP), are you sure you want to run the workflow in the presentation layer?
____________________________________________________________
Be brave little warrior, be VERY brave
|
|
|
|
|
The app I am developing (actually it is just an experiment at the moment) is similar to a Windows Troubleshooter. I was thinking of using the Workflow to provide the flowchart logic, while the Forms part simply acted like a dumb slave, providing functions such as AskQuestion(). As I say, it is all something of an experiment at the moment. I am just seeing how it would all fit together if I were to go down this route. On the face of it, it does seem to be ideally suited to this type of application.
-Patrick
|
|
|
|
|
I am developing an asp.net application, I get .xml data through IIS + port number.
My problem is, how to read xml data from IIS port and how to display it in .aspx page
Please help me on this issue.....
Thanks in advance
Yrishi
|
|
|
|
|
yrishi wrote: how to read xml data from IIS port
I am not sure what do you mean by this?
yrishi wrote: how to display it in .aspx page
Write a Xsl and bind your Xml data to this xsl.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
ok, I have asp.net web application on my server side. There is one device at my client side, that device send me data using my ip address and one port no(iis port). i want to show that data in my default.aspx page how can do this??
please help me
|
|
|
|
|
if the xml is simple,you can use DataSet to load this xml file, the method is ReadXml.good luck
i am a new
|
|
|
|
|
You can use XmlTextReader object to read and parse XML files and display accordingly.
Either you love IT or leave IT...
|
|
|
|
|
You can use socket connection in asp.net. So write a server application which listens a port in webserver.
|
|
|
|
|
Ok, I've Googled myself silly, and have done some very interesting reading but I still cannot find my answer...
If you call AppDomain.CurrentDomain.GetData() from a static method, does it access the domain of the application calling the static method, or a shared static domain?
____________________________________________________________
Be brave little warrior, be VERY brave
|
|
|
|
|
I'm fairly sure there is no such thing as a shared static app domain, my assumption would be that it would get the app domain currently running the code.
If you need to know for absolutely certain, the best thing to do is probably test it.
Simon
|
|
|
|
|
As Simon has said, there is no 'shared static domain'. You will get the object from the domain running the code.
You didn't ask this, but it may be helpful: the scope of static fields is the AppDomain. So if you use a class with a static field, you will get one object per domain.
Nick
----------------------------------
Be excellent to each other
|
|
|
|
|
Thanks for the reply, I think I either misunderstand static or AppDomain. Is the AppDomain shared across multiple instances of the same application? (Assuming that they are running on the same machine)
____________________________________________________________
Be brave little warrior, be VERY brave
|
|
|
|
|
Adriaan Davel wrote: Is the AppDomain shared across multiple instances of the same application?
No, AppDomain is an isolation container within a process. So just as each process is separated on your machine, so each AppDomain is separated within each process.
Nick
----------------------------------
Be excellent to each other
|
|
|
|
|
Thanks Nick, thats what I understood. The reason why I asked the question is that static is not isolated within an application and the AppDomain is, so how does it find the correct AppDomain? Or is the how not important?
____________________________________________________________
Be brave little warrior, be VERY brave
|
|
|
|
|
Ok, my confusion was not with AppDomain but with static... I also see that static in C# is quite different to static in c++ and I think my confusion came in from my c++ background, I studied it 8 years ago but have been doing c# mostly...
Does static differ in definition in Visual Studio c++ to Borland c++ of 8 years ago?
Also I once had a web application (ASP.Net) where the static variable was shared between users (and caused major confusion), does that mean static is shared between multiple instances of a web application, but not a windows application?
____________________________________________________________
Be brave little warrior, be VERY brave
|
|
|
|
|
Adriaan Davel wrote: static in C# is quite different to static in c++
Yes
Adriaan Davel wrote: does that mean static is shared between multiple instances of a web application, but not a windows application?
ASP.NET is still a .NET framework, so static works the same way. However in ASP.NET you can have many threads in an AppDomain that are each serving a request, so they will all see the same static instance.
I found this[^] on Google books. Might help - starts on p.571
Nick
----------------------------------
Be excellent to each other
|
|
|
|