private void AboutCommand_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            ProfileDialog dialog = new ProfileDialog();

            dialog.Owner = this;
            dialog.ShowDialog();
        }
        // Команда создания нового профиля
        private void NewProfile_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            // создать диалоговое окно для настойки и создания профиля
            ProfileDialog dialog = new ProfileDialog(true, null);

            dialog.Owner = this;

            // если результат показа диалога равен true, создать новый профиль
            if (dialog.ShowDialog() == true)
            {
                Profile profile = new Profile();
                // установить выбранные значения в диалоге для нового профиля
                profile.Name            = dialog.ProfileName;
                profile.Precision       = dialog.Precision;
                profile.LWPolyline      = dialog.LWPolyline;
                profile.ConvertPolyline = dialog.ConvertPolyline;
                profile.MoveToZero      = dialog.MoveToZero;
                profile.IgnoreLineType  = dialog.IgnoreOtherLines;
                profile.ConvertEllipse  = dialog.ConvertEllipse;
                profile.IsR13           = dialog.CreateR13;

                // добавить профиль в коллекцию
                profiles.Add(profile);
                profiles.CurrentProfile = profiles.Count - 1;
            }
        }
        private void ShowBaseProfile_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            ProfileDialog dialog = new ProfileDialog(false, profiles[profiles.CurrentProfile]);

            dialog.Owner = this;

            dialog.ShowDialog();
        }
        // Команда изменения текущего профиля
        private void ChandgeProfile_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            // создать диалог создания и редактирования профиля
            ProfileDialog dialog = new ProfileDialog(false, profiles[profiles.CurrentProfile])
            {
                Owner = this
            };

            // показать его, если результатом является true, установить новые значения в текущем профиле
            if (dialog.ShowDialog() == true)
            {
                profiles[profiles.CurrentProfile].Precision       = dialog.Precision;
                profiles[profiles.CurrentProfile].LWPolyline      = dialog.LWPolyline;
                profiles[profiles.CurrentProfile].ConvertPolyline = dialog.ConvertPolyline;
                profiles[profiles.CurrentProfile].MoveToZero      = dialog.MoveToZero;
                profiles[profiles.CurrentProfile].IgnoreLineType  = dialog.IgnoreOtherLines;
                profiles[profiles.CurrentProfile].ConvertEllipse  = dialog.ConvertEllipse;
                profiles[profiles.CurrentProfile].IsR13           = dialog.CreateR13;
            }
        }
        // Команда изменения точек, если такие имеются в файле DXF
        private void ChangePoint_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            // открыть диалог, предлагающий выбор действий с точками
            ProfileDialog dialog = new ProfileDialog(document.PointsCount);

            dialog.Owner = this;

            if (dialog.ShowDialog() == true)
            {
                // если выбрано удалить все точки, запустить метод удаления
                if (dialog.DelPoints)
                {
                    document.DeletePoints();
                }
                else
                {
                    // если выбран цвет, то изменить цвет
                    document.ChangePointsColor(dialog.Color);
                }
            }
        }
        private void FindPoints()
        {
            // если в документе есть точки не отмеченные как разметка или незамкнутый контур
            if (document.IsPointsAsMainLine)
            {
                // открыть диалог, предлагающий выбор, что сделать с точками
                ProfileDialog dialog = new ProfileDialog(document.PointsCount);
                dialog.Owner = this;

                if (dialog.ShowDialog() == true)
                {
                    // если выбрано удалить все точки, запустить метод удаления
                    if (dialog.DelPoints)
                    {
                        document.DeletePoints();
                    }
                    else
                    {
                        // если выбран цвет, то изменить цвет
                        document.ChangePointsColor(dialog.Color);
                    }
                }
            }
        }