mirror of
https://onedev.site.tesses.net/crosslang/crosslangdevstudio
synced 2026-02-08 09:15:45 +00:00
Add alacritty
This commit is contained in:
@@ -556,7 +556,7 @@ public partial class MainWindowViewModel : ViewModelBase
|
||||
}
|
||||
}
|
||||
|
||||
static string[] FILE_EXTS = new string[]{
|
||||
static string[] FILE_EXTS = {
|
||||
".tcross",
|
||||
".json",
|
||||
".txt",
|
||||
@@ -575,18 +575,37 @@ public partial class MainWindowViewModel : ViewModelBase
|
||||
".ts",
|
||||
".tsx",
|
||||
".gitignore",
|
||||
".svg"
|
||||
".svg",
|
||||
".md",
|
||||
".yaml",
|
||||
".yml",
|
||||
".toml",
|
||||
".tcasm",
|
||||
".dart",
|
||||
".bat",
|
||||
".sh",
|
||||
".lua",
|
||||
".java",
|
||||
".ini",
|
||||
".go",
|
||||
".crossarchiveignore"
|
||||
};
|
||||
|
||||
public void OpenFile(string path)
|
||||
{
|
||||
bool isValid = false;
|
||||
string ext = Path.GetExtension(path).ToLower();
|
||||
|
||||
foreach (var item in FILE_EXTS)
|
||||
{
|
||||
if (ext == item)
|
||||
isValid = true;
|
||||
}
|
||||
if (Path.GetFileNameWithoutExtension(path).ToLower() == "dockerfile")
|
||||
isValid = true;
|
||||
if (Path.GetFileNameWithoutExtension(path).ToLower() == "makefile")
|
||||
isValid = true;
|
||||
|
||||
if (!isValid)
|
||||
{
|
||||
OpenOtherFile(path, ext);
|
||||
|
||||
Reference in New Issue
Block a user