|
Thank you both! The way you two explained it made me realize "what I was missing."
In case this will help anyone else, I got my multithreading web automation to work by creating a new Form inside my void Run(); method, then attaching a new WebBrowser to it, and using that WebBrowser to perform my automatioins.
_WBForm = new Form();
_WBForm.Size = new System.Drawing.Size(410, 310);
_WBForm.Visible = false;
_WBForm.Resize += new EventHandler(_WBForm_Resize);
_WB = new WebBrowser();
_WBForm.Controls.Add(_WB);
_WB.Location = new System.Drawing.Point(5, 5);
_WB.Size = new System.Drawing.Size(400, 300);
While this didn't allow me to view the WebBrowser on my main form, it does allow me to actually multithread my search requests by having multiple webbrowser objects. I added a property to allow me to view what the thread was doing if I wanted to:
public bool ShowBrowser
{
get
{
if(_WBForm != null && _WBForm.Visible)
return true;
else
return false;
}
set
{
if (_WBForm != null)
{
if(value)
_WBForm.Show();
else
_WBForm.Hide();
}
}
}
Thanks again all!
|
|
|
|
|
Hi,
Does anyone know the best place to locate programmers who want to sell their apps or programs? Is there any place on the web where programmers post their creations for sale?
Thanks for any input as I am looking to purchase any apps or programs that are useful and operate in Windows.
|
|
|
|
|
|
kevindill wrote: that are useful and operate in Windows.
A very broad request.
only two letters away from being an asset
|
|
|
|
|
There's a number of sites like download.com that let people download shareware.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Check out rentacoder.com
I do some freelance work there and its a work-for-hire type site, so if you need something made, post your request and a price range and see what people offer.
|
|
|
|
|
You must be in the third world. I don't think that's what he was asking.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hello,
I have an assignment for my Algorithm Design course and I can't seem to find where to start.
The problem is some sort of pathfinding algorithm but with a dice, and I must compute the minimum cost/path
I've done other pathfinding problems with A*, Lee, but in this one that dice can go through the same spot multiple times and I can't figure out a condition for this.
Here's a PDF with my problem
http://adcfils.files.wordpress.com/2008/12/cube.pdf[^]
|
|
|
|
|
xnastyx wrote: I can't seem to find where to start
Just a strange thought, but maybe you could ask your professor
only two letters away from being an asset
|
|
|
|
|
That won't work, the professor does not know, he has been asking the same problem for
many years now, hoping to finally get a solution.
|
|
|
|
|
Hi All,
I have 5 textboxs, 1 button and 1 Gridview control.
I just want that when I click the button, text of each textbox will be added in the Gridview in separate column. Each time I will click the button, a new row must be inserted in the Gridview below the last row.
Please tell me some simplest way to do so. I have tried it by binding Gridview to List<> datasource but the problem is that when ever I clicked the button, new instance of List<> is created ( e.g List<T> mylist = new List<T>(); ) and the any existing data in the List<> is lost. I used my own entity in the List<>.
Please help me with this or any other simple idea in C#.
|
|
|
|
|
The list idea will work fine. It's your code that is the issue. Have the list as a member, add to it and rebind.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Grid.aspx -- Page Design Code
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Grid.aspx.cs" Inherits="Grid" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<table style="width: 287px">
<tr>
<td>
<asp:Label ID="lblId" runat="server" Text="Id"></asp:Label></td>
<td>
<asp:TextBox ID="txtId" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>
<asp:Label ID="lblFirstName" runat="server" Text="First Name" Width="71px"></asp:Label></td>
<td>
<asp:TextBox ID="txtFirstName" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>
<asp:Label ID="lblLastName" runat="server" Text="Last Name"></asp:Label></td>
<td>
<asp:TextBox ID="txtLastName" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>
<asp:Label ID="lblNickName" runat="server" Text="Nick Name"></asp:Label></td>
<td>
<asp:TextBox ID="txtNickName" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>
<asp:Label ID="lblCity" runat="server" Text="City"></asp:Label></td>
<td>
<asp:TextBox ID="txtCity" runat="server"></asp:TextBox></td>
<td>
<asp:Button ID="btnInsert" runat="server" OnClick="btnInsert_Click" Text="Insert" />
&nbsp; &nbsp; &nbsp;
</td>
</tr>
</table>
</div>
<br />
<asp:GridView ID="GridView1" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None">
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#999999" />
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
</asp:GridView>
</form>
</body>
</html>
Grid.aspx.cs -- Code for Insert Data into Grid
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
DataTable dt = new DataTable();
dt.Columns.Add("Id", typeof(string));
dt.Columns.Add("First Name", typeof(string));
dt.Columns.Add("Last Name", typeof(string));
dt.Columns.Add("Nick Name", typeof(string));
dt.Columns.Add("City", typeof(string));
VSDataTable = dt.Copy();
}
}
private DataTable VSDataTable
{
get
{
return (DataTable)ViewState["VsDt"];
}
set
{
ViewState["VsDt"] = value;
}
}
protected void btnInsert_Click(object sender, EventArgs e)
{
DataRow dr = VSDataTable.NewRow();
dr["Id"] = txtId.Text;
dr["First Name"] = txtFirstName.Text;
dr["Last Name"] = txtLastName.Text;
dr["Nick Name"] = txtNickName.Text;
dr["City"] = txtCity.Text;
VSDataTable.Rows.Add(dr);
GridView1.DataSource = VSDataTable;
GridView1.DataBind();
ClearTextBoxes();
}
public void ClearTextBoxes()
{
txtId.Text = "";
txtFirstName.Text = "";
txtLastName.Text = "";
txtNickName.Text = "";
txtCity.Text="";
}
Faisal and Prathap
|
|
|
|
|
If I have 2 datasets in which an updating to a table at dataset1 perform changes to the other table at dataset2... How to update this changes at Dataset2?. Must use tableadapter.fill( dataset2.mytable);
does exist other way than refill?. thanks...
|
|
|
|
|
I can't really understand your explanation, but I think you said you wanted to make changes to, or update the contents of, DataSet2 based on a change in DataSet1?? There is no automatic facility to do this. You have to write the code to get the data for DataSet2 or make the appropriate changes to it.
Like I said, your explanation is not very clear or understandable.
|
|
|
|
|
Yes Dave. This is the question. and sorry if it was ununderstandable.
Thank you very much....
|
|
|
|
|
No, ADO.NET is disconnected, you need to refill the grid. Unless you can manually copy the specific change from dataset1, but that's more work, it just saves you DB resources.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Ok, thanks. I looking the way to have a low cost at the network traffic, and refill method isn't help me. I need the users have the real product amount if others make an invoice....
|
|
|
|
|
Hi
I designed a class named X
I want serialize my defined objects.
but i gave this message:
Type 'X' in Assembly 'X, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not marked as serializable.
How can i mark a class as Serializeable?!!
tnx for your help
|
|
|
|
|
|
As the exception says the assembly isn't marked as serializable so all you need is to mark it as serializable using attribute. If you need more control implement ISerializable interface.
|
|
|
|
|
How can I mark it as Serializeable??!!!!!
|
|
|
|
|
They hide the information here[^]
|
|
|
|
|
Giorgi Dalakishvili wrote: They hide the information here[^]
They don't really hide it, he just can't use google.
modified 12-Sep-18 21:01pm.
|
|
|
|
|
The dirty rotten scoundrels - Imagine hiding that kind of information in the product documentation. What kind of cynical things will they do next!
|
|
|
|