Esempio n. 1
0
 public void DoChart1update(double[] sectionBuffers)
 {
     if (this.InvokeRequired)
     {
         ChartDelegate delegateMethod = new ChartDelegate(this.DoChart1update);
         this.Invoke(delegateMethod, new object[] { sectionBuffers });
     }
     else
     {
         CreateTimeGraph(zedGraphControl1, sectionBuffers);
     }
 }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            EdgesForExtendedLayout = UIRectEdge.None;
            Chart          = new SFChart();
            CDelegate      = new ChartDelegate();
            Chart.Delegate = CDelegate;
            var sampleFrame = new CGRect(ChartView.Bounds.Location.X,
                                         ChartView.Bounds.GetMinY(),
                                         ChartView.Bounds.Width,
                                         ChartView.Bounds.Height);

            Chart.Frame = sampleFrame;
            Chart.TranslatesAutoresizingMaskIntoConstraints = false;

            View.AddSubview(Chart);

            var horizontalConstraint = NSLayoutConstraint.Create(Chart, NSLayoutAttribute.Top,
                                                                 NSLayoutRelation.Equal,
                                                                 ChartView,
                                                                 NSLayoutAttribute.Top, 1, 0);

            var verticalConstraint = NSLayoutConstraint.Create(Chart,
                                                               NSLayoutAttribute.Bottom,
                                                               NSLayoutRelation.Equal,
                                                               ChartView,
                                                               NSLayoutAttribute.Bottom, 1, 0);
            var widthConstraint = NSLayoutConstraint.Create(Chart,
                                                            NSLayoutAttribute.Width,
                                                            NSLayoutRelation.Equal,
                                                            ChartView, NSLayoutAttribute.Width, 1, 0);
            var heightConstraint = NSLayoutConstraint.Create(Chart,
                                                             NSLayoutAttribute.Height,
                                                             NSLayoutRelation.Equal,
                                                             ChartView,
                                                             NSLayoutAttribute.Height, 1, 0);

            NSLayoutConstraint.ActivateConstraints(new NSLayoutConstraint[] { horizontalConstraint, verticalConstraint, widthConstraint, heightConstraint });

            var appDelegate = UIApplication.SharedApplication.Delegate as AppDelegate;
            var rawData     = appDelegate.RawData;

            if (!string.IsNullOrEmpty(rawData?.Url))
            {
                LoadData(rawData?.Url);
            }
        }
Esempio n. 3
0
 public void DoChart1update(double[] sectionBuffers)
 {
     try
     {
         if (this.InvokeRequired)
         {
             ChartDelegate delegateMethod = new ChartDelegate(this.DoChart1update);
             this.Invoke(delegateMethod, new object[] { sectionBuffers });
         }
         else
         {
             CreateTimeGraph(zedGraphControl1, sectionBuffers);
         }
     }
     catch (Exception err)
     {
         _log.Error("Time domain Chart drawing Error message is---" + err.Message);
         MessageBox.Show(err.Message);
     }
 }
Esempio n. 4
0
        public void DoChart1update(string sectionBuffers)
        {
            try
            {
                if (this.InvokeRequired)
                {
                    ChartDelegate delegateMethod = new ChartDelegate(this.DoChart1update);
                    this.Invoke(delegateMethod, new object[] { sectionBuffers });
                }
                else
                {
                    LoRaPM.AppEUI         = sectionBuffers.Substring(0, 16);
                    LoRaPM.AppsKey        = sectionBuffers.Substring(16, 32);
                    LoRaPM.DevAddr        = sectionBuffers.Substring(48, 8);
                    LoRaPM.DevEUI         = sectionBuffers.Substring(56, 16);
                    LoRaPM.NwksKey        = sectionBuffers.Substring(72, 32);
                    LoRaPM.GatewayChannel = sectionBuffers.Substring(104, 1);
                    LoRaPM.RadioFrequency = sectionBuffers.Substring(105, 9);
                    LoRaPM.Sf             = sectionBuffers.Substring(114, 2);

                    //richTextBox2.Text = LoRaPM.AppEUI;
                    richTextBox_APPEUI.Text        = LoRaPM.AppEUI;
                    richTextBox_APPSKEY.Text       = LoRaPM.AppsKey;
                    richTextBoxDEVADDR.Text        = LoRaPM.DevAddr;
                    richTextBoxDEVEUI.Text         = LoRaPM.DevEUI;
                    richTextBoxNWKSKEY.Text        = LoRaPM.NwksKey;
                    richTextBoxGATEWAYCHANNEL.Text = LoRaPM.GatewayChannel;
                    richTextBoxRADIOFREQUENCY.Text = LoRaPM.RadioFrequency;
                    richTextBoxSF.Text             = LoRaPM.Sf;
                }
            }
            catch (Exception err)
            {
                //MessageBox.Show(err.Message);
            }
        }