?? albumprop.cs
字號:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using VirtualPhotoOrganizer.Photo;
using TXML;
namespace VirtualPhotoOrganizer.Dialogs
{
/// <summary>
/// Zusammenfassung f黵 AlbumProp.
/// </summary>
internal class AlbumProp : System.Windows.Forms.Form
{
private Album Album;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label lbName;
private System.Windows.Forms.Label lbPath;
private System.Windows.Forms.Label lbLName;
private System.Windows.Forms.Label lbLPath;
private System.Windows.Forms.Label lbLPhotos;
private System.Windows.Forms.Label lbPhotos;
/// <summary>
/// Erforderliche Designervariable.
/// </summary>
private System.ComponentModel.Container components = null;
public AlbumProp(Album a) {
//
// Erforderlich f黵 die Windows Form-Designerunterst黷zung
//
InitializeComponent();
Album = a;
// LoadLanguageStrings();
ReadAlbumData();
}
/// <summary>
/// Die verwendeten Ressourcen bereinigen.
/// </summary>
protected override void Dispose(bool disposing) {
if (disposing) {
if (components != null) {
components.Dispose();
}
}
base.Dispose(disposing);
}
private void LoadLanguageStrings() {
string lsName;
string lsPath;
string lsPhotos;
try {
TXmlReader reader = Util.XmlHandler.OpenLangFile();
lsName = reader.GetString("AlbumProp", "Name", "Name:");
lsPath = reader.GetString("AlbumProp", "Path", "Path:");
lsPhotos = reader.GetString("AlbumProp", "Photos", "Photos:");
}
catch {
lsName = "Name:";
lsPath = "Path:";
lsPhotos = "Photos:";
}
lbLName.Text = lsName;
lbLPath.Text = lsPath;
lbLPhotos.Text = lsPhotos;
}
private void ReadAlbumData() {
this.Text = Album.AlbumName;
lbName.Text = Album.AlbumName;
lbPath.Text = Album.AlbumPath;
lbPhotos.Text = Album.Photos.Count.ToString();
}
#region Vom Windows Form-Designer generierter Code
/// <summary>
/// Erforderliche Methode f黵 die Designerunterst黷zung.
/// Der Inhalt der Methode darf nicht mit dem Code-Editor ge鋘dert werden.
/// </summary>
private void InitializeComponent() {
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(AlbumProp));
this.lbLName = new System.Windows.Forms.Label();
this.lbLPath = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.lbName = new System.Windows.Forms.Label();
this.lbPath = new System.Windows.Forms.Label();
this.lbLPhotos = new System.Windows.Forms.Label();
this.lbPhotos = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// lbLName
//
this.lbLName.Location = new System.Drawing.Point(29, 43);
this.lbLName.Name = "lbLName";
this.lbLName.Size = new System.Drawing.Size(86, 25);
this.lbLName.TabIndex = 0;
this.lbLName.Text = "名稱:";
//
// lbLPath
//
this.lbLPath.Location = new System.Drawing.Point(29, 95);
this.lbLPath.Name = "lbLPath";
this.lbLPath.Size = new System.Drawing.Size(86, 25);
this.lbLPath.TabIndex = 1;
this.lbLPath.Text = "路徑:";
//
// button1
//
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.button1.Location = new System.Drawing.Point(173, 215);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(90, 25);
this.button1.TabIndex = 0;
this.button1.Text = "確定";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// lbName
//
this.lbName.Location = new System.Drawing.Point(125, 43);
this.lbName.Name = "lbName";
this.lbName.Size = new System.Drawing.Size(297, 26);
this.lbName.TabIndex = 3;
this.lbName.Text = "label3";
//
// lbPath
//
this.lbPath.Location = new System.Drawing.Point(125, 95);
this.lbPath.Name = "lbPath";
this.lbPath.Size = new System.Drawing.Size(297, 60);
this.lbPath.TabIndex = 4;
this.lbPath.Text = "label3";
//
// lbLPhotos
//
this.lbLPhotos.Location = new System.Drawing.Point(29, 172);
this.lbLPhotos.Name = "lbLPhotos";
this.lbLPhotos.Size = new System.Drawing.Size(86, 25);
this.lbLPhotos.TabIndex = 5;
this.lbLPhotos.Text = "圖片:";
//
// lbPhotos
//
this.lbPhotos.Location = new System.Drawing.Point(125, 172);
this.lbPhotos.Name = "lbPhotos";
this.lbPhotos.Size = new System.Drawing.Size(278, 26);
this.lbPhotos.TabIndex = 6;
this.lbPhotos.Text = "label1";
//
// AlbumProp
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(432, 256);
this.Controls.Add(this.lbPhotos);
this.Controls.Add(this.lbLPhotos);
this.Controls.Add(this.lbPath);
this.Controls.Add(this.lbName);
this.Controls.Add(this.button1);
this.Controls.Add(this.lbLPath);
this.Controls.Add(this.lbLName);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "AlbumProp";
this.Text = "相冊屬性";
this.ResumeLayout(false);
}
#endregion
private void button1_Click(object sender, System.EventArgs e) {
this.Close();
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -