|
I'm not sure what effect you are trying to achieve. ObservableCollection does not raise an PropertyChanged event - it raises events from INotifyCollectionChanged . What you could do, is inherit from ObservationChanged , and override the OnChanged method - and use this to raise a PropertyChanged event.
I hope that helps.
|
|
|
|
|
According to the documentation[^], ObservableCollection also implements INotifyPropertyChanged, but explicitly (i.e. requiring a cast to hook to).
|
|
|
|
|
Hi Pete, Thanks for responding !
As Bob says, in the post just above this one, ObservableCollection<t> does implement INotifyPropertyChanged, and my whole problem here was finding the way to use facility.
I think the best thing for me to do now, as I just wrote to Bob, in order to clarify what I have found, and get reactions, is to go ahead and write up a Tip/Trick demonstrating fully what I started out to do, what the problem was I encountered in trying to do it, and what the 'odd' solution was that I finally came up with.
Then, if the Tip/Trick leads to great gnashing of teeth, and I am cast into outer darkness, so be it.
best, Bill
"In the River of Delights, Panic has not failed me." Jorge Luis Borges
|
|
|
|
|
process = Process.Start(psi);
process.WaitForExit(executionTimeOutSecs * 1000);
if (!process.HasExited)
{
StringBuilder text = new StringBuilder();
text.AppendFormat("Having to kill {0}, executed longer than timeout value, {1} sec.", taskName,
executionTimeOutSecs);
if (logging)
{
log.writeLogFile(text.ToString());
}
log.writeEventLogWarning(text.ToString());
process.Kill();
process.WaitForExit(1000);
}
process.Close();
Here i am getting "hasexited" false my process not exited in given time how to handle this.
|
|
|
|
|
Properly format your code snippet and people may answer you
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
process = Process.Start(psi);
process.WaitForExit(executionTimeOutSecs * 1000); // convert seconds to milliseconds
if (!process.HasExited)
{
StringBuilder text = new StringBuilder();
text.AppendFormat("Having to kill {0}, executed longer than timeout value, {1} sec.", taskName,
executionTimeOutSecs);
}
process.Close();
I think this is ok here Hasexited is retur nfalse i want to avoid this
|
|
|
|
|
I said FORMAT the code snippet not REPOST it.
Read the forum guidelines, that post at the top of this list that you have ignored.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
The code which i pasted is enough to answer
see the question "How to get answer" and try to help developer
|
|
|
|
|
Don't get cocky son. If you want to help here, follow the rules.
It is your responsibility to read, understand and comply with the posting guidelines. If you do this can be a very rewarding experience for you and us.
You were asked to format the code snippet according to the guidelines. You choose to ignore it and simple repost the same thing. You get back the same effort you've given.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Read "how to answer a question" carefully and try to help
if you dont want to help keep quiet
|
|
|
|
|
If you want help from people, it's not a good idea to tell them to keep quiet. Questions in the forums are answered by volunteers, so antagonising them doesn't help - more importantly, the regulars tend to band together, so having a go at one is a poor way to get others to help you.
|
|
|
|
|
i dont like critisizing the people that is the reason i said like that
if i know the answer sure i will give i expect other people also
|
|
|
|
|
Man, you should have posted your code in code block like below.
process = Process.Start(psi);
process.WaitForExit(executionTimeOutSecs * 1000);
if (!process.HasExited)
{
StringBuilder text = new StringBuilder();
text.AppendFormat("Having to kill {0}, executed longer than timeout value, {1} sec.", taskName,
executionTimeOutSecs);
if (logging)
{
log.writeLogFile(text.ToString());
}
log.writeEventLogWarning(text.ToString());
process.Kill();
process.WaitForExit(1000);
}
process.Close();
But you posted the same un-formatted code in new message which is ugly one & against the rule. BTW He suggested you the same in his message like what I did now.
|
|
|
|
|
sorry really i dont know how to do all these things just i got the problem i posted
|
|
|
|
|
pprasanthk wrote: Here i am getting "hasexited" false my process not exited in given time how to
handle this
Depends on what you need.
You can wait longer or kill the process.
|
|
|
|
|
Exactly but client is doing process.kill in process.hasexited condition
is there any way to wait for exit other than calling oveloaded of process.waitforexit()
|
|
|
|
|
I don't understand that response.
Rephrasing what I said before...
Given that you have a process X.
If you are waiting for it to complete your choices are to continue to wait or kill it.
A variation on that it to modify X such that you can send a command to it that causes it to terminate itself. That however isn't really a solution because after you do that you are still left with the solution above to either wait or kill it.
There are no other options.
This of course presumes that you understand that you could just continue to wait by looping on the has exited value.
|
|
|
|
|
how to get the time sheet management project in windows application?
|
|
|
|
|
1. Purchase any existing product.
2. Pay someone to write it for you.
3. Write it yourself.
4. Search web for freely available products.
"The worst code you'll come across is code you wrote last year.", wizardzz[ ^]
|
|
|
|
|
Check this CodeProjectForums .com
|
|
|
|
|
This question is asked so often that Microsoft made a starter kit[^], and they got an article on extending that starter kit here[^].
Bastard Programmer from Hell
|
|
|
|
|
Anybody know how to create Paging facility in ASP CheckboxList ?????
|
|
|
|
|
I don't think CheckBoxList supports paging. It is a simple control intended to help users make multiple selections. If the list is too long, try putting it in a DIV with overflow set to auto.
Alternatively, you can try using a GridView with a template column for the checkbox.
|
|
|
|
|
how to combine two dataset to one xml file
and how to read this after ?
i have this:
dsView1 = new DataSet("1");
SQL = "SELECT * FROM ConfTbl";
adp = new OleDbDataAdapter(SQL, Conn);
adp.Fill(dsView1, "ConfTbl");
adp.Dispose();
dsView2 = new DataSet("2");
SQL = "SELECT * FROM DipTbl";
adp = new OleDbDataAdapter(SQL, Conn);
adp.Fill(dsView2, "ConfTbl");
adp.Dispose();
dsView.WriteXml(@"d:\Test.xml");
how to combine dsView1 and dsView2 to one dataset, that i have table[0] and table[1]
thanks in advance
|
|
|
|
|