Exemplo n.º 1
0
        public virtual CustomTableView MakeTableView(RectangleF bounds, UITableViewStyle style)
        {
            var tableView = new CustomTableView(new RectangleF(0, 0, bounds.Width, bounds.Height), style);

            tableView.Frame = new RectangleF(0, 0, tableView.Frame.Width, tableView.Frame.Height);
            return(tableView);
        }
Exemplo n.º 2
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            var vm = new SpeakersModel();

            CustomTableView.RowHeight = 70;
            CustomTableView.RegisterNibForCellReuse(CustomTableViewCell.Nib, nameof(CustomTableViewCell));

            GetSpeakersButton.TouchUpInside += async(sender, e) =>
            {
                // ボタンを利用不可、グルグルを表示にします。
                GetSpeakersButton.Enabled = false;
                SVProgressHUD.Show();

                await vm.GetSpeakersAsync();

                // TableViewのSourceをCustomTableViewSourceでnewします。
                CustomTableView.Source = new CustomTableViewSource(this, vm.Speakers);
                CustomTableView.ReloadData();

                // グルグルを非表示、ボタンを利用可にします。
                SVProgressHUD.Dismiss();
                GetSpeakersButton.Enabled = true;
            };
        }
Exemplo n.º 3
0
        public AllnotesGrid()
        {
            CustomTableView tv = new CustomTableView();

            tv.AllowEditing   = false;
            tv.ShowGroupPanel = false;
            SetTableViewStyle(tv);
            this.View = tv;
        }
Exemplo n.º 4
0
        public InvBOMClientGrid()
        {
            CustomTableView tv = new CustomTableView();

            tv.AllowEditing   = false;
            tv.ShowGroupPanel = false;
            SetTableViewStyle(tv);
            View = tv;
        }
        public CreditorStatementGridClient()
        {
            CustomTableView tableView = new CustomTableView();

            tableView.AllowEditing   = false;
            tableView.ShowGroupPanel = false;
            SetTableViewStyle(tableView);
            tableView.ShowTotalSummary = true;
            tableView.ShowGroupFooters = true;
            this.View = tableView;
        }
        public AccountStatementGrid2()
        {
            CustomTableView tv = new CustomTableView();

            tv.AllowEditing   = false;
            tv.ShowGroupPanel = false;
            SetTableViewStyle(tv);
            tv.ShowTotalSummary = true;
            tv.ShowGroupFooters = true;
            this.View           = tv;
        }
Exemplo n.º 7
0
        void ReleaseDesignerOutlets()
        {
            if (CustomTableView != null)
            {
                CustomTableView.Dispose();
                CustomTableView = null;
            }

            if (GetSpeakersButton != null)
            {
                GetSpeakersButton.Dispose();
                GetSpeakersButton = null;
            }
        }
Exemplo n.º 8
0
        void PopulateCollectionView(string whichAlbum)
        {
            if (string.IsNullOrEmpty(whichAlbum))
            {
                return;
            }

            var tableData = new NSDataAsset(whichAlbum);

            try {
                var jsonString = NSString.FromData(tableData.Data, NSStringEncoding.UTF8);
                previewDetails = JsonConvert.DeserializeObject <List <PreviewDetail> > (jsonString);
                CustomTableView.ReloadData();
            } catch (Exception e) {
                Console.WriteLine("Error occurred: {0}", e.Message);
            }
        }
Exemplo n.º 9
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            var vm = new ViewModels.SpeakersViewModel();

            CustomTableView.EstimatedRowHeight = 70;
            CustomTableView.RegisterNibForCellReuse(CustomTableViewCell.Nib, nameof(CustomTableViewCell));
            CustomTableView.Source = new CustomTableViewSource();

            GetSpeakersButton.TouchUpInside += async(sender, e) =>
            {
                // ボタンを利用不可、グルグルを表示にします。
                GetSpeakersButton.Enabled = false;
                SVProgressHUD.Show();

                // vmのGetSpeakersメソッドを実行します。
                await vm.GetSpeakers();

                var items = vm.Speakers;

                // Name、Title、UIImageのプロパティを持つTableItemのListにデータを移し替えます。
                // 移し替える前にImageUrlをUIImageに変換して格納します。
                var tableItems = new List <TableItem>();
                foreach (var x in items)
                {
                    var image = await this.LoadImage(x.Avatar);

                    tableItems.Add(new TableItem(x.Name, x.Title, image));
                }

                // 用意してあるCustomListViewSourceを再度読み込み、一度クリアしてからデータを流し込み、再表示します。
                var src = CustomTableView.Source as CustomTableViewSource;
                src.Items.Clear();
                foreach (var x in tableItems)
                {
                    src.Items.Add(x);
                }
                CustomTableView.ReloadData();

                // グルグルを非表示、ボタンを利用可にします。
                SVProgressHUD.Dismiss();
                GetSpeakersButton.Enabled = true;
            };
        }
