示例#1
0
        public override void AddData(List <IVisList> list)
        {
            int max = list.Count;

            Product[] product = new Product[max];
            for (int i = 0; i < max; i++)
            {
                product[i] = (Product)list[i];
            }
            for (int i = 0; i < max; i++)
            {
                for (int j = i; j < max; j++)
                {
                    if (product[i].CompareTo(product[j]) > 0)
                    {
                        Product pt = product[i];
                        product[i] = product[j];
                        product[j] = pt;
                    }
                }
            }
            for (int i = 0; i < max; i++)
            {
                VisList.AddLine(product[i]);
            }
        }
示例#2
0
 internal void RemoveObservers()
 {
     foreach (var networkIdentity in VisList)
     {
         networkIdentity.RemoveObserverInternal(this);
     }
     VisList.Clear();
 }
示例#3
0
 internal void RemoveFromVisList(QNetworkIdentity uv, bool isDestroyed)
 {
     VisList.Remove(uv);
     if (!isDestroyed)
     {
         QNetworkServer.HideForConnection(uv, this);
     }
 }
示例#4
0
        private void RemoveLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            List <VisItem> removeList = new List <VisItem>();

            foreach (VisItem item in VisList.SelectedItems)
            {
                removeList.Add(item);
            }

            foreach (VisItem item in removeList)
            {
                VisList.Items.Remove(item);
            }

            VisList.Refresh();

            UpdateLinkVis(VisList.Items.Count > 0); // remove item doesn't update selected immediately
        }
        private void init()
        {
            products = new ArrayList();
            readFile(products);                 //read in the data file
            //create the product list
            prodList = new ProductList(lsProd);
            //Bridge to product VisList
            Bridger lbr = new SortBridge(prodList);

            //put the data into the product list
            lbr.addData(products);
            //create the grid VisList
            gridList = new GridList(grdProd);
            //Bridge to the grid list
            Bridger gbr = new SortBridge(gridList);

            //put the data into the grid display
            gbr.addData(products);
        }
示例#6
0
 //------
 public ListBridge(VisList v)
 {
     vis = v;
 }
 //-----
 public SortBridge(VisList v) : base(v)
 {
 }
示例#8
0
 internal void AddToVisList(QNetworkIdentity uv)
 {
     VisList.Add(uv);
     QNetworkServer.ShowForConnection(uv, this);
 }