|
|
|
@ -86,12 +86,10 @@ namespace ICSharpCode.FormDesigner |
|
|
|
ITextEditorControlProvider textAreaControlProvider = (ITextEditorControlProvider)viewContent; |
|
|
|
ITextEditorControlProvider textAreaControlProvider = (ITextEditorControlProvider)viewContent; |
|
|
|
string fileExtension = String.Empty; |
|
|
|
string fileExtension = String.Empty; |
|
|
|
string fileName = viewContent.IsUntitled ? viewContent.UntitledName : viewContent.FileName; |
|
|
|
string fileName = viewContent.IsUntitled ? viewContent.UntitledName : viewContent.FileName; |
|
|
|
|
|
|
|
if (fileName == null) |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
fileExtension = Path.GetExtension(fileName).ToLower(); |
|
|
|
fileExtension = Path.GetExtension(fileName).ToLower(); |
|
|
|
} catch (Exception e) { |
|
|
|
|
|
|
|
Console.WriteLine(e); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch (fileExtension) { |
|
|
|
switch (fileExtension) { |
|
|
|
case ".cs": |
|
|
|
case ".cs": |
|
|
|
@ -136,11 +134,7 @@ namespace ICSharpCode.FormDesigner |
|
|
|
string fileExtension = String.Empty; |
|
|
|
string fileExtension = String.Empty; |
|
|
|
string fileName = viewContent.IsUntitled ? viewContent.UntitledName : viewContent.FileName; |
|
|
|
string fileName = viewContent.IsUntitled ? viewContent.UntitledName : viewContent.FileName; |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
fileExtension = Path.GetExtension(fileName).ToLower(); |
|
|
|
fileExtension = Path.GetExtension(fileName).ToLower(); |
|
|
|
} catch (Exception e) { |
|
|
|
|
|
|
|
Console.WriteLine(e); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!FormKeyHandler.inserted) { |
|
|
|
if (!FormKeyHandler.inserted) { |
|
|
|
FormKeyHandler.Insert(); |
|
|
|
FormKeyHandler.Insert(); |
|
|
|
|