// Ensure SetLicenseKey is called once, before any SciChartSurface instance is created
        // Check this code into your version-control and it will enable SciChart
        // for end-users of your application.
        //
        // You can test the Runtime Key is installed correctly by Running your application
        // OUTSIDE Of Visual Studio (no debugger attached). Trial watermarks should be removed.


        public App()
        {
            SciChartSurface.SetRuntimeLicenseKey(@"<LicenseContract>
  <Customer>Redler technologies</Customer>
  <OrderId>ABT141014-5754-30127</OrderId>
  <LicenseCount>1</LicenseCount>
  <IsTrialLicense>false</IsTrialLicense>
  <SupportExpires>01/12/2015 00:00:00</SupportExpires>
  <ProductCode>SC-WPF-BSC</ProductCode>
  <KeyCode>lwAAAQEAAADYej6WZT7WAYsAQ3VzdG9tZXI9UmVkbGVyIHRlY2hub2xvZ2llcztPcmRlcklkPUFCVDE0MTAxNC01NzU0LTMwMTI3O1N1YnNjcmlwdGlvblZhbGlkVG89MTItSmFuLTIwMTU7UHJvZHVjdENvZGU9U0MtV1BGLUJTQztOdW1iZXJEZXZlbG9wZXJzT3ZlcnJpZGU9MYHBQsFtvhmNUsAF1tPpbfJI0MXhteDAzO1I1uzwGcNIr/3e8pkIaMWJiXsaX6Q0Ew==</KeyCode>
</LicenseContract>");

#if LOAD_FROM_DB
            Operations Op = Operations.GetInstance;
            Operations.GetInstance.readDataBase();
#endif
            LeftPanelViewModel.GetInstance.LogText = "";
            EventRiser.Instance.LoggerEvent       += LeftPanelViewModel.GetInstance.Instance_LoggerEvent;

            //EventRiser.Instance.RiseEevent(string.Format($"App Started"));

            Startup += new StartupEventHandler(App_Startup);                                        // Can be called from XAML

            DispatcherUnhandledException += App_DispatcherUnhandledException;                       //Example 2

            TaskScheduler.UnobservedTaskException += TaskScheduler_UnobservedTaskException;         //Example 4

            System.Windows.Forms.Application.ThreadException += WinFormApplication_ThreadException; //Example 5
        }
        private void SaveChart(object sender, RoutedEventArgs e)
        {
            SciChartSurface surface     = null;
            string          defaultName = "";

            switch (ReportsTabControl.SelectedIndex)
            {
            case 1:
                surface     = entriesAll;
                defaultName = String.Format("All Entries {0:MM-dd-yyyy}", DateTime.Now);
                break;

            case 2:
                surface     = entriesByDayChart;
                defaultName = String.Format("Entries by Day {0:MM-dd-yyyy}", DateTime.Now);
                break;

            case 3:
                surface     = entriesByWeekChart;
                defaultName = String.Format("Entries by Week {0:MM-dd-yyyy}", DateTime.Now);
                break;

            case 4:
                surface     = entriesByMonthChart;
                defaultName = String.Format("Entries by Month {0:MM-dd-yyyy}", DateTime.Now);
                break;

            case 5:
                surface     = entryDistributionChart;
                defaultName = String.Format("Entries Distribution {0:MM-dd-yyyy}", DateTime.Now);
                break;
            }

            if (surface == null)
            {
                return;
            }

            var saveFileDialog = new SaveFileDialog
            {
                Filter           = "Png|*.png|Jpeg|*.jpeg|Bmp|*.bmp",
                InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop),
                FileName         = defaultName
            };

            if (saveFileDialog.ShowDialog() == true)
            {
                var exportType = (ExportType)saveFileDialog.FilterIndex - 1;

                // Saving chart to file with specified file format
                try
                {
                    surface.ExportToFile(saveFileDialog.FileName, exportType);
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Error saving chart image: " + ex.Message);
                }
            }
        }
Exemple #3
0
 public App()
 {
     // Set this code once in App.xaml.cs or application startup
     // Set this code once in App.xaml.cs or application startup
     SciChartSurface.SetRuntimeLicenseKey("DsQ4Yg8uJC9bZtbL4Sozb/CqFzSiP+gwMiAEE3NE9ONiGEtUnlkNcy+bTgys35SIP89+M50ZVqccueCcbwr/2C4CaFoQAMhKycvMvq3oFGHsgP23CT5BtfW/IFbBCDfhEhcrCoLVjcNL+ZbKtMOkt8GuMeJr2xRqPlF0ttwQUDYWq+ss4IJ9JfvzOBznaAiMUYuvo/4QfG7p92hBeqqjcMPEGI7ZZnx6BJ9Peccw/C//cilPDH5ddc6k4VTL/AhGGyGGp4DYPvCaSbWZ4slbpZiDL1VDVDgdwQh0eeDaiTESfRrfgiQpL3h123s+ZggPyVtHoHDJ5QE8sx7URGSiAa4elg0cZv5IkY6R28NzFsAk+XN65AIJAqNFDuxh3Xqv8904Ih0JxF7IV0U+N2BmiDWVHW1G7DNAdXMpiAnovJwG+8BC6m4z7hRLai0eSdXZ4DZQ2TqWAxFruBN3jgQ3bNEFZ119LOF0oax0WGihTuLoSVUBYOsYoyGbDai1xd1H7jCE2ZPqRh7Hp4RbIs6L9z8BRte1n4ThcBAttcb/7qfk/UuwIP4=");
     Unosquare.FFME.Library.FFmpegDirectory = @"c:\ffmpeg";
 }
