Commit f79dff52 authored by Jeffery's avatar Jeffery

Signed-off-by: Jeffery <shuochen.tw@ecom.com.tw>

parent 16a44a46
No preview for this file type
...@@ -12,6 +12,7 @@ namespace ETC2019.Controllers ...@@ -12,6 +12,7 @@ namespace ETC2019.Controllers
public class BarcodeController public class BarcodeController
{ {
private string[] AllowExtension { get; set; } private string[] AllowExtension { get; set; }
private string[] Items { get; set; }
public BarcodeController() public BarcodeController()
{ {
AllowExtension = new string[] { ".jpg", ".jpeg", ".gif" }; AllowExtension = new string[] { ".jpg", ".jpeg", ".gif" };
...@@ -28,9 +29,19 @@ namespace ETC2019.Controllers ...@@ -28,9 +29,19 @@ namespace ETC2019.Controllers
return width; return width;
} }
public Bitmap Get(int index)
{
}
public bool LoadFolder(string path, out string[] items) public bool LoadFolder(string path, out string[] items)
{ {
items = FolderIterator(path, out string[] tempItems) ? tempItems : new string[0]; List<string> itemList = new List<string>(Items = FolderIterator(path, out string[] tempItems) ? tempItems : new string[0]);
for (int i = 0; i < itemList.Count; i++)
itemList[i] = Path.GetFileNameWithoutExtension(itemList[i]);
items = itemList.ToArray();
return items.Length > 0; return items.Length > 0;
} }
......
...@@ -36,8 +36,8 @@ ...@@ -36,8 +36,8 @@
this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog(); this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.toolStrip2 = new System.Windows.Forms.ToolStrip(); this.toolStrip2 = new System.Windows.Forms.ToolStrip();
this.toolStripTextBox2 = new System.Windows.Forms.ToolStripTextBox();
this.toolStripLabel2 = new System.Windows.Forms.ToolStripLabel(); this.toolStripLabel2 = new System.Windows.Forms.ToolStripLabel();
this.toolStripTextBox2 = new System.Windows.Forms.ToolStripTextBox();
this.toolStripButton2 = new System.Windows.Forms.ToolStripButton(); this.toolStripButton2 = new System.Windows.Forms.ToolStripButton();
this.listBox1 = new System.Windows.Forms.ListBox(); this.listBox1 = new System.Windows.Forms.ListBox();
this.toolStrip1.SuspendLayout(); this.toolStrip1.SuspendLayout();
...@@ -138,6 +138,13 @@ ...@@ -138,6 +138,13 @@
this.toolStrip2.TabIndex = 1; this.toolStrip2.TabIndex = 1;
this.toolStrip2.Text = "toolStrip2"; this.toolStrip2.Text = "toolStrip2";
// //
// toolStripLabel2
//
this.toolStripLabel2.Margin = new System.Windows.Forms.Padding(0);
this.toolStripLabel2.Name = "toolStripLabel2";
this.toolStripLabel2.Size = new System.Drawing.Size(82, 28);
this.toolStripLabel2.Text = "目錄:";
//
// toolStripTextBox2 // toolStripTextBox2
// //
this.toolStripTextBox2.BackColor = System.Drawing.SystemColors.Control; this.toolStripTextBox2.BackColor = System.Drawing.SystemColors.Control;
...@@ -149,13 +156,6 @@ ...@@ -149,13 +156,6 @@
this.toolStripTextBox2.Name = "toolStripTextBox2"; this.toolStripTextBox2.Name = "toolStripTextBox2";
this.toolStripTextBox2.Size = new System.Drawing.Size(100, 28); this.toolStripTextBox2.Size = new System.Drawing.Size(100, 28);
// //
// toolStripLabel2
//
this.toolStripLabel2.Margin = new System.Windows.Forms.Padding(0);
this.toolStripLabel2.Name = "toolStripLabel2";
this.toolStripLabel2.Size = new System.Drawing.Size(82, 28);
this.toolStripLabel2.Text = "目錄:";
//
// toolStripButton2 // toolStripButton2
// //
this.toolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.toolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
...@@ -172,15 +172,17 @@ ...@@ -172,15 +172,17 @@
this.listBox1.BackColor = System.Drawing.SystemColors.Control; this.listBox1.BackColor = System.Drawing.SystemColors.Control;
this.listBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; this.listBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.listBox1.Dock = System.Windows.Forms.DockStyle.Fill; this.listBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.listBox1.Font = new System.Drawing.Font("標楷體", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(136)));
this.listBox1.ForeColor = System.Drawing.SystemColors.ControlText; this.listBox1.ForeColor = System.Drawing.SystemColors.ControlText;
this.listBox1.FormattingEnabled = true; this.listBox1.FormattingEnabled = true;
this.listBox1.IntegralHeight = false; this.listBox1.IntegralHeight = false;
this.listBox1.ItemHeight = 16; this.listBox1.ItemHeight = 24;
this.listBox1.Location = new System.Drawing.Point(0, 0); this.listBox1.Location = new System.Drawing.Point(0, 0);
this.listBox1.Margin = new System.Windows.Forms.Padding(0); this.listBox1.Margin = new System.Windows.Forms.Padding(0);
this.listBox1.Name = "listBox1"; this.listBox1.Name = "listBox1";
this.listBox1.Size = new System.Drawing.Size(149, 370); this.listBox1.Size = new System.Drawing.Size(149, 370);
this.listBox1.TabIndex = 0; this.listBox1.TabIndex = 0;
this.listBox1.SelectedIndexChanged += new System.EventHandler(this.ListBox1_SelectedIndexChanged);
// //
// BarcodePage // BarcodePage
// //
......
...@@ -48,5 +48,10 @@ namespace ETC2019.Views ...@@ -48,5 +48,10 @@ namespace ETC2019.Views
listBox1.Items.AddRange(items); listBox1.Items.AddRange(items);
} }
} }
private void ListBox1_SelectedIndexChanged(object sender, EventArgs e)
{
}
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment