context: #region Copyright (c)2003 Juanjo < http://lphant.sourceforge.net >
  /*
  * This file is part of eLePhant
  * Copyright (C)2003 Juanjo < j_u_a_n_j_o@users.sourceforge.net / http://lphant.sourceforge.net >
  * 
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation; either
  * version 2 of the License, or (at your option) any later version.
  * 
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  * 
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
  #endregion
  
  using System;
  using System.Drawing;
  using System.Collections;
  using System.ComponentModel;
  using System.Windows.Forms;
  using System.IO;
  using System.Diagnostics;
  using eLePhant.eDonkey;
  using eLePhant.Types;
  
  namespace eLePhant.Client
  {
  	/// <summary>
  	/// Summary description for FormUploads.
  	/// </summary>
  	public class FormUploads : System.Windows.Forms.Form
  	{
  		private System.ComponentModel.IContainer components;
  		private FormAviDetails FAviDetails;
  		private System.Windows.Forms.Panel panel1;
  		private System.Windows.Forms.Splitter splitter1;
  		private System.Windows.Forms.Panel panel2;
  		private System.Windows.Forms.Panel panel3;
  		private System.Windows.Forms.Panel panel4;
  		private Crownwood.Magic.Controls.TabControl tabControlDetails;
  		private Crownwood.Magic.Controls.TabPage tabPageDetails;
  		private System.Windows.Forms.TextBox tx_fileName;
  		private System.Windows.Forms.TextBox tx_completeName;
  		private System.Windows.Forms.Label label6;
  		private Crownwood.Magic.Controls.TabPage tabPagStats;
  		private System.Windows.Forms.Label labelSessionUploadedRes;
  		private System.Windows.Forms.Label labelSessionDownloadedRes;
  		private System.Windows.Forms.Label labelSessionRequestsRes;
  		private System.Windows.Forms.Label labelSessionUploaded;
  		private System.Windows.Forms.Label labelSessionDownloaded;
  		private System.Windows.Forms.Label labelSessionRequests;
  		private System.Windows.Forms.Panel panel_fileDetails;
  		private System.Windows.Forms.Label label5;
  		private System.Windows.Forms.Label labelComment;
  		private System.Windows.Forms.TextBox textBoxComment;
  		private System.Windows.Forms.Button buttonSetCommet;
  		private System.Windows.Forms.Button buttonOpenFolder;
  		private System.Windows.Forms.ToolTip toolTip1;
  		private System.Windows.Forms.Button buttonRename;
  		private System.Windows.Forms.Panel panelLeft;
  		private System.Windows.Forms.Splitter splitter2;
  		private System.Windows.Forms.Panel panelLeftDetails;
  		private System.Windows.Forms.Button buttonReload;
  		private System.Windows.Forms.Label labelSharedFiles;
  		public eLePhant.Client.sharedListView sharedListView;
  		private System.Windows.Forms.Panel panelUpDetails;
  		public eLePhant.Client.uploadsListView uploadsList;
  		private System.Windows.Forms.ImageList imageList1;
  
  		private CkernelGateway krnGateway;
  
  		public FormUploads()
  		{
  			//
  			// Required for Windows Form Designer support
  			//
  			InitializeComponent();
  			Initialize();
  			this.tabControlDetails.Appearance = Crownwood.Magic.Controls.TabControl.VisualAppearance.MultiBox;
  			this.tabControlDetails.PositionTop = true;
  			//tabPageQueue.Visible=false;
  			m_Globalize();
          }
  		
  		private void m_Globalize()
  		{
  			labelSharedFiles.Text=eLePhantForm.Globalization["LBL_SHAREDFILES"];
  			buttonReload.Text=eLePhantForm.Globalization["LBL_RELOADSHAREDFILES"];
  			tabPageDetails.Title=eLePhantForm.Globalization["LBL_DETAILS"];
  			//tabPageQueue.Title=eLePhantForm.Globalization["LBL_QUEUE"];
  			label6.Text = eLePhantForm.Globalization["LBL_PATH"]+":";
  			label5.Text = eLePhantForm.Globalization["LBL_FILE"]+":";
  			labelSessionDownloaded.Text=eLePhantForm.Globalization["LBL_DOWNLOADED"];
  			labelSessionRequests.Text=eLePhantForm.Globalization["LBL_REQUESTS"];
  			labelSessionUploaded.Text=eLePhantForm.Globalization["LBL_UPLOADED"];
  			labelComment.Text=eLePhantForm.Globalization["LBL_COMMENT"];
  			buttonSetCommet.Text=eLePhantForm.Globalization["LBL_SETCOMMENT"];
  			toolTip1.SetToolTip(this.buttonOpenFolder, eLePhantForm.Globalization["LBL_OPENFOLDER"]);
  			buttonRename.Text=eLePhantForm.Globalization["LBL_RENAME"];
  		}
  
  		public void Globalize()
  		{
  			m_Globalize();
  		}
  
  		private void Initialize()
  		{
  			FAviDetails=new FormAviDetails();
  			FAviDetails.TopLevel=false;
  			FAviDetails.Dock = DockStyle.Fill;
  			panel_fileDetails.Controls.Add(FAviDetails);
  			FAviDetails.Dock = DockStyle.Fill;
  			FAviDetails.ApplySkin();
  		}
  
  		public void Connect(CkernelGateway in_krnGateway)
  		{
  			krnGateway=in_krnGateway;
  			uploadsList.Initilize(krnGateway);
  			sharedListView.Initilize(krnGateway);
  		}
  		/// <summary>
  		/// Clean up any resources being used.
  		/// </summary>
  		protected override void Dispose( bool disposing )
  		{
  			if( disposing )
  			{
  				if(components != null)
  				{
  					components.Dispose();
  				}
  			}
  			base.Dispose( disposing );
  		}
  
  		#region Windows Form Designer generated code
  		/// <summary>
  		/// Required method for Designer support - do not modify
  		/// the contents of this method with the code editor.
  		/// </summary>
  		private void InitializeComponent()
  		{
  			this.components = new System.ComponentModel.Container();
  			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(FormUploads));
  			this.panel1 = new System.Windows.Forms.Panel();
  			this.panelUpDetails = new System.Windows.Forms.Panel();
  			this.uploadsList = new eLePhant.Client.uploadsListView(this.components);
  			this.splitter1 = new System.Windows.Forms.Splitter();
  			this.panel2 = new System.Windows.Forms.Panel();
  			this.splitter2 = new System.Windows.Forms.Splitter();
  			this.panel3 = new System.Windows.Forms.Panel();
  			this.panel4 = new System.Windows.Forms.Panel();
  			this.tabControlDetails = new Crownwood.Magic.Controls.TabControl();
  			this.tabPageDetails = new Crownwood.Magic.Controls.TabPage();
  			this.buttonRename = new System.Windows.Forms.Button();
  			this.buttonOpenFolder = new System.Windows.Forms.Button();
  			this.buttonSetCommet = new System.Windows.Forms.Button();
  			this.textBoxComment = new System.Windows.Forms.TextBox();
  			this.labelComment = new System.Windows.Forms.Label();
  			this.tx_fileName = new System.Windows.Forms.TextBox();
  			this.tx_completeName = new System.Windows.Forms.TextBox();
  			this.label6 = new System.Windows.Forms.Label();
  			this.label5 = new System.Windows.Forms.Label();
  			this.panel_fileDetails = new System.Windows.Forms.Panel();
  			this.imageList1 = new System.Windows.Forms.ImageList(this.components);
  			this.tabPagStats = new Crownwood.Magic.Controls.TabPage();
  			this.labelSessionUploadedRes = new System.Windows.Forms.Label();
  			this.labelSessionDownloadedRes = new System.Windows.Forms.Label();
  			this.labelSessionRequestsRes = new System.Windows.Forms.Label();
  			this.labelSessionUploaded = new System.Windows.Forms.Label();
  			this.labelSessionDownloaded = new System.Windows.Forms.Label();
  			this.labelSessionRequests = new System.Windows.Forms.Label();
  			this.panelLeft = new System.Windows.Forms.Panel();
  			this.panelLeftDetails = new System.Windows.Forms.Panel();
  			this.buttonReload = new System.Windows.Forms.Button();
  			this.labelSharedFiles = new System.Windows.Forms.Label();
  			this.sharedListView = new eLePhant.Client.sharedListView(this.components);
  			this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
  			this.panel1.SuspendLayout();
  			this.panelUpDetails.SuspendLayout();
  			this.panel2.SuspendLayout();
  			this.panel3.SuspendLayout();
  			this.panel4.SuspendLayout();
  			this.tabPageDetails.SuspendLayout();
  			this.tabPagStats.SuspendLayout();
  			this.panelLeft.SuspendLayout();
  			this.panelLeftDetails.SuspendLayout();
  			this.SuspendLayout();
  			// 
  			// panel1
  			// 
  			this.panel1.Controls.Add(this.panelUpDetails);
  			this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
  			this.panel1.Location = new System.Drawing.Point(0, 0);
  			this.panel1.Name = "panel1";
  			this.panel1.Size = new System.Drawing.Size(776, 128);
  			this.panel1.TabIndex = 0;
  			// 
  			// panelUpDetails
  			// 
  			this.panelUpDetails.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
  				| System.Windows.Forms.AnchorStyles.Left) 
  				| System.Windows.Forms.AnchorStyles.Right)));
  			this.panelUpDetails.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
  			this.panelUpDetails.Controls.Add(this.uploadsList);
  			this.panelUpDetails.Location = new System.Drawing.Point(8, 8);
  			this.panelUpDetails.Name = "panelUpDetails";
  			this.panelUpDetails.Size = new System.Drawing.Size(760, 118);
  			this.panelUpDetails.TabIndex = 2;
  			// 
  			// uploadsList
  			// 
  			this.uploadsList.AllowColumnReorder = true;
  			this.uploadsList.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
  				| System.Windows.Forms.AnchorStyles.Left) 
  				| System.Windows.Forms.AnchorStyles.Right)));
  			this.uploadsList.AutoArrange = false;
  			this.uploadsList.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
  			this.uploadsList.DefaultCustomDraw = true;
  			this.uploadsList.ForeColor = System.Drawing.Color.FromArgb(((System.Byte)(68)), ((System.Byte)(69)), ((System.Byte)(151)));
  			this.uploadsList.FullRowSelect = true;
  			this.uploadsList.FullyCustomHeader = false;
  			this.uploadsList.HideSelection = false;
  			this.uploadsList.IncreaseHeaderHeight = 0;
  			this.uploadsList.Location = new System.Drawing.Point(8, 8);
  			this.uploadsList.Name = "uploadsList";
  			this.uploadsList.Size = new System.Drawing.Size(744, 104);
  			this.uploadsList.sortColumn = -1;
  			this.uploadsList.TabIndex = 2;
  			this.uploadsList.View = System.Windows.Forms.View.Details;
  			// 
  			// splitter1
  			// 
  			this.splitter1.Dock = System.Windows.Forms.DockStyle.Top;
  			this.splitter1.Location = new System.Drawing.Point(0, 128);
  			this.splitter1.Name = "splitter1";
  			this.splitter1.Size = new System.Drawing.Size(776, 7);
  			this.splitter1.TabIndex = 1;
  			this.splitter1.TabStop = false;
  			// 
  			// panel2
  			// 
  			this.panel2.Controls.Add(this.splitter2);
  			this.panel2.Controls.Add(this.panel3);
  			this.panel2.Controls.Add(this.panelLeft);
  			this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
  
gt: 			this.panel2.Location = new System.Drawing.Point(0, 135);