Exemple #4
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

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

            /*
             * surfaceView = FindViewById<SciChartSurface>(Resource.Id.sciChartSpectrogram);
             */
            Surface = FindViewById <SciChartSurface>(Resource.Id.chartHeatmap);

            // replacement of OnStart() overriding
            InitExample();

            Task.Run(() =>
            {
                var array = new double[Width * Height];

                for (var i = 0; i < SeriesPerPeriod; i++)
                {
                    DataManager.Instance.SetHeatmapValues(array, i, Width, Height, SeriesPerPeriod);
                    var doubleValues = new DoubleValues(array);

                    lock (ValuesList)
                    {
                        ValuesList.Add(doubleValues);
                    }
                }
            });
        }
Exemple #5
0
        public MainWindow()
        {
            // Set this code once in App.xaml.cs or application startup
            SciChartSurface.SetRuntimeLicenseKey("wsCOsvBlAs2dax4o8qBefxMi4Qe5BVWax7TGOMLcwzWFYRNCa/f1rA5VA1ITvLHSULvhDMKVTc+niao6URAUXmGZ9W8jv/4jtziBzFZ6Z15ek6SLU49eIqJxGoQEFWvjANJqzp0asw+zvLV0HMirjannvDRj4i/WoELfYDubEGO1O+oAToiJlgD/e2lVqg3F8JREvC0iqBbNrmfeUCQdhHt6SKS2QpdmOoGbvtCossAezGNxv92oUbog6YIhtpSyGikCEwwKSDrlKlAab6302LLyFsITqogZychLYrVXJTFvFVnDfnkQ9cDi7017vT5flesZwIzeH497lzGp3B8fKWFQyZemD2RzlQkvj5GUWBwxiKAHrYMnQjJ/PsfojF1idPEEconVsh1LoYofNk2v/Up8AzXEAvxWUEcgzANeQggaUNy+OFet8b/yACa/bgYG7QYzFQZzgdng8IK4vCPdtg4/x7g5EdovN2PI9vB76coMuKnNVPnZN60kSjtd/24N8A==");

            InitializeComponent();
        }
Exemple #6
0
 private static void UpdateProperty(SciChartSurface scs, ChartViewModel vm)
 {
     if (vm == null)
     {
         return;
     }
     vm.Chart = scs;
 }
 private void MetroWindow_Loaded(object sender, RoutedEventArgs e)
 {
     foreach (var child in FindVisualChildren <SciChartSurface>(ChartView1))
     {
         _sciChartSurface = child;
         break;
     }
 }
Exemple #8
0
        public App()
        {
            // Set this code once in App.xaml.cs or application startup
            var runtimeKey = System.Environment.GetEnvironmentVariable("SCICHART_RUNTIMEKEY");

            Console.WriteLine("runtimeKey: " + runtimeKey);
            SciChartSurface.SetRuntimeLicenseKey(runtimeKey);
        }
Exemple #9
0
        static void Main()
        {
            TODO SET YOUR LICENSE KEY HERE
            SciChartSurface.SetRuntimeLicenseKey(@"TODO SET KEY HERE");

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }
Exemple #10
0
        private SciChartSurface CreateSurface()
        {
            var series = new FastLineRenderableSeries()
            {
                Stroke     = Colors.Red,
                DataSeries = GetDataSeries()
            };

            var xAxes = new AxisCollection()
            {
                new NumericAxis()
            };

            var yAxes = new AxisCollection()
            {
                new NumericAxis()
            };

            var surface = new SciChartSurface()
            {
                ChartTitle       = "Rendered In Memory",
                XAxes            = xAxes,
                YAxes            = yAxes,
                RenderableSeries = new ObservableCollection <IRenderableSeries>()
                {
                    series
                },
                Annotations =
                    new AnnotationCollection()
                {
                    new BoxAnnotation()
                    {
                        X1         = 10,
                        X2         = 30,
                        Y1         = 10,
                        Y2         = 40,
                        Background = new SolidColorBrush(Colors.Green),
                    },
                    new VerticalLineAnnotation()
                    {
                        X1              = 35,
                        Stroke          = new SolidColorBrush(Colors.Yellow),
                        StrokeThickness = 3,
                        ShowLabel       = true,
                        LabelPlacement  = LabelPlacement.Axis
                    }
                }
            };

            ThemeManager.SetTheme(surface, "Chrome");

            surface.Width  = 800;
            surface.Height = 400;

            return(surface);
        }
Exemple #11
0
        public App()
        {
            DispatcherUnhandledException += App_DispatcherUnhandledException;

            InitializeComponent();

            // TODO: Put your SciChart License Key here if needed
            // Set this code once in App.xaml.cs or application startup
            SciChartSurface.SetRuntimeLicenseKey("jvVMZ7AkiMy+2yDsEMc7iGUeI+dc6utHwMsRWNc8uK61wLlNeQsBj4GiZVvAymvm2mz5VvxvrDejcQDSRKHI61QQ8lfDAL+672Zz5p0YmRU3QeBvqXKF85L5Uc6vhcjUtBCXspIl5TuqmJqMxdiXOAYEwsrIOLV4vxh94VStt4igGa8ZnTI41eStsjt33ZNV9ZwPX3uvbLNUKktgWE8MzleHgZbod9E7YuyWMhtf2wi8AiX+M391AJbEdeJ5glaq4ZJacPjaDgcdjrc9ChwuVSddksuc3aagNtD0a/3WiEHnkZOywEVmtoYgZCLvHFU0J1OYBBhcpF+maDqBL7KLn05XiwxDbDj0f5aFTmEtRsJ5T+VkTP+Os5Y+J7UIVKQW3lhu6TjSpSRXegzDnG7LyEOmz78Apxh/CdZbnBXtwIPslK38Nw5hyGdwQiL4gZqXKK2IsCN4ovsypItsq8eIhMQfPCFDAGrkRjFYHDd+EAbeySGNf3W4Bl+Jr8CPTPvEUz30ILhNqGphucZbejlIFTmrTFLUQ1T5DBINBQejJB9mJP260i+ZUcZD1A==");
        }
Exemple #12
0
        [STAThread] //à ajouter au projet initial

        static void Main(string[] args)
        {
            SciChartSurface.SetRuntimeLicenseKey(@"<LicenseContract>
            <Customer>Universite De Toulon</Customer>
            <OrderId>EDUCATIONAL-USE-0128</OrderId>
            <LicenseCount>1</LicenseCount>
            <IsTrialLicense>false</IsTrialLicense>
            <SupportExpires>02/17/2020 00:00:00</SupportExpires>
            <ProductCode>SC-WPF-2D-PRO-SITE</ProductCode>
            <KeyCode>lwAAAQEAAACS9FAFUqnVAXkAQ3VzdG9tZXI9VW5pdmVyc2l0ZSBEZSBUb3Vsb247T3JkZXJJZD1FRFVDQVRJT05BTC1VU0UtMDEyODtTdWJzY3JpcHRpb25WYWxpZFRvPTE3LUZlYi0yMDIwO1Byb2R1Y3RDb2RlPVNDLVdQRi0yRC1QUk8tU0lURYcbnXYui4rna7TqbkEmUz1V7oD1EwrO3FhU179M9GNhkL/nkD/SUjwJ/46hJZ31CQ==</KeyCode>
            </LicenseContract>");

            robotPilotList            = new List <RobotPilot.RobotPilot>();
            trajectoryPlannerList     = new List <TrajectoryPlanner>();
            waypointGeneratorList     = new List <WaypointGenerator>();
            lidarSimulatorList        = new List <LidarSimulator.LidarSimulator>();
            strategyManagerDictionary = new Dictionary <int, StrategyManager.StrategyManager>();
            localWorldMapManagerList  = new List <LocalWorldMapManager>();
            perceptionSimulatorList   = new List <PerceptionSimulator>();

            physicalSimulator          = new PhysicalSimulator.PhysicalSimulator();
            globalWorldMapManagerTeam1 = new GlobalWorldMapManager((int)TeamId.Team1);
            globalWorldMapManagerTeam2 = new GlobalWorldMapManager((int)TeamId.Team2);

            for (int i = 0; i < nbPlayersTeam1; i++)
            {
                //ethernetTeamNetworkAdapter = new EthernetTeamNetworkAdapter();
                //var LocalWorldMapManager = new  ("Robot" + (i + 1).ToString());
                CreatePlayer((int)TeamId.Team1, i);
            }

            for (int i = 0; i < nbPlayersTeam2; i++)
            {
                //ethernetTeamNetworkAdapter = new EthernetTeamNetworkAdapter();
                //var LocalWorldMapManager = new  ("Robot" + (i + 1).ToString());
                CreatePlayer((int)TeamId.Team2, i);
            }

            DefineRoles();


            StartInterfaces();

            //Timer de stratégie
            timerStrategie          = new System.Timers.Timer(20000);
            timerStrategie.Elapsed += TimerStrategie_Tick;
            timerStrategie.Start();

            lock (ExitLock)
            {
                // Do whatever setup code you need here
                // once we are done wait
                Monitor.Wait(ExitLock);
            }
        }
Exemple #13
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            // init sciChart
            SciChartSurface.SetRuntimeLicenseKey("");

            base.OnCreate(savedInstanceState);

            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
            LoadApplication(new App());
        }
        public static void ExportBitmapToFile(this SciChartSurface element, string filename)
        {
            using (var filestream = new FileStream(filename, FileMode.Create))
            {
                var encoder = new PngBitmapEncoder();
                var bitmap  = ExportToBitmap(element);

                encoder.Frames.Add(BitmapFrame.Create(bitmap));
                encoder.Save(filestream);
            }
        }
