public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
            {
                this.owner.owner.SelectedOption = indexPath.Row;
                OptionInfo info = null;

                if (this.owner.owner.Sections.Length > 0)
                {
                    OptionSection sectionInfo = this.owner.owner.Sections [indexPath.Section];
                    info = sectionInfo.Items [indexPath.Row];
                    sectionInfo.SelectedOption = indexPath.Row;
                }
                else
                {
                    info = this.owner.owner.Options [indexPath.Row];
                    this.owner.owner.SelectedOption = indexPath.Row;
                }

                if (info.Handler != null)
                {
                    info.Handler(info, EventArgs.Empty);
                }

                if (this.owner.owner.Popover != null && this.owner.owner.Popover.PopoverVisible)
                {
                    this.owner.owner.Popover.Dismiss(false);
                }
                else
                {
                    this.owner.NavigationController.PopViewController(true);
                }
            }
Esempio n. 2
0
        void loadCharts()
        {
            overlayChart.RemoveAllData();
            indicatorsChart.RemoveAllData();

            TKChartNumericAxis yAxis = new TKChartNumericAxis();

            yAxis.Range = new TKRange(new NSNumber(250), new NSNumber(750));
            yAxis.Style.LabelStyle.TextAlignment           = TKChartAxisLabelAlignment.Right | TKChartAxisLabelAlignment.Bottom;
            yAxis.Style.LabelStyle.FirstLabelTextAlignment = TKChartAxisLabelAlignment.Right | TKChartAxisLabelAlignment.Top;
            yAxis.AllowZoom = true;
            yAxis.AllowPan  = true;
            series.YAxis    = yAxis;

            NSDateFormatter formatter = new NSDateFormatter();

            formatter.DateFormat = "MM/dd/yyyy";

            NSDate minDate            = formatter.Parse("01/01/2011");
            NSDate maxDate            = formatter.Parse("01/01/2013");
            TKChartDateTimeAxis xAxis = new TKChartDateTimeAxis();

            xAxis.Range = new TKRange(minDate, maxDate);
            xAxis.MinorTickIntervalUnit                    = TKChartDateTimeAxisIntervalUnit.Days;
            xAxis.MajorTickIntervalUnit                    = TKChartDateTimeAxisIntervalUnit.Years;
            xAxis.MajorTickInterval                        = 1;
            xAxis.Style.MajorTickStyle.TicksHidden         = false;
            xAxis.Style.MajorTickStyle.TicksOffset         = -3;
            xAxis.Style.MajorTickStyle.TicksWidth          = 1.5f;
            xAxis.Style.MajorTickStyle.MaxTickClippingMode = TKChartAxisClippingMode.Visible;
            xAxis.Style.MajorTickStyle.TicksFill           = new TKSolidFill(UIColor.FromRGB(203 / 255.0f, 203 / 255.0f, 203 / 255.0f));
            xAxis.AllowZoom = true;
            xAxis.AllowPan  = true;
            series.XAxis    = xAxis;

            OptionInfo info = Trendlines [SelectedTrendLine];

            info.Handler(info, EventArgs.Empty);

            info = Indicators [SelectedIndicator];
            info.Handler(info, EventArgs.Empty);
        }
Esempio n. 3
0
        public virtual void optionTouched(object sender, EventArgs e)
        {
            UISegmentedControl segmented = sender as UISegmentedControl;

            if (segmented != null)
            {
                this.SelectedOption = segmented.SelectedSegment;
            }
            else
            {
                this.SelectedOption = 0;
            }
            OptionInfo info = options [(int)this.SelectedOption];

            if (info.Handler != null)
            {
                info.Handler(info, EventArgs.Empty);
            }
        }
Esempio n. 4
0
            public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
            {
                OptionInfo info = null;

                if (indexPath.Section == 0)
                {
                    tableView.DeselectRow(NSIndexPath.FromRowSection(example.SelectedTrendLine, 0), false);
                    example.SelectedTrendLine = indexPath.Row;
                    info = example.Trendlines [indexPath.Row];
                }
                else
                {
                    tableView.DeselectRow(NSIndexPath.FromRowSection(example.SelectedIndicator, 1), false);
                    example.SelectedIndicator = indexPath.Row;
                    info = example.Indicators [indexPath.Row];
                }

                info.Handler(info, EventArgs.Empty);
                tableView.ReloadData();
            }