Ejemplo n.º 1
0
        public MainForm()
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();

            Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");

            //
            // TODO: Add constructor code after the InitializeComponent() call.
            //

            // Get configuration for environment

            // Get startup path
            path = Directory.GetCurrentDirectory() + @"\";

            // Create http manager object
            httpManager = new HttpManager();

            // Get configuration
            this.GetConfig();

            // Initialize SymbolManager
            symbolManager = new SymbolManager();

            // Initialize plugins services
            dataServices     = new DataServices();
            graphicsServices = new GraphicsServices();

            // Get data and plugin's instances
            if (Directory.Exists(path + "Data"))
            {
                this.GetSymbols();
                this.DisplaySymbols();
            }
            else
            {
                Directory.CreateDirectory(path + "Data");
            }

            if (Directory.Exists(path + "Plugins"))
            {
                this.GetDataSources();
                this.GetTools();
            }
            else
            {
                Directory.CreateDirectory(path + @"Plugins");
            }

            // Check if directory Plugins\Config exists

            if (!Directory.Exists(path + @"Plugins\Config"))
            {
                Directory.CreateDirectory(path + @"Plugins\Config");
            }
        }
 private void dx_LoadContent(object sender, GraphicsServiceEventArgs e)
 {
     services = new GraphicsServices();
     services.Initialize(e.Service);
     scene.LoadContent(services);
     //
     LoadRegion();
 }
Ejemplo n.º 3
0
        public Dictionary <string, string> GetChartSources()
        {
            GraphicsServices            gs           = new GraphicsServices();
            Dictionary <string, string> chartSources = new Dictionary <string, string>();

            chartSources.Add("Gender", gs.GetSrcByDemographic(this.genderPopulation ? "Gender" : "General", "Population"));
            chartSources.Add("General", gs.GetSrcByDemographic("General", "Univariate"));
            chartSources.Add("Category", gs.GetSrcByDemographic("Category", "Univariate"));
            chartSources.Add("Location", gs.GetSrcByDemographic("Location", "Univariate"));
            return(chartSources);
        }
Ejemplo n.º 4
0
        //=============================

        public void LoadContent(GraphicsServices service)
        {
            if (!watch.IsRunning)
            {
                Camera.Init(50f, service.Graphics.Viewport);
                //
                vis_tree.Load(service);
                //
                watch.Start();
            }
        }
Ejemplo n.º 5
0
        public void Initialise()
        {
            Services.ForAll(service => service.Init());

            GameObject cameraObject = this.CreateGameObject();

            this.MainCamera = cameraObject.AddComponent <Camera>();

            GraphicsServices.GetService <RenderForm>().FormClosed += (_, __) => this.Dispose();

            this.IsInitialised = true;
        }
Ejemplo n.º 6
0
        public void Run()
        {
            if (this.IsInitialised == false)
            {
                throw new InvalidOperationException("Engine not initialised.");
            }

            RenderLoop.Run(GraphicsServices.GetService <RenderForm>(), () =>
            {
                this.Update();
                this.Render();
            });
        }
Ejemplo n.º 7
0
        public FormConfigTools(GraphicsServices _graphicsServices)
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();

            //
            // TODO: Add constructor code after the InitializeComponent() call.
            //

            graphicsServices = _graphicsServices;
        }
Ejemplo n.º 8
0
        public Graphic[] GetGraphics()
        {
            GraphicsServices _graphicsServices = new GraphicsServices();

            graphics = new Graphic[_graphicsServices.GetAllRecords().Count()];
            var values = _graphicsServices.GetAllRecords();
            int cont   = 0;

            foreach (var value in values)
            {
                graphics[cont] = value;
                cont++;
            }
            return(graphics);
        }