Exemplo n.º 10
0
        public void Handle_BindingContextChanged(
            object sender
            , System.EventArgs e
            )
        {
            try
            {
                CustomTableView            gridTemp = ((CustomTableView)sender);
                List <ComandoParametroDto> painel   = (List <ComandoParametroDto>)gridTemp.BindingContext;
                gridTemp.Root.Clear();

                if (painel != null)
                {
                    TableRoot temp = Form.BuildFormulario(painel);

                    Device.BeginInvokeOnMainThread(() => gridTemp.Root = temp);
                }
            } catch { }
        }
        void ReleaseDesignerOutlets()
        {
            if (CustomTableView != null)
            {
                CustomTableView.Dispose();
                CustomTableView = null;
            }

            if (DetailsLabel != null)
            {
                DetailsLabel.Dispose();
                DetailsLabel = null;
            }

            if (ProgressView != null)
            {
                ProgressView.Dispose();
                ProgressView = null;
            }
        }
Exemplo n.º 12
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            var vm = new UITableViewSample.Models.SpeakersModel();

            CustomTableView.RowHeight = 70;
            CustomTableView.RegisterNibForCellReuse(CustomTableViewCell.Nib, nameof(CustomTableViewCell));

            GetSpeakersButton.TouchUpInside += async(sender, e) =>
            {
                // ボタンを利用不可、グルグルを表示にします。
                GetSpeakersButton.Enabled = false;
                SVProgressHUD.Show();

                // vmのGetSpeakersメソッドを実行します。
                await vm.GetSpeakersAsync();

                // Name、Title、UIImageのプロパティを持つTableItemのListにデータを移し替えます。
                // 移し替える前にImageUrlをUIImageに変換して格納します。
                var tableItems = new List <TableItem>();
                foreach (var x in vm.Speakers)
                {
                    var image = await this.LoadImage(x.Avatar);

                    tableItems.Add(new TableItem(x.Name, x.Title, image));
                }

                // TableViewのSourceをCustomTableViewSourceでnewします。
                CustomTableView.Source = new CustomTableViewSource(tableItems);
                CustomTableView.ReloadData();

                // グルグルを非表示、ボタンを利用可にします。
                SVProgressHUD.Dismiss();
                GetSpeakersButton.Enabled = true;
            };

            #region PropertyChangedを使用する場合
            //vm.PropertyChanged += Vm_PropertyChanged;
            #endregion
        }
Exemplo n.º 13
0
        public override void LoadView()
        {
            tableView = MakeTableView(UIScreen.MainScreen.Bounds, Style);
            tableView.AutoresizingMask  = UIViewAutoresizing.FlexibleHeight | UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleTopMargin;
            tableView.AutosizesSubviews = true;

            if (root != null)
            {
                root.Prepare();
            }

            UpdateSource();
            View = tableView;
            SetupSearch();
            ConfigureTableView();

            if (root == null)
            {
                return;
            }
            root.TableView = tableView;
        }
 public CustomHeaderTableModelRenderer(TableView model) : base(model)
 {
     _coloredTableView = model as CustomTableView;
 }
Exemplo n.º 15
0
        public void Init()
        {
            EmailCell = new ExtendedTextCell
            {
                Text            = AppResources.EmailUs,
                ShowDisclousure = true
            };

            var emailTable = new CustomTableView
            {
                Root = new TableRoot
                {
                    new TableSection(" ")
                    {
                        EmailCell
                    }
                }
            };

            EmailLabel = new CustomLabel(this)
            {
                Text = AppResources.EmailUsDescription
            };

            WebsiteCell = new ExtendedTextCell
            {
                Text            = AppResources.VisitOurWebsite,
                ShowDisclousure = true
            };

            var websiteTable = new CustomTableView
            {
                NoHeader = true,
                Root     = new TableRoot
                {
                    new TableSection(" ")
                    {
                        WebsiteCell
                    }
                }
            };

            WebsiteLabel = new CustomLabel(this)
            {
                Text = AppResources.VisitOurWebsiteDescription
            };

            BugCell = new ExtendedTextCell
            {
                Text            = AppResources.FileBugReport,
                ShowDisclousure = true
            };

            var bugTable = new CustomTableView
            {
                NoHeader = true,
                Root     = new TableRoot
                {
                    new TableSection(" ")
                    {
                        BugCell
                    }
                }
            };

            BugLabel = new CustomLabel(this)
            {
                Text = AppResources.FileBugReportDescription
            };

            StackLayout = new StackLayout
            {
                Children = { emailTable, EmailLabel, websiteTable, WebsiteLabel, bugTable, BugLabel },
                Spacing  = 0
            };

            if (Device.RuntimePlatform == Device.iOS)
            {
                ToolbarItems.Add(new DismissModalToolBarItem(this, AppResources.Cancel));
            }

            Title   = AppResources.HelpAndFeedback;
            Content = new ScrollView {
                Content = StackLayout
            };
        }
