-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
196 additions
and
26 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
Para abrir terminais usando a classe `Process` em C#, | ||
você pode especificar o executável do terminal desejado como o processo a ser iniciado. | ||
Abaixo estão exemplos de como abrir terminais em diferentes sistemas operacionais usando C#: | ||
|
||
1. **Abrir o Prompt de Comando no Windows**: | ||
```csharp | ||
using System.Diagnostics; | ||
|
||
class Program | ||
{ | ||
static void Main() | ||
{ | ||
Process.Start("cmd.exe"); | ||
} | ||
} | ||
``` | ||
|
||
2. **Abrir o PowerShell no Windows**: | ||
```csharp | ||
using System.Diagnostics; | ||
|
||
class Program | ||
{ | ||
static void Main() | ||
{ | ||
Process.Start("powershell.exe"); | ||
} | ||
} | ||
``` | ||
|
||
3. **Abrir o Terminal no macOS**: | ||
```csharp | ||
using System.Diagnostics; | ||
|
||
class Program | ||
{ | ||
static void Main() | ||
{ | ||
Process.Start("open", "-a Terminal"); | ||
} | ||
} | ||
``` | ||
|
||
4. **Abrir o GNOME Terminal no Linux (Ubuntu)**: | ||
```csharp | ||
using System.Diagnostics; | ||
|
||
class Program | ||
{ | ||
static void Main() | ||
{ | ||
Process.Start("gnome-terminal"); | ||
} | ||
} | ||
``` | ||
|
||
Lembre-se de que, ao abrir um terminal dessa maneira, ele será iniciado como um processo separado e | ||
independente do seu aplicativo C#. Você pode personalizar ainda mais a inicialização do terminal, | ||
passando argumentos adicionais, se necessário, usando a sobrecarga de `Process.Start` que aceita uma string de argumentos. | ||
Certifique-se de lidar com exceções ao trabalhar com a classe `Process`, pois pode haver erros de execução ou permissões | ||
insuficientes, dependendo do sistema operacional e das configurações. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Unity Editor Terminal | ||
## EN-US | ||
#### ⚠️ Attention | ||
> The development of this package is done during my free time.</br> | ||
> If you encounter any bugs and go through the ritual of opening an issue, depending on my available free time, I will act as justice, which may be slow but never fails.</br> | ||
> And if you have feedback, just open an issue as well. | ||
### Installation | ||
<br>Installation using scoped registries.</br> | ||
<br>![](Documentation~/Image/install_npm_NoWarng.png)</br> | ||
<br>Installation using add package from git url.</br> | ||
<br>![](Documentation~/Image/install_github_NoWarng.png)</br> | ||
### Usage Mode | ||
<br>The <kbd>Set</kbd> button is used to set the <kbd>WorkingDirectory</kbd> of the command prompt.</br> | ||
<br>![](Documentation~/Image/UseMode1.png)</br> | ||
<br>The <kbd>Terminal</kbd> popup defines which command prompt will be used.</br> | ||
<br>![](Documentation~/Image/UseMode2.png)</br> | ||
<br>Just use the terminal to enter any command, and it will take care of the rest.</br> | ||
<br>![](Documentation~/Image/UseMode3.png)</br> | ||
|
||
##### [If you'd like to help me](https://www.paypal.com/donate/?business=VN4RAWDSA2PBA&no_recurring=0¤cy_code=BRL) | ||
## PT-BR | ||
#### ⚠️ Atenção | ||
> O desenvolvimento deste pacote é feito durante meu tempo liver.</br> | ||
> Se econtrar algum bug e aquele ritual abrir uma issues, dependendo</br> | ||
> tempo liver que eu tenha agirei que nem a justiça tarda mas não falha.</br> | ||
> E se tiver um feedback e só abrir um issues também. | ||
### Instalação | ||
<br>Instalação usando scoped registries.</br> | ||
<br>![](Documentation~/Image/install_npm_NoWarng.png)</br> | ||
<br>Instalação usando add package from git url.</br> | ||
<br>![](Documentation~/Image/install_github_NoWarng.png)</br> | ||
### Modo de uso | ||
<br>O botão <kbd>Set</kbd> é usado para definir o <kbd>WorkingDirectory</kbd> do prompt de comando.</br> | ||
<br>![](Documentation~/Image/UseMode1.png)</br> | ||
<br>O popup <kbd>Terminal</kbd> define qual prompt de comando vai ser usado.</br> | ||
<br>![](Documentation~/Image/UseMode2.png)</br> | ||
<br>Já terminal e só passar algum comando que ele se encarrega do resto.</br> | ||
<br>![](Documentation~/Image/UseMode3.png)</br> | ||
|
||
##### [Caso queira me ajudar](https://www.paypal.com/donate/?business=VN4RAWDSA2PBA&no_recurring=0¤cy_code=BRL) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters