Пример #1
0
        private void btnCalc_Click(object sender, RoutedEventArgs e)
        {
            double[,] data = new double[ras.height, ras.width];
            for (int i = 0; i < ras.height; i++)
            {
                for (int j = 0; j < ras.width; j++)
                {
                    data[i, j] = ras.buffer[i * ras.width + j];
                }
            }
            //double[,] data = { { 1.0, 2.0, 3.0 }, { 2.0, 3.0, 4.0 } };
            //int[] start = { 0, 0 };
            int[]      start  = { (int)startPoint.X, (int)startPoint.Y };
            int[]      end    = { (int)endPoint.X, (int)endPoint.Y };
            List <int> result = new List <int>();
            //int[] temp = { 1, 2, 98, 2, 98, 40, 20, 40, 20, 25 };
            //result = temp.ToList();
            string method = comboxCalc.Text;

            SSSPClient.get(method).call(data, start, end).ForEach(x => result.Add(x));
            mapControl.DrawPath(result);
        }
Пример #2
0
 private void RibbonWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     SSSPClient.closeAll();
     //SSSPClient.get("pregel").Close();
 }