Esempio n. 1
0
        private void _SizeChanged(object sender, SizeChangedEventArgs e)
        {
            double num = base.ActualWidth - 70.0;

            foreach (UIElement element in this.List.Children)
            {
                if (element is BACAClient.UserControls.Controls.FrontDesk.RapidRetrieval)
                {
                    BACAClient.UserControls.Controls.FrontDesk.RapidRetrieval retrieval = (BACAClient.UserControls.Controls.FrontDesk.RapidRetrieval)element;
                    retrieval.Width = num;
                }
            }
            foreach (UIElement element2 in this.Page1.Children)
            {
                if (element2 is BACAClient.UserControls.Controls.Page)
                {
                    BACAClient.UserControls.Controls.Page page = (BACAClient.UserControls.Controls.Page)element2;
                    page.Width = num;
                }
            }
            foreach (UIElement element3 in this.Page2.Children)
            {
                if (element3 is BACAClient.UserControls.Controls.Page)
                {
                    BACAClient.UserControls.Controls.Page page2 = (BACAClient.UserControls.Controls.Page)element3;
                    page2.Width = num;
                }
            }
        }
Esempio n. 2
0
        public void BoundControls()
        {
            if (this.data.Count > 10)
            {
                this.Page1.Children.Clear();
                this.Page2.Children.Clear();
                int pageCount = PageUtils.GetPageCount(this.data.Count);
                this.BindPageControl(pageCount, 1);
                this.BindPageControl(pageCount, 2);
            }
            List <BACAClient.Model.Knowledge> listByPage = new List <Model.Knowledge>();//todo
            string str = string.Empty;

            foreach (BACAClient.Model.Knowledge knowledge in listByPage)
            {
                str = str + string.Format("'{0}_{1}',", knowledge.TypeId, knowledge.LngId);
            }
            char[]          trimChars = new char[] { ',' };
            List <Good_top> list      = new List <Good_top>(); //todo
            int             num       = ((this.pageIndex - 1) * PageUtils.GetPageSize()) + 1;

            this.List.Children.Clear();
            foreach (BACAClient.Model.Knowledge knowledge2 in listByPage)
            {
                BACAClient.UserControls.Controls.FrontDesk.RapidRetrieval element = new BACAClient.UserControls.Controls.FrontDesk.RapidRetrieval
                {
                    model  = knowledge2,
                    good   = list,
                    index  = num,
                    width  = base.ActualWidth - 70.0,
                    UserID = this.returnsearch.UserId
                };
                element.gotokdp += new BACAClient.UserControls.Controls.FrontDesk.RapidRetrieval.ChangedEventHandler(this.gotokdp);
                this.List.Children.Add(element);
                num++;
            }
        }