public TableView(MatrixMainPageView mainView) { InitializeComponent(); _mainView = mainView; Title = "Таблица"; if (Device.OS == TargetPlatform.iOS) { Icon = "tableTabIcon.png"; { var btn = new Button() { Text = "Фильтры" }; btn.Clicked += (s, e) => { mainView.IsPresented = !mainView.IsPresented; }; Grid.SetRow(btn,1); cnvRoot.Children.Add(btn); } } cnvRoot.Padding = Device.OnPlatform(10, 8, 10); ThemeManager.ThemeName = Themes.Light; dataGrid.RightSwipeButtons.Add(new SwipeButtonInfo() { BackgroundColor = Color.Yellow, TextColor = Color.Black, AutoCloseOnTap = true, Caption = "График" }); dataGrid.SwipeButtonClick += DataGrid_SwipeButtonClick; }
public MatrixView (MatrixMainPageView mainView) { InitializeComponent (); Title = "Матрица"; if (Device.OS == TargetPlatform.iOS) { Icon = "matrixTabIcon.png"; { var btn = new Button() {Text = "Фильтры"}; btn.Clicked += (s, e) => { mainView.IsPresented = !mainView.IsPresented; }; Grid.SetRow(btn, 2); grdRoot.Children.Add(btn); } } grdRoot.Padding = Device.OnPlatform (10, 8, 10); grdHeaderContent.ColumnSpacing = Device.OnPlatform (25, 50, 0); cnvHeader.HeightRequest = Device.OnPlatform (80, 110, 0); cnvInfo.HeightRequest = Device.OnPlatform (80, 110, 0); lblInfo.FontSize = Device.OnPlatform (11, 14, 0); lblHeader1.FontSize = Device.OnPlatform (11, 14, 0); lblHeaderContent1.FontSize = Device.OnPlatform (11, 14, 0); lblHeader2.FontSize = Device.OnPlatform (11, 14, 0); lblHeaderContent2.FontSize = Device.OnPlatform (11, 14, 0); lblZ.FontSize = Device.OnPlatform (11, 14, 0); lblZ1.FontSize = Device.OnPlatform (11, 14, 0); lblZ2.FontSize = Device.OnPlatform (11, 14, 0); lblZ3.FontSize = Device.OnPlatform (11, 14, 0); lblZ4.FontSize = Device.OnPlatform (11, 14, 0); lblZ5.FontSize = Device.OnPlatform (11, 14, 0); lblZ6.FontSize = Device.OnPlatform (11, 14, 0); lblD.FontSize = Device.OnPlatform (11, 14, 0); lblD1.FontSize = Device.OnPlatform (11, 14, 0); lblD2.FontSize = Device.OnPlatform (11, 14, 0); lblD3.FontSize = Device.OnPlatform (11, 14, 0); lblD4.FontSize = Device.OnPlatform (11, 14, 0); lblD5.FontSize = Device.OnPlatform (11, 14, 0); lblD6.FontSize = Device.OnPlatform (11, 14, 0); lblStatus.FontSize = Device.OnPlatform (11, 14, 0); stkChart.Spacing = Device.OnPlatform(5, 3, 0); { var gesture=new TapGestureRecognizer(); gesture.SetBinding(TapGestureRecognizer.CommandProperty,new Binding("GoToChartCommand")); stkChart.GestureRecognizers.Add(gesture); } _mainView = mainView; InitToolbar (); _repository = ContainerService.Instance.Container.Resolve<IMatrixCacheRepository> (); }
void InitMatrixPage () { if (_matrixMainPageView == null) { _matrixMainPageView = new MatrixMainPageView (); } }