Esempio n. 1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            //Create the Oscilloscope
            this.Oscilloscope = new Oscilloscope();

            //Create the ServiceManager
            this.ServiceManager = new ServiceManager(Oscilloscope, ServiceType.Demo);
            //Set the IPAdress based on the gateway
            var liveService = this.ServiceManager.GetService(ServiceType.Live) as LiveService;

            liveService.Connection.IPAddress = GetIPAdress();

            this._ScopeView = FindViewById <SignalView> (Resource.Id.SignalView);
            _ScopeView.SetLayerType(LayerType.Hardware, null);
            this._VoltTimeIndicator = FindViewById <TextView> (Resource.Id.VoltTimeIndicator);
            //TODO Check API Compatibility
            //this._VoltTimeIndicator.SetZ (999f);

            this._CalibratingIndicator = FindViewById <TextView> (Resource.Id.CalibratingIndicator);
            //TODO Check API Compatibility
            //this._CalibratingIndicator.SetZ (999f);

            this.DisplaySettings = new DisplaySettings(MarkerUnit.dt, SignalUnit.Vdc);
            LoadControls();
            ServiceManager.SettingsChanged += HandleSettingsChanged;
            ServiceManager.FullFrame       += HandleFullFrame;
            this._ScopeView.ServiceManager  = this.ServiceManager;
            this._ScopeView.Oscilloscope    = this.Oscilloscope;
            _ScopeView.SelectedChannel      = 0;
            _ScopeView.NewData             += (object sender, NewDataEventArgs e) => RunOnUiThread(() => UpdateMeasurements());
            _ScopeView.DrawMarkers          = true;
        }
Esempio n. 2
0
 public MyScaleListener(SignalView view)
 {
     _view         = view;
     scaleTreshold = 50;
 }