|
No - I was thinking you'd have the Flash part in a separate AppDomain - you could overlay this over the top by controlling the Z Order. Release the App Domain, and reclaim the memory.
|
|
|
|
|
What do you mean by AppDomain?
BTW - don't know if it matters this is a Windows App.
J.
|
|
|
|
|
Are you using .NET (you should be if you are posting in the C# forum)? Look up Application Domains.
|
|
|
|
|
Pete,
I'm still trying to solve this. I'm using C# .Net 1.1 (Don't ask!) on a Windows App.
Any help would be greatly appreciated.
Jeff.
|
|
|
|
|
Hi!,
where do I configure the option that my windows service can be suspended and continued and not only started and stopped ?
(I meen that the options are shown and selectable in the service list menue).
Is it a code option or a setup option ?
Thanks
Frank
|
|
|
|
|
I haven't had a need to do that and I can't imagine needing it. Why do you want to do it?
|
|
|
|
|
Hi,
that's not the question. If you examine the service list you will find some services which have these options and some have not.
In my case it make sense to suspend the service do something with the data and after this to continue the service.
So, please where is the option to be set ?
Thanks
Frank
|
|
|
|
|
But why not just stop and start?
|
|
|
|
|
PIEBALDconsult wrote: Why do you want to do it?
Possibly to allow existing processing to terminate cleanly, and prevent some new processing, while still running other background processing.
|
|
|
|
|
Electron Shepherd wrote: allow existing processing to terminate cleanly
Stop should do that as well.
Electron Shepherd wrote: while still running other background processing.
Then it's not paused, is it?
Electron Shepherd wrote: other background processing
Possibly should be in its own Service.
|
|
|
|
|
A good example would be a web server implementing Keep-Alive. You may need to prevent new inbound connections, possibly for load balancing or other resource allocation requirements, but preserve the internal state data.
Dont forget that just because you've never needed to do it doesn't mean no-one ever needs to do it.
|
|
|
|
|
Electron Shepherd wrote: A good example would be a web server implementing Keep-Alive. You may need to prevent new inbound connections, possibly for load balancing or other resource allocation requirements, but preserve the internal state data.
And you are suggesting that you would not do that when stopping as well?
Electron Shepherd wrote: Dont forget that just because you've never needed to do it doesn't mean no-one ever needs to do it.
Don't forget that just because someone wants to do something it means that it is a good idea. Or even that it will solve their real problem.
|
|
|
|
|
jschell wrote: And you are suggesting that you would not do that when stopping as well?
Yes, becuase in my specific example, the internal state is related to a TCP connection, so maintaining and restoring the state across a stop / start event is meaninglesss.
jschell wrote: Don't forget that just because someone wants to do something it means that it is a good idea.
True. My reply was directed at the person who said (very unhelpfully in my opinion)
"I haven't had a need to do that and I can't imagine needing it."
|
|
|
|
|
I believe ServiceBase has a property called CanPauseAndContinue . Set it to true and then override the OnPause and OnContinue methods.
|
|
|
|
|
Hi Calla,
that sounds good.
Thanks
Frank
|
|
|
|
|
You're welcome!
|
|
|
|
|
Hi all developers.
Lately I started working on a library that allows to compose complex asynchronous operations from simple ones using LINQ syntax and extension methods. It can be found here. The idea itself was taken from F# asynchronous workflows, so I don't take any credit for the idea, just for the implementation.
The need occurred when I was working for a company that had an existing server that provided a known set of operations and we needed to write a UI client that the operations it wanted to perform were composition (sequential or parallel) of the server's operations. So instead of writing the ugly code with callbacks and exception handling we came up with this idea.
Here is a simple example for the library's usage:
Async<DataItem[]> operation =
from dataItems1 in provider1.AsyncGetDataItems("data items id")
from dataItems2 in provider2.AsyncGetDataItems(dataItems1)
select dataItems1.Concat(dataItems2).ToArray();
operation.Execute(CompletionCallback);
I would like you to try and and send me any feedback about the design/implementation and of course bug reports.
Thanks!
Alex.
P.S. I Googled it and found out that something already blogged about it. So other people came up with this idea too. I just didn't find a ready-to-use library that people can download and start using, so I decided to write one.
|
|
|
|
|
I want that check box in a datagridview should act like a radio button.Means whenever I select a checkbox it will be selected and rest of all would be deselect.
I have used cellContentClick event of the datagrid view.Structure of the datagridview is like-
1st column is checkbox and 2nd is text box.following is the code i have used-
for (int i = 0; i < dataGridView1.Rows.Count; i++)
{
if (i == e.RowIndex)
{
dataGridView1.Rows[i].Cells[0].Value = true;
}
else
{
dataGridView1.Rows[i].Cells[0].Value = false;
}
}
The above code runs good when i select another checkbox.But when one checkbox is selected/checked and now I again click on the same checkbox then it is deselected/unchecked.I want when the same checkbox is checked again it won't unchecked and remian checked.
How can I do this?
Thanks in adv....
|
|
|
|
|
If you must use checkboxes and not radiobuttons, then you could add something like the following to your call. You will of course want to add some better validation.
for( int i = 0; i < dataGridView1.Rows.Count; i++ )
{
CheckBox ctl = (CheckBox)dataGridView1.Rows[i].FindControl( "CheckBoxControlName" );
if( ctl != null )
{
ctl.Checked = ( i == e.RowIndex );
ctl.Enabled = !( i == e.RowIndex );
}
}
This would simply disable the currently selected checkbox while allowing any other to be selected.
(NOTE: I just hammered this out in the editor. If I have a syntax error or typo... sorry.)
modified on Wednesday, October 13, 2010 2:50 PM
|
|
|
|
|
You can do that by changing readonly property as below.
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
for (int i = 0; i < dataGridView1.Rows.Count; i++)
{
if (i == e.RowIndex)
{
dataGridView1.Rows[i].Cells[0].Value = true;
dataGridView1.Rows[i].Cells[0].ReadOnly = true;
}
else
{
dataGridView1.Rows[i].Cells[0].Value = false;
dataGridView1.Rows[i].Cells[0].ReadOnly = false;
}
}
}
|
|
|
|
|
Hi.
I created a User Control.In load event it adds some text Boxes on it.
I built it and added its DLL to my toolbox.
1:I want to change those Text box on the User Control at design time after adding it on my form.
2:Or when i add this user control to my form,I want that the text boxes on User Control be added on my form(Form1).Is it possible to write such code???
Thank you.
CanI
|
|
|
|
|
|
hey guys.. i have a problem..actually i saw many document about it and i applied on my project but i couldnt solve it..i want to transfer datas btw two forms..for example i open Form2 with a button in Form1
and i want to get the text of the textbox in Form2 as a text of textbox in Form1
to do that i wrote that codes below but still i have nothing
here i opened Form2
private void btnRehber_Click(object sender, EventArgs e)
{
Form2 rhbForm = new Form2();
rhbForm.txtYetkili_isim.Text = txtYetkili_adi.Text;
rhbForm.ShowDialog();
}
and here i filled the textboxes in Form2 and submit the values to the textboxes in Form1
private void btnEkle_Click(object sender, EventArgs e)
{
frmFirma = new Form1();
frmFirma.txtGsm1.Text = txtGsm1.Text;
frmFirma.txtGsm2.Text = txtGsm2.Text;
frmFirma.txtNumara.Text = txtNumara.Text;
}
do i make something wrong ? or is there another way ?
thanks guys for help
|
|
|
|
|
In Form1
public partial class Form1: Form
{
internal static string textboxdata = string.Emtpy;
public Form1()
{
InitializeComponent();
}
private void btnEkle_Click(object sender, EventArgs e)
{
textboxdata = txtGsm1.Text ;
}
}
in Form2 call this way
txtGsm1.Text = Form1.textboxdata ;
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.aktualiteti.com
|
|
|
|
|
Why suggest a static solution? Do you really think that is a good idea? If so, then perhaps you ought to re-read your C# books / lecture notes and brush up on basic OOP.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|