コード例 #1
0
ファイル: Page.xaml.cs プロジェクト: molihub/LiveGeometry
        private void UpdateConfigurationFromText(string text)
        {
            var lines = text.Split('\n', '\r')
                        .Where(s => !string.IsNullOrEmpty(s)).ToArray();

            if (lines == null || lines.Length < 3)
            {
                return;
            }
            RoutingAlgorithm algorithm = new RoutingAlgorithm();

            algorithm.ParseInput(lines[0], lines[1], lines[2]);
            CreateConfiguration(algorithm.Start, algorithm.End, algorithm.Polygon);
        }