Update v0.2

This commit is contained in:
LabodiDavid 2020-03-20 00:56:04 +01:00
parent c8011d5603
commit c93dfc6413
7 changed files with 185 additions and 23 deletions

22
AboutFrm.Designer.cs generated
View File

@ -33,17 +33,18 @@
this.label2 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label();
this.VersionLabel = new System.Windows.Forms.Label(); this.VersionLabel = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label();
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
this.SuspendLayout(); this.SuspendLayout();
// //
// label1 // label1
// //
this.label1.AutoSize = true; this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.label1.Location = new System.Drawing.Point(12, 9); this.label1.Location = new System.Drawing.Point(108, 9);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(375, 24); this.label1.Size = new System.Drawing.Size(195, 24);
this.label1.TabIndex = 0; this.label1.TabIndex = 0;
this.label1.Text = "DIT - Filename Reader - Fájlnév olvasó"; this.label1.Text = "DIT - Fájlnév olvasó";
// //
// label2 // label2
// //
@ -67,17 +68,29 @@
// label4 // label4
// //
this.label4.AutoSize = true; this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(13, 121); this.label4.Location = new System.Drawing.Point(2, 153);
this.label4.Name = "label4"; this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(195, 13); this.label4.Size = new System.Drawing.Size(195, 13);
this.label4.TabIndex = 3; this.label4.TabIndex = 3;
this.label4.Text = "Készítette: Lábodi Dávid - DIT Services"; this.label4.Text = "Készítette: Lábodi Dávid - DIT Services";
// //
// linkLabel1
//
this.linkLabel1.AutoSize = true;
this.linkLabel1.Location = new System.Drawing.Point(309, 153);
this.linkLabel1.Name = "linkLabel1";
this.linkLabel1.Size = new System.Drawing.Size(72, 13);
this.linkLabel1.TabIndex = 4;
this.linkLabel1.TabStop = true;
this.linkLabel1.Text = "dit-services.tk";
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
//
// AboutFrm // AboutFrm
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(393, 175); this.ClientSize = new System.Drawing.Size(393, 175);
this.Controls.Add(this.linkLabel1);
this.Controls.Add(this.label4); this.Controls.Add(this.label4);
this.Controls.Add(this.VersionLabel); this.Controls.Add(this.VersionLabel);
this.Controls.Add(this.label2); this.Controls.Add(this.label2);
@ -97,5 +110,6 @@
private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label VersionLabel; private System.Windows.Forms.Label VersionLabel;
private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label4;
private System.Windows.Forms.LinkLabel linkLabel1;
} }
} }

View File

@ -13,6 +13,7 @@ namespace DIT_FileNameReader
{ {
public partial class AboutFrm : Form public partial class AboutFrm : Form
{ {
public AboutFrm() public AboutFrm()
{ {
System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly(); System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly();
@ -20,9 +21,35 @@ namespace DIT_FileNameReader
string version = fvi.FileVersion; string version = fvi.FileVersion;
InitializeComponent(); InitializeComponent();
this.VersionLabel.Text = version; this.VersionLabel.Text = version;
this.Text = "DIT - Filename Reader - About"; initializeLanguages();
} }
private void initializeLanguages()
{
if (MainFrm.selectedLang==1)
{
AboutHungary();
}
if (MainFrm.selectedLang ==0)
{
AboutEnglish();
}
}
private void AboutHungary()
{
this.Text = "DIT - Fájlnév olvasó - About";
this.label1.Text = "DIT - Fájlnév olvasó";
this.label2.Text = "Verzió:";
this.label4.Text = "Készítette: Lábodi Dávid - DIT Services";
}
private void AboutEnglish()
{
this.Text = "DIT - Filename Reader - About";
this.label1.Text = "DIT - Filename Reader";
this.label2.Text = "Version:";
this.label4.Text = "Created by: Lábodi Dávid - DIT Services";
}
private void AboutFrm_Load(object sender, EventArgs e) private void AboutFrm_Load(object sender, EventArgs e)
{ {
@ -33,5 +60,10 @@ namespace DIT_FileNameReader
this.MinimumSize = new System.Drawing.Size(this.Width, this.Height); this.MinimumSize = new System.Drawing.Size(this.Width, this.Height);
this.MaximumSize = new System.Drawing.Size(this.Width, this.Height); this.MaximumSize = new System.Drawing.Size(this.Width, this.Height);
} }
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
System.Diagnostics.Process.Start("http://dit-services.tk");
}
} }
} }

7
Changelog.md Normal file
View File

@ -0,0 +1,7 @@
# DIT - Filename Reader - Changelog
## v0.2
[HU] - Angol nyelvi fordítás hozzáadva
[EN] - Added english translation
[HU] - Kisebb kód javítások.
[EN] - Minor code fixes.

47
MainFrm.Designer.cs generated
View File

