void logcatmoclick(object sender, RoutedEventArgs e)
 {
     frmlogcatmo logcatmo = new frmlogcatmo();
      logcatmo.Width = this.ActualWidth;
      logcatmo.Height = this.ActualHeight;
      logcatmo.Show();
 }
 private void FindButton_Click(object sender, RoutedEventArgs e)
 {
     if (txttim.Text.Trim() != "")
     {
         frmlogcatmo logcatmo = new frmlogcatmo();
         logcatmo.txttim.Text = txttim.Text.Trim();
         logcatmo.Width = this.ActualWidth;
         logcatmo.Height = this.ActualHeight;              
         this.Hide();
         logcatmo.Show();
     }
 }