Skip to content

Commit

Permalink
disabled deletion of datagrid rows, making it seem that files can be …
Browse files Browse the repository at this point in the history
…deleted
  • Loading branch information
T0biasCZe committed Dec 2, 2023
1 parent fd69436 commit a251209
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 8 deletions.
42 changes: 36 additions & 6 deletions AdbFileManager/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 29 additions & 2 deletions AdbFileManager/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
using Microsoft.WindowsAPICodePack.Shell;
using System.Diagnostics;
using System.IO;
using System.Runtime.InteropServices;
using System.Reflection.Metadata;

namespace AdbFileManager {
public partial class Form1 : Form {
Expand All @@ -32,7 +34,9 @@ public Form1() {
dataGridView1.Columns[3].Width = 115;

//set Console app codepage to UTF-8.
Console.OutputEncoding = System.Text.Encoding.UTF8;
Console.OutputEncoding = System.Text.Encoding.UTF8;
var handle = GetConsoleWindow();
ShowWindow(handle, SW_HIDE);
}

public static string adb(string command) {
Expand Down Expand Up @@ -235,6 +239,29 @@ private void explorer_path_KeyPress(object sender, KeyPressEventArgs e) {
}
}
}

private void version_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) {
Process.Start("explorer.exe", "https://github.com/T0biasCZe/AdbFileManager");
}
[DllImport("kernel32.dll")]
static extern IntPtr GetConsoleWindow();

[DllImport("user32.dll")]
static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);

const int SW_HIDE = 0;
const int SW_SHOW = 5;
bool console_shown = false;
private void button1_Click(object sender, EventArgs e) {
console_shown = !console_shown;
var handle = GetConsoleWindow();
if(console_shown) {
ShowWindow(handle, SW_SHOW);
}
else {
ShowWindow(handle, SW_HIDE);
}
}
}

public static class Functions {
Expand Down Expand Up @@ -383,7 +410,7 @@ public static string[] CustomSplit(string text, char delimiter) {
return result;
}
}
public static class Icons {
public static class Icons {
public static Icon folder_image = new Icon(@"icons\folder_image.ico");
public static Icon folder_downloads = new Icon(@"icons\folder_downloads.ico");
public static Icon folder_music = new Icon(@"icons\folder_music.ico");
Expand Down

0 comments on commit a251209

Please sign in to comment.