Ejemplo n.º 1
0
        private void MItemNew_Click(object sender, RoutedEventArgs e)
        {
            OpenFileDialog dialog = new OpenFileDialog()
            {
                Title            = "选择地图背景图",
                Filter           = "图像文件(*.jpg,*.png)|*.jpg;*.png",
                RestoreDirectory = true, //保存对话框是否记忆上次打开的目录
                CheckPathExists  = true, //检查目录
            };
            bool?ok = dialog.ShowDialog();

            if (ok == false)
            {
                return;
            }

            // 使用一张图片来新建项目
            NewProject(dialog.FileNames[0]);

            // 设置参数
            OptionWindow optionWindow = new OptionWindow();

            optionWindow.ShowDialog();

            // 创建地图
            CreateMap();
        }
Ejemplo n.º 2
0
        private void MItemOpt_Click(object sender, RoutedEventArgs e)
        {
            if (MapHandle.Instance.ProjData == null)
            {
                return;
            }

            OptionWindow window = new OptionWindow();

            window.ShowDialog();

            if (OptionWindow.changed)
            {
                CreateMap();
            }
        }