//private void dirButton_Click(object sender, RoutedEventArgs e) //{ // var dialog = new System.Windows.Forms.FolderBrowserDialog(); // var dialog = new FolderBrowserDialog(); // dirgambar = dialog.FileName; //} void dispatcherTimer_Tick(object sender, EventArgs e) { if (stopwatch.IsRunning && stopwatch.ElapsedMilliseconds / interval > intervalCount) { intervalCount = Convert.ToInt32(stopwatch.ElapsedMilliseconds / interval); if (konekin.statusKoneksi() && captureFlag) { try { table.Rows.Add( mySensorLog.No, float.Parse(lblKetinggian.Content.ToString()), float.Parse(lblTemperatur.Content.ToString()), float.Parse(lblTekanan.Content.ToString()), float.Parse(lblElevasi.Content.ToString()), //float.Parse(lblLatitude.Content.ToString()), //float.Parse(lblLongitude.Content.ToString()), float.Parse(lblYaw.Content.ToString()), float.Parse(lblPitch.Content.ToString()), float.Parse(lblRoll.Content.ToString())); SaveLog(); datagrid(); grafikBebas(); if (datagridLog.Items.Count > 0) { var border = VisualTreeHelper.GetChild(datagridLog, 0) as Decorator; if (border != null) { var scroll = border.Child as ScrollViewer; if (scroll != null) { scroll.ScrollToEnd(); } } } mySensorLog.No += (float)interval / 1000; } catch { } } } }