Exemplo n.º 16
0
        public void Init()
        {
            var emailCell = new ExtendedTextCell
            {
                Text            = "Email Us",
                ShowDisclousure = true
            };

            emailCell.Tapped += EmailCell_Tapped;

            var emailTable = new CustomTableView
            {
                Root = new TableRoot
                {
                    new TableSection
                    {
                        emailCell
                    }
                }
            };

            var emailLabel = new CustomLabel(this)
            {
                Text = "Email us directly to get help or leave feedback."
            };

            var websiteCell = new ExtendedTextCell
            {
                Text            = "Visit Our Website",
                ShowDisclousure = true
            };

            websiteCell.Tapped += WebsiteCell_Tapped;

            var websiteTable = new CustomTableView
            {
                NoHeader = true,
                Root     = new TableRoot
                {
                    new TableSection
                    {
                        websiteCell
                    }
                }
            };

            var websiteLabel = new CustomLabel(this)
            {
                Text = "Visit our website to get help, news, email us, and/or learn more about how to use bitwarden."
            };

            var bugCell = new ExtendedTextCell
            {
                Text            = "File a Bug Report",
                ShowDisclousure = true
            };

            bugCell.Tapped += BugCell_Tapped;

            var bugTable = new CustomTableView
            {
                NoHeader = true,
                Root     = new TableRoot
                {
                    new TableSection
                    {
                        bugCell
                    }
                }
            };

            var bugLabel = new CustomLabel(this)
            {
                Text = "Open an issue at our GitHub repository."
            };

            var stackLayout = new StackLayout
            {
                Children = { emailTable, emailLabel, websiteTable, websiteLabel, bugTable, bugLabel },
                Spacing  = 0
            };

            stackLayout.LayoutChanged += (sender, args) =>
            {
                websiteLabel.WidthRequest = stackLayout.Bounds.Width - websiteLabel.Bounds.Left * 2;
                emailLabel.WidthRequest   = stackLayout.Bounds.Width - emailLabel.Bounds.Left * 2;
                bugLabel.WidthRequest     = stackLayout.Bounds.Width - bugLabel.Bounds.Left * 2;
            };

            Title   = "Help and Feedback";
            Content = new ScrollView {
                Content = stackLayout
            };
        }
 public CustomTableViewModelRenderer(CustomTableView model)
     : base(model)
 {
     _view = model;
 }
Exemplo n.º 18
0
 public CustomTableViewModelRenderer(Context context, Android.Widget.ListView listView, TableView view)
     : base(context, listView, view)
 {
     this.customTableView = view as CustomTableView;
 }
Exemplo n.º 19
0
        public void Init()
        {
            var emailCell = new ExtendedTextCell
            {
                Text            = AppResources.EmailUs,
                ShowDisclousure = true
            };

            emailCell.Tapped += EmailCell_Tapped;

            var emailTable = new CustomTableView
            {
                Root = new TableRoot
                {
                    new TableSection
                    {
                        emailCell
                    }
                }
            };

            var emailLabel = new CustomLabel(this)
            {
                Text = AppResources.EmailUsDescription
            };

            var websiteCell = new ExtendedTextCell
            {
                Text            = AppResources.VisitOurWebsite,
                ShowDisclousure = true
            };

            websiteCell.Tapped += WebsiteCell_Tapped;

            var websiteTable = new CustomTableView
            {
                NoHeader = true,
                Root     = new TableRoot
                {
                    new TableSection
                    {
                        websiteCell
                    }
                }
            };

            var websiteLabel = new CustomLabel(this)
            {
                Text = AppResources.VisitOurWebsiteDescription
            };

            var bugCell = new ExtendedTextCell
            {
                Text            = AppResources.FileBugReport,
                ShowDisclousure = true
            };

            bugCell.Tapped += BugCell_Tapped;

            var bugTable = new CustomTableView
            {
                NoHeader = true,
                Root     = new TableRoot
                {
                    new TableSection
                    {
                        bugCell
                    }
                }
            };

            var bugLabel = new CustomLabel(this)
            {
                Text = AppResources.FileBugReportDescription
            };

            var stackLayout = new StackLayout
            {
                Children = { emailTable, emailLabel, websiteTable, websiteLabel, bugTable, bugLabel },
                Spacing  = 0
            };

            stackLayout.LayoutChanged += (sender, args) =>
            {
                websiteLabel.WidthRequest = stackLayout.Bounds.Width - websiteLabel.Bounds.Left * 2;
                emailLabel.WidthRequest   = stackLayout.Bounds.Width - emailLabel.Bounds.Left * 2;
                bugLabel.WidthRequest     = stackLayout.Bounds.Width - bugLabel.Bounds.Left * 2;
            };

            if (Device.OS == TargetPlatform.iOS)
            {
                ToolbarItems.Add(new DismissModalToolBarItem(this, AppResources.Cancel));
            }

            Title   = AppResources.HelpAndFeedback;
            Content = new ScrollView {
                Content = stackLayout
            };
        }
Exemplo n.º 20
0
 public CustomTableViewModelRenderer(TableView model)
     : base(model)
 {
     this.customTableView = model as CustomTableView;
 }