private void btu_UploadMessageRepin_Click(object sender, RoutedEventArgs e) { try { ClGlobul.RepinMessagesList.Clear(); Microsoft.Win32.OpenFileDialog ofd = new Microsoft.Win32.OpenFileDialog(); ofd.DefaultExt = ".txt"; ofd.Filter = "Text documents (.txt)|*.txt"; Nullable <bool> result = ofd.ShowDialog(); if (result == true) { txtRepinMessage_Repin.Text = ofd.FileName.ToString(); } ClGlobul.RepinMessagesList = GlobusFileHelper.ReadFileForRepin(txtRepinMessage_Repin.Text.Trim()); GlobusLogHelper.log.Error(" => [ Total Message Uploaded : " + ClGlobul.RepinMessagesList.Count + " ]"); } catch (Exception ex) { GlobusLogHelper.log.Error("Error :" + ex.StackTrace); } }