示例#1
0
        /// <summary>
        /// Use an additional dialog window to get the distance
        /// for an edge as specified by the user
        /// </summary>
        /// <returns>The distance value specified by the user</returns>
        private double GetEdgeDistance()
        {
            double         distance = 0.0;
            DistanceDialog dd       = new DistanceDialog();

            dd.Owner = this;

            dd.ShowDialog();
            distance = dd.Distance;

            return(distance);
        }
示例#2
0
        /// <summary>
        /// Use an additional dialog window to get the distance
        /// for an edge as specified by the user
        /// </summary>
        /// <returns>The distance value specified by the user</returns>
        public double GetEdgeDistance()
        {
            double distance = 0.0;

            if (rbBellman.IsChecked == true || rbDijkstra.IsChecked == true)
            {
                DistanceDialog dd = new DistanceDialog();
                dd.Owner = this;

                dd.ShowDialog();
                distance = dd.Distance;
            }
            else
            {
                MessageBox.Show("Kenar girebilmek için önce bir algoritma seçiniz!", "Hata", MessageBoxButton.OK, MessageBoxImage.Hand);
            }

            return(distance);
        }