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);*/
            });
        }
        private void init(List <CPDataGeo> CPdata)
        {
            net = new ValuesNet(maxDepth);

            ValuesNetManager.fillValuesNet(net, CPdata,
                                           (s, args) =>
            {
                updateActionProgress(args.ProgressPercentage);
            },
                                           (s, args) =>
            {
                vnet = new ValuesNetElement(MainCanvas, net);

                MainCanvas.Children.Clear();
                MainCanvas.Children.Add(vnet);
            });
        }
        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);
            });
        }