Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>where do you call the method <code>getEventTime</code> and what is <code>notLabel</code>.</p> <p>if the method <code>getEventTime</code> is called and set the <code>notLabel.Text</code> but after that the text is set again to <code>string.Empty</code> that there is the problem, so you should probably search or debug every change to <code>notLabel.Text</code>.</p> <p>are you sure the it is <code>notLabel</code> the it is shown in the form? you can check that by registering to the <code>mouseDown</code> event and see that it is called when you click on the Label</p> <p>one more thing, add <code>break;</code> after your line </p> <pre><code>status = true; </code></pre> <p>go to the design and press the label, press F4 and search the <code>name</code> property, i bet it is not <code>notLabel</code>:</p> <p><img src="https://i.stack.imgur.com/YhCvu.png" alt="enter image description here"></p> <p><strong>EDIT</strong></p> <p>i think i fount your problem</p> <p>correct me if i'm wrong but this lines</p> <pre><code> if (status) { //show Notification Form Form NotificationForm = new Notification(); NotificationForm.Visible = true; } </code></pre> <p>are happening after you change the text... when what you meant is:</p> <pre><code>public void getEventTime(string filePath, string currDate, string currentDateTimeHM) { Form NotificationForm = new Notification(); //reading the *.csv file and convert to the array of data FileStream fs = new FileStream(filePath, FileMode.Open, FileAccess.Read); StreamReader sr = new StreamReader(fs); //create array for getting any vlaue from string string[] arrOfData = sr.ReadToEnd().Split(new string[] { Environment.NewLine }, StringSplitOptions.None); sr.Close(); List&lt;string&gt; lines = new List&lt;string&gt;(); bool status=false;//variable for showing form if event exist foreach (var l in arrOfData) { if (l.Contains(currDate) &amp;&amp; l.Contains(currentDateTimeHM)) { string[] temp = l.Split(',').Take(5).ToArray(); NotificationForm.NotText = temp[1].ToString(); status = true; } } if (status) { //show Notification Form NotificationForm.Visible = true; } } </code></pre> <p>and in the notification form do</p> <pre><code> public string NotText { set { notLabel.Text = value; } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload