private void Publish_Data_Click(object sender, RoutedEventArgs e) { using (FileStream DistanceFileWriter = System.IO.File.OpenWrite(StartTime.Month + "-" + StartTime.Day + "-" + StartTime.Year + " " + StartTime.Hour + "-" + StartTime.Minute + " movementtrack.xml")) { Write(("<movement date=\"" + StartTime.Month + "-" + StartTime.Day + "-" + StartTime.Year + " " + StartTime.Hour + "-" + StartTime.Minute + "\">"), DistanceFileWriter); while (TextData.Count > 0) { Write(TextData.Dequeue(), DistanceFileWriter); } while (SentenceData.Count > 0) { Write(SentenceData.Dequeue(), DistanceFileWriter); } while (WordData.Count > 0) { Write(WordData.Dequeue(), DistanceFileWriter); } while (PositionData.Count > 0) { Write(PositionData.Dequeue(), DistanceFileWriter); } Write("\r\n</movement>", DistanceFileWriter); System.Windows.Application.Current.Shutdown(); } }
private void Enter_Button_Click(object sender, RoutedEventArgs e) { SendKeys.SendWait("{Enter}"); string sentence = "\r\n\t<sentence>"; while (SentenceData.Count > 0) { sentence += SentenceData.Dequeue(); } sentence += "\r\n\t\t</sentence>"; TextData.Enqueue(sentence); SentenceData = new Queue <string>(); }
private void Enter_Button_Click(object sender, RoutedEventArgs e) { SendKeys.SendWait("{Enter}"); WordStack = new Stack <string>(); CenterBubble_Label.Content = ""; ReturnedToCenter = false; string sentence = "\r\n\t<sentence>"; while (SentenceData.Count > 0) { sentence += SentenceData.Dequeue(); } sentence += "\r\n\t\t</sentence>"; TextData.Enqueue(sentence); SentenceData = new Queue <string>(); BlueFlash = DateTime.Now; }