Exemple #15
0
 static ChartingProviderSciChart_v1_7_2()
 {
     SciChartSurface.SetLicenseKey(@"<LicenseContract>
                                       <Customer>ABT</Customer>
                                       <OrderId>Test</OrderId>
                                       <LicenseCount>1</LicenseCount>
                                       <IsTrialLicense>false</IsTrialLicense>
                                       <SupportExpires>09/07/2013 00:00:00</SupportExpires>
                                       <KeyCode>lwAAAAEAAACd79h9vqvOATkAQ3VzdG9tZXI9QUJUO09yZGVySWQ9VGVzdDtTdWJzY3JpcHRpb25WYWxpZFRvPTA3LVNlcC0yMDEzY4hf1A2pl6mzuJHCr296894GLSQVToXjaeEKo70ufpYOMj/1gZYU/wvNytpDJd7m</KeyCode>
                                     </LicenseContract>");
 }
        static void Main(string[] args)
        {
            /// Enregistrement de la license SciChart en début de code
            SciChartSurface.SetRuntimeLicenseKey("RJWA77RbaJDdCRJpg4Iunl5Or6/FPX1xT+Gzu495Eaa0ZahxWi3jkNFDjUb/w70cHXyv7viRTjiNRrYqnqGA+Dc/yzIIzTJlf1s4DJvmQc8TCSrH7MBeQ2ON5lMs/vO0p6rBlkaG+wwnJk7cp4PbOKCfEQ4NsMb8cT9nckfdcWmaKdOQNhHsrw+y1oMR7rIH+rGes0jGGttRDhTOBxwUJK2rBA9Z9PDz2pGOkPjy9fwQ4YY2V4WPeeqM+6eYxnDZ068mnSCPbEnBxpwAldwXTyeWdXv8sn3Dikkwt3yqphQxvs0h6a8Dd6K/9UYni3o8pRkTed6SWodQwICcewfHTyGKQowz3afARj07et2h+becxowq3cRHL+76RyukbIXMfAqLYoT2UzDJNsZqcPPq/kxeXujuhT4SrNF3444MU1GaZZ205KYEMFlz7x/aEnjM6p3BuM6ZuO3Fjf0A0Ki/NBfS6n20E07CTGRtI6AsM2m59orPpI8+24GFlJ9xGTjoRA==");

            /// Initialisation des modules utilisés dans le robot
            int robotId = 10; /// Ne pas changer cette variable !
            int teamId  = 0;  /// Ne pas changer cette variable !

            usbDriver            = new USBVendor();
            msgDecoder           = new MsgDecoder();
            msgEncoder           = new MsgEncoder();
            robotMsgGenerator    = new MsgGenerator();
            robotMsgProcessor    = new MsgProcessor(robotId, competition);
            xBoxManette          = new XBoxControllerNS.XBoxController(robotId);
            strategyManager      = new StrategyEurobot(robotId, teamId, "224.16.32.79");
            localWorldMapManager = new LocalWorldMapManager(robotId, teamId, bypassMulticast: false);
            positioning2Wheels   = new Positioning2Wheels(robotId);
            trajectoryGenerator  = new TrajectoryGeneratorNonHolonome(robotId);

            /// Création des liens entre module, sauf depuis et vers l'interface graphique
            usbDriver.OnUSBDataReceivedEvent += msgDecoder.DecodeMsgReceived;                                   // Transmission des messages reçus par l'USB au Message Decoder
            msgDecoder.OnMessageDecodedEvent += robotMsgProcessor.ProcessRobotDecodedMessage;                   // Transmission les messages décodés par le Message Decoder au Message Processor

            //Events d'activation et configuration de l'asservissement en vitesse depuis le Strategy Manager
            strategyManager.On2WheelsToPolarMatrixSetupEvent       += robotMsgGenerator.GenerateMessage2WheelsToPolarMatrixSet;         //Transmission des messages de set-up de la matrice de transformation moteurindepeandt -> polaire en embarqué
            strategyManager.On2WheelsAngleSetupEvent               += robotMsgGenerator.GenerateMessage2WheelsAngleSet;                 //Transmission des messages de set-up de la config angulaire des roues en embarqué
            strategyManager.OnOdometryPointToMeterSetupEvent       += robotMsgGenerator.GenerateMessageOdometryPointToMeter;            //Transmission des messages de set-up du coeff pointToMeter en embarqué
            strategyManager.On2WheelsIndependantSpeedPIDSetupEvent += robotMsgGenerator.GenerateMessage2WheelsIndependantSpeedPIDSetup; //Setup du PID independant
            strategyManager.OnSetAsservissementModeEvent           += robotMsgGenerator.GenerateMessageSetAsservissementMode;

            robotMsgGenerator.OnMessageToRobotGeneratedEvent += msgEncoder.EncodeMessageToRobot;                     // Envoi des messages du générateur de message à l'encoder
            msgEncoder.OnMessageEncodedEvent += usbDriver.SendUSBMessage;                                            // Envoi des messages en USB depuis le message encoder

            robotMsgProcessor.OnPolarOdometrySpeedFromRobotEvent += positioning2Wheels.OnOdometryRobotSpeedReceived; //Envoi des vitesses reçues de l'embarqué au module de calcul de positionnement
            positioning2Wheels.OnCalculatedLocationEvent         += trajectoryGenerator.OnPhysicalPositionReceived;  //Envoi du positionnement calculé au module de génération de trajectoire
            trajectoryGenerator.OnGhostLocationEvent             += localWorldMapManager.OnGhostLocationReceived;

            trajectoryGenerator.OnSpeedConsigneEvent       += robotMsgGenerator.GenerateMessageSetSpeedConsigneToRobot;     //Transmission des commande de vitesse aux moteurs de déplacement
            strategyManager.OnSetSpeedConsigneToMotorEvent += robotMsgGenerator.GenerateMessageSetSpeedConsigneToMotor;     //Transmission des commande de vitesse (aux moteurs annexes)

            positioning2Wheels.OnCalculatedLocationEvent += localWorldMapManager.OnPhysicalPositionReceived;


            strategyManager.InitStrategy(); //à faire après avoir abonné les events !

            StartRobotInterface();

            while (!exitSystem)
            {
                Thread.Sleep(500);
            }
        }
Exemple #17
0
 public SciChartSurfaceWpfRenderer()
 {
     // Apply license
     if (_license == null)
     {
         _license = SciChartLicenseManager.GetLicense(SciChartPlatform.Wpf);
         if (_license != null)
         {
             SciChartSurface.SetRuntimeLicenseKey(_license);
         }
     }
 }
Exemple #18
0
 public App()
 {
     SciChartSurface.SetRuntimeLicenseKey(@"< LicenseContract >
                   < Customer > University of Toronto </ Customer >
                   < OrderId > EDUCATIONAL - USE - 0068 </ OrderId >
                   < LicenseCount > 1 </ LicenseCount >
                   < IsTrialLicense > false </ IsTrialLicense >
                   < SupportExpires > 12 / 13 / 2018 00:00:00 </ SupportExpires >
                   < ProductCode > SC - WPF - SDK - PRO </ ProductCode >
                   < KeyCode > lwAAAQEAAAB2vOcuJwDVAXcAQ3VzdG9tZXI9VW5pdmVyc2l0eSBvZiBUb3JvbnRvIDtPcmRlcklkPUVEVUNBVElPTkFMLVVTRS0wMDY4O1N1YnNjcmlwdGlvblZhbGlkVG89MTMtRGVjLTIwMTg7UHJvZHVjdENvZGU9U0MtV1BGLVNESy1QUk8iosvqg9Stf7mo18jXZX3G8pwV7UrML0cyipotPhHMUSym + Q / PKXKT3VuOpboPczs =</ KeyCode >
                 </ LicenseContract>");
 }
Exemple #19
0
        public void WhenCreateSciChartSurface_ShouldPropagateBindingContext()
        {
            var scs = new SciChartSurface();
            var rs  = new StubRenderableSeries();

            scs.BindingContext = "ABindingContext";

            // Set binding context then series add
            scs.RenderableSeries.Add(rs);

            Assert.That(rs.BindingContext, Is.EqualTo("ABindingContext"));
        }
Exemple #20
0
        public void WhenCreateSciChartSurface_AndNewRenderableSeriesCollection_ShouldPropagateBindingContext()
        {
            var scs = new SciChartSurface();
            var rs  = new StubRenderableSeries();

            scs.BindingContext = "ABindingContext";

            // Set binding context then series add
            scs.RenderableSeries = new ObservableCollection <IRenderableSeries>(new [] { rs });

            Assert.That(rs.BindingContext, Is.EqualTo("ABindingContext"));
        }
Exemple #21
0
 // Ensure SetLicenseKey is called once, before any SciChartSurface instance is created
 // Check this code into your version-control and it will enable SciChart
 // for end-users of your application.
 //
 // You can test the Runtime Key is installed correctly by Running your application
 // OUTSIDE Of Visual Studio (no debugger attached). Trial watermarks should be removed.
 public App()
 {
     SciChartSurface.SetRuntimeLicenseKey(@"<LicenseContract>
     <Customer>Redler technologies</Customer>
     <OrderId>ABT141014-5754-30127</OrderId>
     <LicenseCount>1</LicenseCount>
     <IsTrialLicense>false</IsTrialLicense>
     <SupportExpires>01/12/2015 00:00:00</SupportExpires>
     <ProductCode>SC-WPF-BSC</ProductCode>
     <KeyCode>lwAAAAEAAAAYTULLhErUAXAAQ3VzdG9tZXI9UmVkbGVyIHRlY2hub2xvZ2llcztPcmRlcklkPUFCVDE0MTAxNC01NzU0LTMwMTI3O1N1YnNjcmlwdGlvblZhbGlkVG89MTItSmFuLTIwMTU7UHJvZHVjdENvZGU9U0MtV1BGLUJTQyu69TgpwVx+uxEH2B+6rKOQ/5YDD2Oh+vDxAZ3OzX+X05jc9xhuF7mPcAXFaqyfWA==</KeyCode>
     </LicenseContract>");
 }
Exemple #22
0
        private void enableSciChart()
        {
            SciChartSurface.SetRuntimeLicenseKey(
                @"<LicenseContract>
  <Customer>Redler technologies</Customer>
  <OrderId>ABT141014-5754-30127</OrderId>
  <LicenseCount>1</LicenseCount>
  <IsTrialLicense>false</IsTrialLicense>
  <SupportExpires>01/12/2015 00:00:00</SupportExpires>
  <KeyCode>lwAAAAEAAAB7H+2pk+fPAVkAQ3VzdG9tZXI9UmVkbGVyIHRlY2hub2xvZ2llcztPcmRlcklkPUFCVDE0MTAxNC01NzU0LTMwMTI3O1N1YnNjcmlwdGlvblZhbGlkVG89MTItSmFuLTIwMTUBrFsDLc/PG2F+FJDOYseFP3/GRFQJu2HO46bVbDZKHXE/tXLrY8HrN3F0ys/of0E=</KeyCode>
</LicenseContract>");
        }
Exemple #23
0
        protected override void OnStartup(StartupEventArgs e)
        {
            // Set this code once in App.xaml.cs or application startup
            SciChartSurface.SetRuntimeLicenseKey("FDqs1EPN/0q8Sb/GrmmcGYgt2WfywzkAX8VjrtXOAplNrlMwNz9a35Vd2NKIH3msLLUx+ROS6LLSt8Dk9coSQq7NbGzPzRO8D/CXBPj6N+VtUonxE6X3rjlyNq/TP+jslA9QPCxKXu0jzpmfnzc4yMBabWRVZ/7e5Febk2tKmmTLGAp/RnaqvKi02rjssq+gNJZtbANOn7CF9m39y2ULWRnDa/UVo87bQPuuzHoDzZflxIbCwdrcFxRNOV7O3nU235QQI8MaPZsl6ZQmCakvV2WbDC00hIp04tYM9A5nV/zQITweL3sR7aiTrRdk1DXqO6mEfiFrTHnkKpLwpNZeETEfQDzpTtsk8GgOUxVH5bcFx2NXWjHN0rKUnf/lTLoYgIlMpq1sD/MEsVOgYLmgP44XkXWyB/3MG2bsoH61XPh5dIeOKYKpwD6IWmBi4/hm4i6G4o9nrxdKS+aOgsyXSKyTWSzqG3Ez9EwjOGYZb+0I/g3TUuPZ90hIeIJinBX9XpLzu2LrQJOteAuBEBM3EBlx4BqWlK+qUcC+32simkSwRwc8AtKL4ps/Uy9TNHypk1XTlQEQlay2hg==");

            System.Timers.Timer updateTimer = new System.Timers.Timer();
            updateTimer.Elapsed += UpdateTimer_Elapsed;
            updateTimer.Interval = 1000;
            updateTimer.Enabled  = true;

            base.OnStartup(e);
        }
        public static BitmapSource ExportToBitmap(this SciChartSurface element)
        {
            if (element == null)
            {
                return(null);
            }

            // Store the Frameworks current layout transform, as this will be restored later
            var storedTransform = element.LayoutTransform;

            // Set the layout transform to unity to get the nominal width and height
            element.LayoutTransform = new ScaleTransform(1, 1);

            // если раскоментировать, то график будет смещатьсяи и искажаться
            //element.Measure(new Size(Double.PositiveInfinity, Double.PositiveInfinity));
            //element.Arrange(new Rect(new Point(0, 0), element.DesiredSize));


            var height = element.ActualHeight + element.Margin.Top + element.Margin.Bottom;
            var width  = element.ActualWidth + element.Margin.Left + element.Margin.Right;

            // Render to a Bitmap Source, note that the DPI is
            // changed for the render target as a way of scaling the FrameworkElement
            var rtb = new RenderTargetBitmap(
                (int)width,
                (int)height,
                96d,
                96d,
                PixelFormats.Default);

            // Render a white background in Clipboard
            var vRect = new Rectangle
            {
                Width  = width,
                Height = height,
                Fill   = Brushes.White
            };

            vRect.Measure(element.RenderSize);
            vRect.Arrange(new Rect(element.RenderSize));
            rtb.Render(vRect);
            rtb.Render(element);

            /*
             * // если раскоментировать, то график будет смещатьсяи и искажаться
             * // Restore the Framework Element to it’s previous state
             * element.LayoutTransform = storedTransform;
             * element.Measure(new Size(Double.PositiveInfinity, Double.PositiveInfinity));
             * element.Arrange(new Rect(new Point(0, 0), element.DesiredSize));*/

            return(rtb);
        }
        /// <summary>
        /// Decides what happens on startup of program
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected override void OnStartup(object sender, StartupEventArgs e)
        {
            //Get the scichart license from file
            string sciChartLicense = null;

            try
            {
                using (System.IO.StreamReader sr = new StreamReader(sciChartLicenseFileLocation))
                {
                    sciChartLicense = sr.ReadToEnd();
                }
                SciChartSurface.SetRuntimeLicenseKey(sciChartLicense);
            }
            catch
            {
                //MessageBox.Show(@"Error Importing SciChart License. Charts will not work without it. Please be sure it is located in the directory C:\SCBS\sciChartLicense.txt. Proceed if you don't need to use the charts.", "Warning", MessageBoxButton.OK, MessageBoxImage.Hand);
            }
            //Get the file containing the url where the xml file is stored.
            //Check xml file to see if the version has increased.  If so, download update and update application.
            string urlForAutoUpdateContainingXML = null;

            try
            {
                using (StreamReader fileContainingAutoUpdateURL = new StreamReader(@"C:\SCBS\url.txt"))
                {
                    urlForAutoUpdateContainingXML = fileContainingAutoUpdateURL.ReadToEnd();
                }
            }
            catch
            {
            }
            //make sure url is not null, not empty and in correct format. If it isn't, then skip the auto-update code and log.
            //otherwise start update download
            if (!string.IsNullOrEmpty(urlForAutoUpdateContainingXML))
            {
                if (Uri.IsWellFormedUriString(urlForAutoUpdateContainingXML, UriKind.Absolute))
                {
                    AutoUpdater.Mandatory  = true;
                    AutoUpdater.UpdateMode = Mode.Forced;
                    try
                    {
                        AutoUpdater.Start(urlForAutoUpdateContainingXML);
                    }
                    catch
                    {
                    }
                }
            }

            DisplayRootViewFor <MainViewModel>();
        }
Exemple #26
0
        private void ExecutedStartCommand(object sender, ExecutedRoutedEventArgs e)
        {
            var chart = new SciChartSurface
            {
                ChartModifier = new ModifierGroup(
                    new RubberBandXyZoomModifier {
                    ExecuteOn = ExecuteOn.MouseLeftButton
                },
                    new ZoomExtentsModifier {
                    ExecuteOn = ExecuteOn.MouseDoubleClick
                }
                    )
            };

            ThemeManager.SetTheme(chart, "Chrome");
            ChartPanel.Content = chart;

            var grid = new UniversalGrid();

            GridPanel.Content = grid;

            try
            {
                _analyticStrategy = _scriptType.CreateInstance <BaseAnalyticsStrategy>();
                _analyticStrategy.ProcessStateChanged += s =>
                {
                    if (_analyticStrategy != null && _analyticStrategy.ProcessState == ProcessStates.Stopped)
                    {
                        //_isProgress = false;
                        _analyticStrategy = null;
                    }
                };

                //_isProgress = true;
                _analyticStrategy.Security = _parameters.Security;
                _analyticStrategy.From     = _parameters.From;
                _analyticStrategy.To       = _parameters.To;
                _analyticStrategy.Environment.SetValue("Drive", _parameters.Drive);
                _analyticStrategy.Environment.SetValue("StorageFormat", _parameters.StorageFormat);
                _analyticStrategy.Environment.SetValue("Chart", chart);
                _analyticStrategy.Environment.SetValue("Grid", grid);
                _analyticStrategy.Start();
            }
            catch (Exception ex)
            {
                ex.LogError();
                //_isProgress = false;
                _analyticStrategy = null;
            }
        }
 public App()
 {
     // Ensure SetLicenseKey is called once, before any SciChartSurface instance is created
     // Check this code into your version-control and it will enable SciChart
     // for end-users of your application who are not activated
     SciChartSurface.SetRuntimeLicenseKey(@"<LicenseContract>
 <Customer>Aqua-Tech Services</Customer>
 <OrderId>ABT170324-5714-19111</OrderId>
 <LicenseCount>1</LicenseCount>
 <IsTrialLicense>false</IsTrialLicense>
 <SupportExpires>06/22/2017 00:00:00</SupportExpires>
 <ProductCode>SC-WPF-2D-PRO</ProductCode>
 <KeyCode>lwAAAAEAAABaO0bgPaTSAXIAQ3VzdG9tZXI9QXF1YS1UZWNoIFNlcnZpY2VzO09yZGVySWQ9QUJUMTcwMzI0LTU3MTQtMTkxMTE7U3Vic2NyaXB0aW9uVmFsaWRUbz0yMi1KdW4tMjAxNztQcm9kdWN0Q29kZT1TQy1XUEYtMkQtUFJPEuj4oHbI0Yf9/do2jRti4XEr61r2r8rlCdLgd2IUWMDcFNrdqQhh9gaqkVVNkpEC</KeyCode>
 </LicenseContract>");
 }
Exemple #28
0
 public App()
 {
     // Ensure SetLicenseKey is called once, before any SciChartSurface instance is created
     // Check this code into your version-control and it will enable SciChart
     // for end-users of your application.
     //
     // You can test the Runtime Key is installed correctly by Running your application
     // OUTSIDE Of Visual Studio (no debugger attached). Trial watermarks should be removed.
     SciChartSurface.SetRuntimeLicenseKey(@"<LicenseContract>
                                           <Customer>Russian State Vocational Pedagogical University</Customer>
                                           <OrderId>EDUCATIONAL-USE 0013</OrderId>
                                           <LicenseCount>1</LicenseCount>
                                           <IsTrialLicense>false</IsTrialLicense>
                                           <SupportExpires>05/11/2017 00:00:00</SupportExpires>
                                           <ProductCode>SC-WPF-SDK-PRO</ProductCode>
                                           <KeyCode>lwAAAAEAAADNfrRLu4PSAZAAQ3VzdG9tZXI9UnVzc2lhbiBTdGF0ZSBWb2NhdGlvbmFsIFBlZGFnb2dpY2FsIFVuaXZlcnNpdHk7T3JkZXJJZD1FRFVDQVRJT05BTC1VU0UgMDAxMztTdWJzY3JpcHRpb25WYWxpZFRvPTExLU1heS0yMDE3O1Byb2R1Y3RDb2RlPVNDLVdQRi1TREstUFJPZeiYKeB0uPiMOQvdtbYwKsGZnGqx1G6H4p1hAXZRHW23KckVkxI2Erp+Xvmr8q96</KeyCode>
                                         </LicenseContract>");
 }
Exemple #29
0
        public Form1()
        {
            InitializeComponent();

            // Initialize the chart.
            // License is initialized in Program.cs
            var scs = new SciChartSurface();

            scs.XAxis = new NumericAxis();
            scs.YAxis = new NumericAxis();

            var xyData = new XyDataSeries <double>();

            Enumerable.Range(0, 100).ForEachDo(x => xyData.Append(x, Math.Sin(x * 0.05)));
            scs.RenderableSeries.Add(new FastLineRenderableSeries()
            {
                DataSeries = xyData, Stroke = Colors.Crimson
            });

            elementHost.Child = scs;
        }
Exemple #30
0
        public _3DGraph()
        {
            SciChartSurface.SetRuntimeLicenseKey(

                @"<LicenseContract>
				   <Customer>IRGUPS</Customer>
				   <OrderId>EDUCATIONAL-USE-0137</OrderId>
				   <LicenseCount>1</LicenseCount>
				   <IsTrialLicense>false</IsTrialLicense>
				   <SupportExpires>02/10/2021 00:00:00</SupportExpires>
				   <ProductCode>SC-WPF-SDK-PRO</ProductCode>
				   <KeyCode>lwAAAQEAAAD5I83qYuLVAYIAQ3VzdG9tZXI9SVJHVVBTO09yZGVySWQ9RURVQ0FUSU9OQUwtVVNFLTAxMzc7U3Vic2NyaXB0aW9uVmFsaWRUbz0xMC1GZWItMjAyMTtQcm9kdWN0Q29kZT1TQy1XUEYtU0RLLVBSTztOdW1iZXJEZXZlbG9wZXJzT3ZlcnJpZGU9MXRC1DrVIb2fNVT7eY8vX6L9nySC1+GVpdKsEApUFAC0K1k7hYwXqlKXhOIoilgwPQ==</KeyCode>
				 </LicenseContract>"                );
            var sciChart3DSurface = new SciChart3DSurface
            {
                IsAxisCubeVisible   = true,
                IsFpsCounterVisible = true,
                IsXyzGizmoVisible   = true,
                XAxis         = new NumericAxis3D(),
                YAxis         = new NumericAxis3D(),
                ZAxis         = new NumericAxis3D(),
                ChartModifier = new ModifierGroup3D(
                    new OrbitModifier3D(),
                    new ZoomExtentsModifier3D())
            };

            // Create the X,Y,Z Axis
            // Specify Interactivity Modifiers
            InitializeComponent();
            SciChartSurface.SetRuntimeLicenseKey(
                @"<LicenseContract>
				   <Customer>IRGUPS</Customer>
				   <OrderId>EDUCATIONAL-USE-0137</OrderId>
				   <LicenseCount>1</LicenseCount>
				   <IsTrialLicense>false</IsTrialLicense>
				   <SupportExpires>02/10/2021 00:00:00</SupportExpires>
				   <ProductCode>SC-WPF-SDK-PRO</ProductCode>
				   <KeyCode>lwAAAQEAAAD5I83qYuLVAYIAQ3VzdG9tZXI9SVJHVVBTO09yZGVySWQ9RURVQ0FUSU9OQUwtVVNFLTAxMzc7U3Vic2NyaXB0aW9uVmFsaWRUbz0xMC1GZWItMjAyMTtQcm9kdWN0Q29kZT1TQy1XUEYtU0RLLVBSTztOdW1iZXJEZXZlbG9wZXJzT3ZlcnJpZGU9MXRC1DrVIb2fNVT7eY8vX6L9nySC1+GVpdKsEApUFAC0K1k7hYwXqlKXhOIoilgwPQ==</KeyCode>
				 </LicenseContract>"                );
        }
Exemple #31
0
 public void TakeScreenShot(SciChartSurface sciChartSurface)
 {
     var dialog = new Microsoft.Win32.SaveFileDialog { Filter = "Image File (*.png)|*.png" };
     if (dialog.ShowDialog() != true) return;
     sciChartSurface.ExportToFile(dialog.FileName, ExportType.Png);
     MessageBox.Show("Screenshot saved successfully", GlobalData.MESSAGEBOXTITLE, MessageBoxButton.OK, MessageBoxImage.Information);
 }
		private void SetSurface(SciChartSurface surface)
		{
			_strategy.Environment.SetValue("Chart", surface);
		}
		private void ExecutedStartCommand(object sender, ExecutedRoutedEventArgs e)
		{
			var chart = new SciChartSurface
			{
				ChartModifier = new ModifierGroup(
					new RubberBandXyZoomModifier { ExecuteOn = ExecuteOn.MouseLeftButton },
					new ZoomExtentsModifier { ExecuteOn = ExecuteOn.MouseDoubleClick }
				)
			};
			ThemeManager.SetTheme(chart, "Chrome");
			ChartPanel.Content = chart;

			var grid = new UniversalGrid();
			GridPanel.Content = grid;

			try
			{
				_analyticStrategy = _scriptType.CreateInstance<BaseAnalyticsStrategy>();
				_analyticStrategy.ProcessStateChanged += s =>
				{
					if (_analyticStrategy != null && _analyticStrategy.ProcessState == ProcessStates.Stopped)
					{
						//_isProgress = false;
						_analyticStrategy = null;
					}
				};

				//_isProgress = true;
				_analyticStrategy.Security = _parameters.Security;
				_analyticStrategy.From = _parameters.From;
				_analyticStrategy.To = _parameters.To;
				_analyticStrategy.Environment.SetValue("Drive", _parameters.Drive);
				_analyticStrategy.Environment.SetValue("StorageFormat", _parameters.StorageFormat);
				_analyticStrategy.Environment.SetValue("Chart", chart);
				_analyticStrategy.Environment.SetValue("Grid", grid);
				_analyticStrategy.Start();
			}
			catch (Exception ex)
			{
				ex.LogError();
				//_isProgress = false;
				_analyticStrategy = null;
			}
		}