Ejemplo n.º 1
0
        public ProjectCreationForm(GnsserProject Project)
        {
            InitializeComponent();

            this.Project = Project;
            this.ObjectToUi();
        }
Ejemplo n.º 2
0
        public void ObjectToUi()
        {
            if (Project == null)
            {
                Project = new GnsserProject();
            }

            this.Text = Project.ProjectName + "的信息";
            this.textBox_projFilePath.Text = Project.ProjectFilePath;


            this.textBox_ProjName.Text       = this.Project.ProjectName;
            this.timePeriodControl1.TimeFrom = this.Project.Session.Start.DateTime;
            this.timePeriodControl1.TimeTo   = this.Project.Session.End.DateTime;

            this.multiGnssSystemSelectControl1.SetSatelliteTypes(this.Project.SatelliteTypes);
            this.directoryProjectDirectory.Path        = this.Project.ProjectDirectory;
            this.directoryObservationDirectory.Path    = this.Project.ObservationDirectory;
            this.directoryCommonDirectory.Path         = this.Project.CommonDirectory;
            this.directoryMiddleDirectory.Path         = this.Project.MiddleDirectory;
            this.directoryOutputDirectory.Path         = this.Project.OutputDirectory;
            this.directoryRevisedObsDirectory.Path     = this.Project.RevisedObsDirectory;
            this.directorySelectionControlParam.Path   = this.Project.ParamDirectory;
            this.directorySelectionControl1Script.Path = this.Project.ScriptDirectory;
        }
Ejemplo n.º 3
0
        public ProjectEditForm(GnsserProject Project)
        {
            InitializeComponent();
            this.button_saveOrCreate.Text = "修改";

            this.Project = Project;
            projectInfoControl1.EntityToUi();
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 是否变化
        /// </summary>
        private void ReadAndShow()
        {
            var path = Project.ProjectFilePath;

            Geo.IO.ConfigReader reader = new Geo.IO.ConfigReader(path);
            var config = reader.Read();

            Project = new GnsserProject(config);

            ObjectToUi();
        }
Ejemplo n.º 5
0
        public void EntityToUi()
        {
            if (Entity == null)
            {
                Entity = new GnsserProject();
            }

            this.Text = Entity.ProjectName + "的信息";

            this.textBox_ProjName.Text       = this.Entity.ProjectName;
            this.timePeriodControl1.TimeFrom = this.Entity.Session.Start.DateTime;
            this.timePeriodControl1.TimeTo   = this.Entity.Session.End.DateTime;
            this.textBox_projDirectory.Text  = this.Entity.ProjectDirectory;
            this.multiGnssSystemSelectControl1.SetSatelliteTypes(this.Entity.SatelliteTypes);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 执行
        /// </summary>
        /// <returns></returns>
        public override bool Do()
        {
            var reader = new IoParamReader(this.OperationInfo.ParamFilePath);

            reader.ItemSpliters = new string[] { "\t" };
            foreach (var item in reader)
            {
                this.CurrentParam = item;
                if (File.Exists(item.OutputPath))
                {
                    if (item.IsOverwrite)
                    {
                        this.StatedMessage         = StatedMessage.Processing;
                        this.StatedMessage.Message = "文件(夹)已存在,即将覆盖 " + item.OutputPath;
                        this.OnStatedMessageProduced();
                    }
                    else
                    {
                        this.StatedMessage         = StatedMessage.Processing;
                        this.StatedMessage.Message = "文件(夹)已存在,操作取消 " + item.OutputPath;
                        this.OnStatedMessageProduced();
                    }
                }

                string directory = Geo.Utils.FileUtil.GetDirectory(item.OutputPath);

                GnsserProject Project = new GnsserProject();
                Project.ProjectDirectory = directory;
                Project.CheckOrCreateProjectDirectories();
                //添加工作流
                Project.SetWorkflowFiles(item.InputPath);

                Project.SaveToFile();

                this.StatedMessage         = StatedMessage.Processing;
                this.StatedMessage.Message = "已在 " + directory + " 创建工程目录 ";
                this.OnStatedMessageProduced();

                //if (Geo.Utils.FileUtil.MoveFileOrDirectory(key.InputPath, key.OutputPath, key.IsOverwrite))
                //{
                //    this.StatedMessage = StatedMessage.Processing;
                //    this.StatedMessage.Message = "已移动 " + key.InputPath + " 到 " + key.OutputPath;
                //    this.OnStatedMessageProduced();
                //}
            }
            return(true);
        }
Ejemplo n.º 7
0
        public void UiToObject()
        {
            if (Project == null)
            {
                Project = new GnsserProject();
            }

            this.Project.ProjectName = this.textBox_ProjName.Text.Trim();

            this.Text = Project.ProjectName + "的信息";

            this.Project.Session              = new Geo.Times.BufferedTimePeriod(this.timePeriodControl1.TimeFrom, this.timePeriodControl1.TimeTo);
            this.Project.SatelliteTypes       = this.multiGnssSystemSelectControl1.SatelliteTypes;
            this.Project.ProjectDirectory     = this.directoryProjectDirectory.Path;
            this.Project.ObservationDirectory = this.directoryObservationDirectory.Path;
            this.Project.CommonDirectory      = this.directoryCommonDirectory.Path;
            this.Project.MiddleDirectory      = this.directoryMiddleDirectory.Path;
            this.Project.OutputDirectory      = this.directoryOutputDirectory.Path;
            this.Project.RevisedObsDirectory  = this.directoryRevisedObsDirectory.Path;
            this.Project.ParamDirectory       = this.directorySelectionControlParam.Path;
            this.Project.ScriptDirectory      = this.directorySelectionControl1Script.Path;
        }