Esempio n. 1
0
        /// <summary>
        ///     CreateView执行完毕后,用LoadData的数据填充界面
        /// </summary>
        protected override void OnFillData()
        {
            var explorerBar  = new ExplorerBar();
            var dataBar      = new ExplorerBar();
            var contentPanel = new XBaseControl();
            int loaction     = 20;

            OrObsAandLabDTO[] labs = model.getOrObsAandLabDTO(ent4BannerDto.Id_ent, "lab");
            if (labs != null && labs.Length > 0)
            {
                for (int i = 0; i < labs.Length; i++)
                {
                    var lab = new LabelRender();
                    lab.Text     = labs[i].Name;
                    lab.ID       = labs[i].Id;
                    lab.Location = new Point(0, loaction);
                    loaction     = loaction + lab.Size.Height + 30;
                    lab.Size     = new Size(100, 24);
                    contentPanel.AddRender(lab);
                    lab.MouseClick += lab_MouseDoubleClick;
                }
            }
            var layout = new LinearLayout(contentPanel);

            layout.Orientation = Orientation.Horizontal;
            layout.ApplyLayout();

            explorerBar.AddMenuItem(new MenuItemInfo("常规检验", contentPanel));

            dataBar.AddMenuItem(new MenuItemInfo("日期", contentPanel));

            menu.AddMenuItem(new MenuItemInfo("分类模式", explorerBar));
            menu.AddMenuItem(new MenuItemInfo("日期模式", dataBar));
        }
        public AlertView()
        {
            Device.OnPlatform (() => {
                Padding = new Thickness (0, 40, 0, 0);
            });

            this.BackgroundColor = Color.Gray;

            var label = new LabelRender();

            var loading = new ActivityIndicator(){ IsRunning = true};

            this.Children.Add(loading);

            label.Text = TextConstant.Wait;

            label.TextColor = Color.White;

            label.HorizontalOptions = LayoutOptions.CenterAndExpand;

            label.VerticalOptions = LayoutOptions.CenterAndExpand;

            this.HorizontalOptions = LayoutOptions.CenterAndExpand;

            this.Children.Add(label);

            this.WidthRequest = 200;

            this.HeightRequest = 80;
        }
Esempio n. 3
0
        public AlertView()
        {
            Device.OnPlatform(() => {
                Padding = new Thickness(0, 40, 0, 0);
            });

            this.BackgroundColor = Color.Gray;

            var label = new LabelRender();

            var loading = new ActivityIndicator()
            {
                IsRunning = true
            };

            this.Children.Add(loading);

            label.Text = TextConstant.Wait;

            label.TextColor = Color.White;

            label.HorizontalOptions = LayoutOptions.CenterAndExpand;

            label.VerticalOptions = LayoutOptions.CenterAndExpand;

            this.HorizontalOptions = LayoutOptions.CenterAndExpand;

            this.Children.Add(label);

            this.WidthRequest = 200;

            this.HeightRequest = 80;
        }
Esempio n. 4
0
        void lab_MouseClick(object sender, MouseEventArgs e)
        {
            LabelRender lab = sender as LabelRender;

            this.FireSelected(lab.ID);
        }