Esempio n. 1
0
        private void init(string folder)
        {
            net = new ValuesNet(maxDepth);
            ValuesNetManager.fillValuesNet(net, folder,
                                           (s, args) =>
            {
                updateActionProgress(args.ProgressPercentage);
            },
                                           (s, args) =>
            {
                vnetGMap = new ValuesNetGMap(net, mapView);
                mapView.OnMapZoomChanged += delegate
                {
                    Title = vnetGMap.visibleSquaresCount.ToString();
                };
                mapView.OnMapDrag += delegate
                {
                    Title = vnetGMap.visibleSquaresCount.ToString();
                };

                MainCanvas.Children.Clear();
                MainCanvas.Children.Add(vnetGMap);

                /*vnet = new ValuesNetElement(MainCanvas, net);
                 *
                 * MainCanvas.Children.Clear();
                 * MainCanvas.Children.Add(vnet);*/
            });
        }
Esempio n. 2
0
        public void init() //random initializer
        {
            net = new ValuesNet(maxDepth);
            Random rnd = new Random();

            ValuesNetManager.fillValuesNet(net, rnd, valuesCount,
                                           (s, args) =>
            {
                updateActionProgress(args.ProgressPercentage);
            },
                                           (s, args) =>
            {
                //vnet = new ValuesNetElement(MainCanvas, net);
                ValuesNetGMap vnetGMap = new ValuesNetGMap(net, mapView);

                MainCanvas.Children.Clear();
                MainCanvas.Children.Add(vnetGMap);
            });
        }