private void btnCSharpGenerator_Click(object sender, RoutedEventArgs e) { string str = new CSharpCodeGenerator().GeneratorCode(); if (!string.IsNullOrEmpty(str) && FileWriter.WriteToDisk(str, "LocationHandler")) { MessageBox.Show("Location Handler C# Sharp Code Generated"); } else { MessageBox.Show("OOPs!! There's nothing to create..."); } }