public ChartView (ChartMainPageView mainView) { Title = "график"; InitializeComponent (); if (Device.OS == TargetPlatform.iOS) { { var btn = new Button() { Text = "Фильтры" }; btn.Clicked += (s, e) => { mainView.IsPresented = !mainView.IsPresented; }; Grid.SetRow(btn, 2); grdRoot.Children.Add(btn); } } Padding = Device.OnPlatform (10, 8, 10); _repository = ContainerService.Instance.Container.Resolve<IMatrixCacheRepository> (); _chart = new SfChart (); _firstSeries = new LineSeries (); _secondSeries = new LineSeries (); _thirdSeries = new LineSeries (); _maxSeries = new ColumnSeries (); _secondaryAxis = new NumericalAxis () { Minimum = 0 }; InitControl (); BindingContext = new ChartViewModel (); MessagingCenter.Subscribe<ChartSettingsViewModel, ChartShowHideSeriesParameter> (this, MessagingCenterKeys.NeedShowHideChartSeriesKey, OnNeedShowHideChart); }
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> (); }
public MatrixViewModel (Views.MatrixView view, Views.MatrixSettingsPage settingsView, Views.TableView tableView) { _notificator = DependencyService.Get<IToastNotificator> (); _view = view; _settingsView = settingsView; _tableView = tableView; _repository = ContainerService.Instance.Container.Resolve<IMatrixCacheRepository> (); _isRedColor = true; _isGreenColor = true; _isYellowColor = true; _startDate = new DateTime (2014, 1, 1); _endDate = new DateTime (2014, 1, 31); _rowCountDict.Add (0, "50 объектов"); _rowCountDict.Add (1, "100 объектов"); _rowCountDict.Add (2, "300 объектов"); _goalDict.Add (0, "Нефть"); _goalDict.Add (1, "Обводненность"); CommandsInit (); //InitGestures (); CrossConnectivity.Current.ConnectivityChanged += OnConnectionStatusChanged; HasInternetConnection = CrossConnectivity.Current.IsConnected; }