/// <summary>
		/// This method must be called to iniitialize the ListView.
		/// </summary>
		/// <param name="headerInfos"></param>
		override public void Initialize(HeaderInfo[] headerInfos)
		{
			if (headerInfos == null) 
			{
				headerInfos = this.GetDefaultHeaderInfo();
			}
			base.Initialize(headerInfos);
			InitListBox();
			SetListBoxOptions();
		}
		private HeaderInfo[] GetDefaultHeaderInfo()
		{
			HeaderInfo[] headerInfos = new HeaderInfo[3];
			headerInfos[0].name = "Shipping Service";
			headerInfos[0].width = 300;
			headerInfos[1].name = "Shipping Cost";
			headerInfos[1].width = 200;
			headerInfos[2].name = "Additional Cost";
			headerInfos[2].width = 200;
			return headerInfos;
		}
		private HeaderInfo[] GetDefaultHeaderInfo()
		{
			HeaderInfo[] headerInfos = new HeaderInfo[5];
			headerInfos[0].name = "Shipping Service";
			headerInfos[0].width = 260;
			headerInfos[1].name = "Shipping Cost";
			headerInfos[1].width = 100;
			headerInfos[2].name = "Additional Cost";
			headerInfos[2].width = 110;
			headerInfos[3].name = "Ship To Locations";
			headerInfos[3].width = 120;
			headerInfos[4].name = "Import Charge";
			headerInfos[4].width = 100;
			return headerInfos;
		}
Beispiel #4
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="headerInfos"></param>
        protected virtual void InitListView(HeaderInfo[] headerInfos)
        {
            this.Dock = System.Windows.Forms.DockStyle.Fill;
            this.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
            this.FullRowSelect = true;
            this.Name = "listView1";
            this.Size = new System.Drawing.Size(0,0);
            this.TabIndex = 0;
            this.View = System.Windows.Forms.View.Details;
            this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.ELVMouseDown);
            this.DoubleClick += new System.EventHandler(this.ELVDoubleClick);
            this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ELVKeyDown);
            this.GridLines = true ;

            InitHeaderInfo(headerInfos);
        }
Beispiel #5
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="headerInfos"></param>
 protected void InitHeaderInfo(HeaderInfo[] headerInfos)
 {
     if (headerInfos != null)
     {
         int cnt = headerInfos.Length;
         if (cnt > 0)
         {
             this.columnHeaders = new ColumnHeader[cnt];
             for (int i = 0; i < cnt; i++)
             {
                 this.columnHeaders[i] = new ColumnHeader();
                 this.columnHeaders[i].Text = headerInfos[i].name;
                 this.columnHeaders[i].Width = headerInfos[i].width;
             }
             this.Columns.AddRange(this.columnHeaders);
         }
     }
     else
     {
         this.HeaderStyle = ColumnHeaderStyle.None;
     }
 }
Beispiel #6
0
 /// <summary>
 /// This method must be called to iniitialize the ListView.
 /// </summary>
 /// <param name="infos"></param>
 public virtual void Initialize(HeaderInfo[] infos)
 {
     InitListView(infos);
     InitEditBox();
 }
Beispiel #7
0
        private void InitShippingServiceOptions()
        {
            // Calculated rate shipping
            this.listViewCalcShippingService = this.shippingServiceControlCalcRate.EditListView;
            this.listViewCalcShippingService.TagItemOptions = calculatedShippingServiceCache;
            //Override default list header settings
            HeaderInfo[] headerInfos = new HeaderInfo[3];
            headerInfos[0].name = "Shipping Service";
            headerInfos[0].width = 300;
            this.listViewCalcShippingService.Initialize(headerInfos);

            // Flat rate shipping
            this.listViewDomesticShippingService = this.shippingServiceControlFlatRate.EditListView;
            this.listViewDomesticShippingService.TagItemOptions = domesticShippingServiceCache;
            //Use default list header settings
            this.listViewDomesticShippingService.Initialize(null);

            // Flat rate - international shipping
            this.listViewIntlShippingService = this.internationalShippingServiceControl.EditListView;
            this.listViewIntlShippingService.TagItemOptions = internationalShippingServiceCache;
            this.listViewIntlShippingService.ShipToLocationControlTagItems = getItemShipToLocationControlTags();
            //Use default list header settings
            this.listViewIntlShippingService.Initialize(null);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="headerInfos"></param>
        protected override void InitListView(HeaderInfo[] headerInfos)
        {
            base.InitListView(headerInfos);

            string[] s = {"", "", ""};
            this.Items.Add(new ListViewItem(s));
            this.Items.Add(new ListViewItem(s));
            this.Items.Add( new ListViewItem(s));
        }
        /// <summary>
        /// This method must be called to iniitialize the ListView.
        /// </summary>
        /// <param name="headerInfos"></param>
        public override void Initialize(HeaderInfo[] headerInfos)
        {
            if (headerInfos == null)
            {
                headerInfos = GetDefaultHeaderInfo();
            }

            base.Initialize(headerInfos);
            InitComboBox();
            SetComboBoxOptions();
        }