Autor Beitrag
csharpuser1
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 51



BeitragVerfasst: Do 02.02.17 10:57 
Guten Tag,

ich würde gerne eine .c Datei in meinem WPF-Tool mit c# anzeigen lassen. Dies funktioniert auch super mit

ausblenden C#-Quelltext
1:
Process.Start("notepad.exe",@"C:\..\test.c");					


Es öffnet sich dann Notepad.exe mit der Datei.

NUn meine Frage: Gibt es eine Möglichkeit, wie ich die Test.c innerhalb meiner wpf-anwendung in einem neuen Tab vom Tab Control öffnen lassen kann?

Grüße

PS: Was mir dazu nur einfallen würde ist File.ReadallLines in einer Textbox abspeichern --> falls änderungen gespeichert werden sollen einfach den text aus der textdatei abspeichern als .c.
Gibt aber bestimmt eine bessere Lösung?

Moderiert von user profile iconTh69: C#-Tags hinzugefügt
Ralf Jansen
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 4700
Erhaltene Danke: 991


VS2010 Pro, VS2012 Pro, VS2013 Pro, VS2015 Pro, Delphi 7 Pro
BeitragVerfasst: Do 02.02.17 11:16 
Zitat:
Gibt aber bestimmt eine bessere Lösung?


Nö. Es gibt andere Lösungen aber eher nicht prinzipiell bessere.
Th69
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Moderator
Beiträge: 4764
Erhaltene Danke: 1052

Win10
C#, C++ (VS 2017/19/22)
BeitragVerfasst: Do 02.02.17 12:12 
Hallo csharpuser1,

was glaubst du denn, wie Notepad arbeitet?