Skip to content

Commit 1c775ce

Browse files
committed
Added fastmode for the compatibility mode
1 parent 2d6ea94 commit 1c775ce

9 files changed

+648
-556
lines changed

AdbFileManager/App.config

+3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
<setting name="compatibility" serializeAs="String">
2323
<value>False</value>
2424
</setting>
25+
<setting name="compatibility_fast" serializeAs="String">
26+
<value>False</value>
27+
</setting>
2528
</AdbFileManager.Properties.Settings>
2629
</userSettings>
2730
</configuration>

AdbFileManager/CurrentCommit.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
c8f0967
1+
2d6ea94

AdbFileManager/Form1.Designer.cs

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

AdbFileManager/Form1.cs

+23-13
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public Form1() {
7474
Console.WindowHeight = 20;
7575
var handle = GetConsoleWindow();
7676
ShowWindow(handle, SW_HIDE);
77-
string versionn = $"{AdbFileManager.Properties.Resources.CurrentCommit.Trim()} B 09.02.24";
77+
string versionn = $"{AdbFileManager.Properties.Resources.CurrentCommit.Trim()} 19.02.24";
7878
version.Text = versionn;
7979
Console.WriteLine(versionn);
8080
}
@@ -105,7 +105,7 @@ public static string adb(string command) {
105105
return output;
106106
}
107107
private void verticalLabel1_Click(object sender, EventArgs e) {
108-
dataGridView1.DataSource = Functions.getDir(directoryPath, checkBox_android6fix.Checked);
108+
dataGridView1.DataSource = Functions.getDir(directoryPath, checkBox_android6fix.Checked, checkBox_android6fix_fastmode.Checked);
109109
}
110110