@ -42,6 +42,8 @@
this.label3 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label();
this.linkLabel1 = new System.Windows.Forms.LinkLabel(); this.linkLabel1 = new System.Windows.Forms.LinkLabel();
this.label5 = new System.Windows.Forms.Label();
this.LanguageBox = new System.Windows.Forms.ListBox();
this.SuspendLayout(); this.SuspendLayout();
// //
// FilenamesBox // FilenamesBox
@ -110,11 +112,11 @@
// //
this.label2.AutoSize = true; this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.label2.Location = new System.Drawing.Point(208, 9); this.label2.Location = new System.Drawing.Point(287, 9);
this.label2.Name = "label2"; this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(377, 24); this.label2.Size = new System.Drawing.Size(225, 24);
this.label2.TabIndex = 6; this.label2.TabIndex = 6;
this.label2.Text = "DIT - FileName Reader / Fájlnév olvasó"; this.label2.Text = "DIT - FileName Reader";
// //
// CriteriumBox // CriteriumBox
// //
@ -167,11 +169,31 @@
this.linkLabel1.Text = "Részletek.."; this.linkLabel1.Text = "Részletek..";
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
// //
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(1, 392);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(91, 13);
this.label5.TabIndex = 12;
this.label5.Text = "Nyelv (Language)";
//
// LanguageBox
//
this.LanguageBox.FormattingEnabled = true;
this.LanguageBox.Location = new System.Drawing.Point(4, 408);
this.LanguageBox.Name = "LanguageBox";
this.LanguageBox.Size = new System.Drawing.Size(88, 30);
this.LanguageBox.TabIndex = 13;
this.LanguageBox.SelectedIndexChanged += new System.EventHandler(this.LanguageBox_SelectedIndexChanged);
//
// MainFrm // MainFrm
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450); this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.LanguageBox);
this.Controls.Add(this.label5);
this.Controls.Add(this.linkLabel1); this.Controls.Add(this.linkLabel1);
this.Controls.Add(this.label4); this.Controls.Add(this.label4);
this.Controls.Add(this.label3); this.Controls.Add(this.label3);
@ -194,20 +216,21 @@
} }
#endregion #endregion
private System.Windows.Forms.TextBox FilenamesBox;
private System.Windows.Forms.FolderBrowserDialog DirectoryDialog; private System.Windows.Forms.FolderBrowserDialog DirectoryDialog;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.CheckBox checkBox2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
public System.Windows.Forms.Button button1; public System.Windows.Forms.Button button1;
public System.Windows.Forms.TextBox DirectoryBox; public System.Windows.Forms.TextBox DirectoryBox;
public System.Windows.Forms.CheckBox checkBox1; public System.Windows.Forms.CheckBox checkBox1;
public System.Windows.Forms.TextBox CriteriumBox; public System.Windows.Forms.TextBox CriteriumBox;
private System.Windows.Forms.LinkLabel linkLabel1; private System.Windows.Forms.Label label5;
public System.Windows.Forms.Label label2;
public System.Windows.Forms.Label label1;
public System.Windows.Forms.LinkLabel linkLabel1;
public System.Windows.Forms.CheckBox checkBox2;
public System.Windows.Forms.Label label4;
public System.Windows.Forms.Button button2;
public System.Windows.Forms.Label label3;
public System.Windows.Forms.TextBox FilenamesBox;
public System.Windows.Forms.ListBox LanguageBox;
} }
} }

View File

