c# - Using Timer to detect changes -
UPDATE: I added my code to show the whole process and somehow my continuity
my 3 items are listed in the pass list and there is a You do not need a timer at all. In your case, the problem is this: when you want to do something, the price list of your item changes in view. The word "event" is here. Subscribe to an event in your list view, choose. I think the "AfterLabelEdit" event in that list is searching for you. Here are some clues, you should customize the code in your specific context: Generally speaking, there is almost no easy UI handling case where the timer is required. Just use the event in the "list view list point" using the timer, looks like: "I see that something changes. If not, then I will check again in a few milliseconds. I am very busy. " The argument (better) with the incident is:" Hey, all of you control: when something changes ... post me! " < / Html> if statement that indicates that if my
subtitle is
inactive code inside a file will generate a problem Once
inactive item / s is
active again, how do I redo my timer?
Private Zero form1_load (object sender, event events e) {timer 2. Enchanted = true; } Private zero current_process () {process [] process = process. GetPrices ("ITWORKSPC152"); For (int i = 0; i
listView1.AfterLabelEdit + = (o, e) => {If (listView1.SelectedItems == faucet || listView1.selectedItems.Count == 0) Return; Var item = List view 1. Selected items [0]; If (item.SubItems = Null & amp; & amp; Item.SubItems.Count & gt; 1 & amp; amp; Item.SubItems [1] .text == "Inactive") {richTextBox1.Text = richTextBox1. Text + item.Text + "was inactive" + date time.Now To string ( "hh ':' mm tt ') +" \ n "; File.AppendAllText (@" C: \ Documents and Settings \ pamojica \ My Documents \ InactiveProgramLogs \ "+ lbl_date.Text +" .txt ", RichTextBox1 .Text);}};
Comments
Post a Comment