111111
private void explorerBrowser1_Load(object sender, EventArgs e) {
@@ -169,7 +169,7 @@ private void dataGridView1_CellMouseDoubleClick(object sender, DataGridViewCellM
169169
cur_path.Text = directoryPath;
170170
cur_path_modifyInternal = false;
171171
//MessageBox.Show(directoryPath);
172-
dataGridView1.DataSource = Functions.getDir(directoryPath, checkBox_android6fix.Checked);
172+
dataGridView1.DataSource = Functions.getDir(directoryPath, checkBox_android6fix.Checked, checkBox_android6fix_fastmode.Checked);
173173
}
174174
}
175175
}
@@ -203,7 +203,7 @@ private void android2pc_Click(object sender, EventArgs e) {
203203
File file = files[i];
204204
if(Functions.isFolder(file, checkBox_android6fix.Checked)) {
205205
Console.WriteLine("unwraping folder: " + file.name);
206-
DataTable newfiles_table = Functions.getDir(directoryPath + file.name, checkBox_android6fix.Checked);
206+
DataTable newfiles_table = Functions.getDir(directoryPath + file.name, checkBox_android6fix.Checked, checkBox_android6fix_fastmode.Checked);
207207
Console.WriteLine("removed folder status: " + files.Remove(file));
208208
List<File> newfiles = new List<File>();
209209
foreach(DataRow row in newfiles_table.Rows) {
@@ -297,7 +297,7 @@ void clickedFolder() {
297297
directoryPath = directoryPath + name + "/";
298298
cur_path.Text = directoryPath;
299299
//MessageBox.Show(directoryPath);
300-
dataGridView1.DataSource = Functions.getDir(directoryPath, checkBox_android6fix.Checked);
300+
dataGridView1.DataSource = Functions.getDir(directoryPath, checkBox_android6fix.Checked, checkBox_android6fix_fastmode.Checked);
301301
}
302302
}
303303
}
@@ -322,15 +322,15 @@ void goUpDirectory() {
322322
cur_path_modifyInternal = true;
323323
cur_path.Text = directoryPath;
324324
cur_path_modifyInternal = false;
325-
dataGridView1.DataSource = Functions.getDir(directoryPath, checkBox_android6fix.Checked);
325+
dataGridView1.DataSource = Functions.getDir(directoryPath, checkBox_android6fix.Checked, checkBox_android6fix_fastmode.Checked);
326326
}
327327
private void timer1_Tick(object sender, EventArgs e) {
328328
Console.WriteLine("timer ticked");
329329

330330
timer1.Stop();
331331
timer1.Enabled = false;
332332

333-
dataGridView1.DataSource = Functions.getDir(directoryPath, checkBox_android6fix.Checked);
333+
dataGridView1.DataSource = Functions.getDir(directoryPath, checkBox_android6fix.Checked, checkBox_android6fix_fastmode.Checked);
334334

335335
cur_path_modifyInternal = true;
336336
cur_path.Text = directoryPath;
@@ -369,7 +369,7 @@ private void cur_path_TextChanged(object sender, EventArgs e) {
369369
return;
370370
}
371371
directoryPath = cur_path.Text;
372-
dataGridView1.DataSource = Functions.getDir(directoryPath, checkBox_android6fix.Checked);
372+
dataGridView1.DataSource = Functions.getDir(directoryPath, checkBox_android6fix.Checked, checkBox_android6fix_fastmode.Checked);
373373
}
374374

375375
private void Form1_Load(object sender, EventArgs e) {
@@ -455,6 +455,7 @@ private void save_settings() {
455455
Properties.Settings.Default.smooth_progressbar = checkBox_unwrapfolders.Checked;
456456
Properties.Settings.Default.keep_modification_date = checkBox_filedate.Checked;
457457
Properties.Settings.Default.compatibility = checkBox_android6fix.Checked;
458+
Properties.Settings.Default.compatibility_fast = checkBox_android6fix_fastmode.Checked;
458459

459460
Properties.Settings.Default.lang = (ushort)comboBox_lang.SelectedIndex;
460461
Properties.Settings.Default.Save();
@@ -464,6 +465,7 @@ private void load_settings() {
464465
checkBox_unwrapfolders.Checked = Properties.Settings.Default.smooth_progressbar;
465466
checkBox_filedate.Checked = Properties.Settings.Default.keep_modification_date;
466467
checkBox_android6fix.Checked = Properties.Settings.Default.compatibility;
468+
checkBox_android6fix_fastmode.Checked = Properties.Settings.Default.compatibility_fast;
467469
comboBox_lang.SelectedIndex = Properties.Settings.Default.lang;
468470
}
469471
private void load_lang_combobox() {
@@ -547,6 +549,10 @@ private void button_forward_Click(object sender, EventArgs e) {
547549
explorerBrowser1.NavigateLogLocation(NavigationLogDirection.Forward);
548550
}
549551

552+
private void checkBox_android6fix_CheckedChanged(object sender, EventArgs e) {
553+
if(checkBox_android6fix.Checked) checkBox_android6fix_fastmode.Visible = true;
554+
else checkBox_android6fix_fastmode.Visible = false;
555+
}
550556
}
551557

552558
public static class Functions {
@@ -557,21 +563,25 @@ public static class Functions {
557563
public static string[] documentExtensions = { ".docx", ".pdf", ".txt", ".pptx", ".xlsx", ".odt", ".rtf" };
558564
public static string[] archiveExtensions = { ".zip", ".rar", ".7z", ".tar", ".gz", ".bz2", ".xz" };
559565
public static string[] executableExtensions = { ".exe", ".dll", ".bat", ".msi", ".jar", ".py", ".sh", ".apk" };
560-
566+
static bool fastcompatibility = false;
561567
public static bool isFolder(string path, bool old_android) {
562-
if(old_android) return legacyAndroid.isFolder(path);
568+
if(old_android) return legacyAndroid.isFolder(path, fastcompatibility);
563569
if(path == null) return false;
564570
if(path.ToLower().Trim()[0] == 'd') return true; //the first character of the line is 'd' if it's a directory
565571
else return false;
566572
}
567573
public static bool isFolder(File file, bool old_android) {
568-
if(old_android) return legacyAndroid.isFolder(file);
574+
if(old_android) return legacyAndroid.isFolder(file, fastcompatibility);
569575
if(file.permissions.ToLower().Trim()[0] == 'd') return true; //the first character of the line is 'd' if it's a directory
570576
else return false;
571577
}
572578

573-
public static DataTable getDir(string directoryPath, bool old_android) {
574-
if(old_android) return legacyAndroid.getDir(directoryPath);
579+
public static DataTable getDir(string directoryPath, bool old_android, bool old_android_fast) {
580+
if(old_android) {
581+
fastcompatibility = old_android_fast;
582+
legacyAndroid.fastcompatibility = old_android_fast;
583+
return legacyAndroid.getDir(directoryPath);
584+
}
575585

576586
// Retrieve a list of files in the specified directory
577587

AdbFileManager/Form1.en.resx

+34-13
Original file line numberDiff line numberDiff line change
@@ -150,15 +150,6 @@
150150
<data name="panel1.AutoSize" type="System.Boolean, mscorlib">
151151
<value>False</value>
152152
</data>
153-
<data name="panel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
154-
<value>Fill</value>
155-
</data>
156-
<data name="panel1.Location" type="System.Drawing.Point, System.Drawing">
157-
<value>0, 0</value>
158-
</data>
159-
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
160-
<value>1184, 533</value>
161-
</data>
162153
<data name="button_back.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
163154
<value>Flat</value>
164155
</data>
@@ -201,18 +192,48 @@
201192
<data name="panel3.Size" type="System.Drawing.Size, System.Drawing">
202193
<value>54, 205</value>
203194
</data>
204-
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
205-
<value>0, 509</value>
195+
<data name="checkBox_android6fix_fastmode.AutoSize" type="System.Boolean, mscorlib">
196+
<value>True</value>
206197
</data>
207-
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
208-
<value>1184, 25</value>
198+
<data name="checkBox_android6fix_fastmode.Size" type="System.Drawing.Size, System.Drawing">
199+
<value>151, 19</value>
200+
</data>
201+
<data name="checkBox_android6fix_fastmode.Text" xml:space="preserve">
202+
<value>Fast compatiblity mode</value>
203+
</data>
204+
<data name="checkBox_android6fix_fastmode.Visible" type="System.Boolean, mscorlib">
205+
<value>False</value>
209206
</data>
210207
<data name="comboBox_lang.Location" type="System.Drawing.Point, System.Drawing">
211208
<value>958, 4</value>
212209
</data>
213210
<data name="comboBox_lang.Size" type="System.Drawing.Size, System.Drawing">
214211
<value>83, 23</value>
215212
</data>
213+
<data name="checkBox_unwrapfolders.Location" type="System.Drawing.Point, System.Drawing">
214+
<value>343, 3</value>
215+
</data>
216+
<data name="checkBox_preview.Location" type="System.Drawing.Point, System.Drawing">
217+
<value>162, 3</value>
218+
</data>
219+
<data name="checkBox_android6fix.Location" type="System.Drawing.Point, System.Drawing">
220+
<value>501, 4</value>
221+
</data>
222+
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
223+
<value>0, 509</value>
224+
</data>
225+
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
226+
<value>1184, 25</value>
227+
</data>
228+
<data name="panel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
229+
<value>Fill</value>
230+
</data>
231+
<data name="panel1.Location" type="System.Drawing.Point, System.Drawing">
232+
<value>0, 0</value>
233+
</data>
234+
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
235+
<value>1184, 533</value>
236+
</data>
216237
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
217238
<value>1184, 533</value>
218239
</data>

0 commit comments

Comments
 (0)