@ -14,9 +14,12 @@ namespace DIT_FileNameReader
{ {
public partial class MainFrm : Form public partial class MainFrm : Form
{ {
public string[] languages = { "English", "Hungarian" };
public static int selectedLang = 1;
public bool listExtension; public bool listExtension;
public bool isSelectedFolder; public bool isSelectedFolder;
public bool isExtensionFiltered; public bool isExtensionFiltered;
public bool isCount;
public static string extension; public static string extension;
public static string path; public static string path;
public string[] files; public string[] files;
@ -53,6 +56,7 @@ namespace DIT_FileNameReader
this.MinimumSize = new System.Drawing.Size(this.Width, this.Height); this.MinimumSize = new System.Drawing.Size(this.Width, this.Height);
this.MaximumSize = new System.Drawing.Size(this.Width, this.Height); this.MaximumSize = new System.Drawing.Size(this.Width, this.Height);
initializeLanguages();
} }
public void doPreview() public void doPreview()
@ -65,12 +69,26 @@ namespace DIT_FileNameReader
{ {
if (IsdefaultPath()) if (IsdefaultPath())
{ {
ErrorFrm err = new ErrorFrm("Nem adtál meg könyvtárat a listázásához!"); string errortext="";
switch (selectedLang)
{
case 0: errortext = "You didn't specified a folder where list files!";break;
case 1: errortext = "Nem adtál meg könyvtárat a listázásához!";break;
default:break;
}
ErrorFrm err = new ErrorFrm(errortext);
err.Show(); err.Show();
} }
if (isExtensionFiltered==true && !(extension.StartsWith("*"))) if (isExtensionFiltered==true && !(extension.StartsWith("*")))
{ {
ErrorFrm err = new ErrorFrm("Helytelen formában adtad meg a kiterjesztést! \n Helyes példa: *.png"); string errortext = "";
switch (selectedLang)
{
case 0: errortext = "You specified the extension with wrong format! \nCorrect example: *.png"; break;
case 1: errortext = "Helytelen formában adtad meg a kiterjesztést! \nHelyes példa: *.png"; break;
default: break;
}
ErrorFrm err = new ErrorFrm(errortext);
err.Show(); err.Show();
} }
} }
@ -160,7 +178,7 @@ namespace DIT_FileNameReader
} }
public bool IsdefaultPath() public bool IsdefaultPath()
{ {
if (DirectoryBox.Text== "Pl.: D:/Zenek") if (DirectoryBox.Text== "Pl.: D:/Zenek" || DirectoryBox.Text== "For example: D:/Music")
{ {
return true; return true;
} }
@ -287,15 +305,80 @@ namespace DIT_FileNameReader
} }
private void initializeLanguages()
{
LanguageBox.Items.Clear();
for (int i = 0; i < languages.Length; i++)
{
LanguageBox.Items.Add(languages[i].ToString());
}
LanguageBox.SelectedIndex = selectedLang;
}
private void LanguageManager()
{
switch (selectedLang)
{
case 0: English(); break;
case 1: Hungarian(); break;
default: break;
}
}
private void CriteriumBox_TextChanged(object sender, EventArgs e) private void CriteriumBox_TextChanged(object sender, EventArgs e)
{ {
} }
public void English()
{
this.Text = "DIT - Filename Reader";
button1.Text = "Select folder";
label2.Text = "DIT - Filename Reader";
label1.Text = "Output preview";
linkLabel1.Text = "About..";
checkBox2.Text = "Filename filter";
checkBox1.Text = "Filenames contains the extension";
label4.Text = "Folder path";
if (IsdefaultPath())
{
DirectoryBox.Text = "For example: D:/Music";
}
button2.Text = "Save to .txt";
label3.Text = "or";
}
public void Hungarian()
{
this.Text = "DIT - Fájlnév olvasó";
button1.Text = "Mappa kiválasztása";
label2.Text = "DIT - Fájlnév olvasó";
label1.Text = "Kimenet előnézete";
linkLabel1.Text = "Részletek..";
checkBox2.Text = "Fájlnév szűrő";
checkBox1.Text = "Fájlnevek tartalmazzák a kiterjesztést";
label4.Text = "Mappa elérési útvonala";
if (IsdefaultPath())
{
DirectoryBox.Text = "Pl.: D:/Zenek";
}
button2.Text = "Mentés .txt fájlba";
label3.Text = "vagy";
}
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{ {
AboutFrm about = new AboutFrm(); AboutFrm about = new AboutFrm();
about.Show(); about.Show();
} }
private void LanguageBox_SelectedIndexChanged(object sender, EventArgs e)
{
selectedLang = LanguageBox.SelectedIndex;
LanguageManager();
}
} }
} }

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.1.1.0")] [assembly: AssemblyVersion("0.2.0.0")]
[assembly: AssemblyFileVersion("0.1.1.0")] [assembly: AssemblyFileVersion("0.2.0.0")]

View File

@ -3,7 +3,9 @@
Egy szimpla grafikus alkalmazás egy könyvtárban lévő fájlok neveinek a lekérdezéséhez. Egy szimpla grafikus alkalmazás egy könyvtárban lévő fájlok neveinek a lekérdezéséhez.
### [EN] - Description ### [EN] - Description
A simple GUI application to list filenames in a directory. A simple GUI application to list filenames in a directory.
### Changelog - Változtatások
[HU] Kattints ide, hogy megnézd a [changelog](https://github.com/LabodiDavid/DIT_FileNameReader/blob/master/Changelog.md)-ot.
[EN] Click here, to see the [changelog](https://github.com/LabodiDavid/DIT_FileNameReader/blob/master/Changelog.md).
## [HU/EN] - Features ## [HU/EN] - Features
- [HU] Folyamatos előnézetet ad a jelenlegi beállításaidhoz mérten a fájlnév lekérdezésedről. - [HU] Folyamatos előnézetet ad a jelenlegi beállításaidhoz mérten a fájlnév lekérdezésedről.
[EN] Provides a continuous preview of your filename query relative your current settings. [EN] Provides a continuous preview of your filename query relative your current settings.
@ -17,4 +19,5 @@ A simple GUI application to list filenames in a directory.
### TO DO / Upcoming features - jövőben érkező funkciók: ### TO DO / Upcoming features - jövőben érkező funkciók:
- [ ] - Fájlok megszámlálása az adott mappában / Counting files in a given directory - [ ] - Fájlok megszámlálása az adott mappában / Counting files in a given directory
- [ ] - Megszámlálás a szűrőnek megfelelve / Counting files according to the filter - [ ] - Megszámlálás a szűrőnek megfelelve / Counting files according to the filter
- [ ] - Implementálás a DIT App-ba, DIT Updater-hez való hozzácsatolás. / Implement to the DIT App, attach to DIT Updater.
És még sok más ami nincs ide lejegyezve.. And many more that is not listed here.. És még sok más ami nincs ide lejegyezve.. And many more that is not listed here..