Пример #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;
 }
Пример #7
0
 //-----
 public SortBridge(VisList v) : base(v)
 {
 }
Пример #8
0
 internal void AddToVisList(QNetworkIdentity uv)
 {
     VisList.Add(uv);
     QNetworkServer.ShowForConnection(uv, this);
 }