Beispiel #1
0
        private async void RpDpEfsBrowseButton_Click(object sender, EventArgs e)
        {
            if (openConfigFileDialog.ShowDialog() == DialogResult.OK)
            {
                RpDpEfsPathTextBox.Text = openConfigFileDialog.FileName;
                RpDataSet.ImportXml(RpDpEfsPathTextBox.Text);
                RpEfsSavePath = RpDpEfsPathTextBox.Text.Substring(0, RpDpEfsPathTextBox.Text.LastIndexOf('\\'));

                if (RpDpEfsRadioButton.Checked == true)
                {
                    RpSavePath = RpEfsSavePath;
                }
                foreach (DataRow item in RpDataSet.Tables["PhaseRetrievalData"].Rows)
                {
                    if (item.IsMergedAt(RpEfsSavePath))
                    {
                        item["Merged"] = true;
                    }
                    else
                    {
                        item["Merged"] = false;
                    }
                }
                RpIsSettings = RpDataSet.Tables["Settings"].ToDictionary();
                RpListView.FileListReload(RpSavePath, "RetrievedPhase*.png");
                await UpdateLastIteration(RpEfsSavePath + '\\' + RpIsSettings["filename"]);
            }
        }
Beispiel #2
0
 private void RpDpFileListMergeButton_Click(object sender, EventArgs e)
 {
     if (saveFolderDialog.ShowDialog() == DialogResult.OK)
     {
         RpDataSet.ExportXml(saveFolderDialog.SelectedPath + "\\RpData.xml");
         // new MatlabServer (saveFolderDialog.SelectedPath);
     }
 }
Beispiel #3
0
        private async void RpRetrieveButton_Click(object sender, EventArgs e)
        {
            string SavePath;

            if (RpDpNfsRadioButton.Checked == true)
            {
                SavePath = RpDpNfsSavePathTextBox.Text;
                try
                {
                    if (Directory.GetFileSystemEntries(SavePath).Length > 0)
                    {
                        MessageBox.Show(
                            "The folder to store the outputs is not empty, please select an empty folder.",
                            "Folder not empty",
                            MessageBoxButtons.OK,
                            MessageBoxIcon.Information);
                        return;
                    }
                }
                catch
                {
                    MessageBox.Show(
                        "The path to store the outputs is illegal.",
                        "Path illegal",
                        MessageBoxButtons.OK,
                        MessageBoxIcon.Information);
                    return;
                }
            }
            else
            {
                SavePath = RpEfsSavePath;
            }

            if (!UpdateLastIteration(RpEfsSavePath + '\\' + RpIsSettings["filename"]).IsCompleted)
            {
                return;
            }

            RpRetrieveButton.Enabled          = false;
            RpDpSavePathPanel.Enabled         = false;
            RpIsDataGridView.ReadOnly         = true;
            RpDpFileListDataGridView.ReadOnly = true;
            RpDpFileListControlPanel.Enabled  = false;
            RpStopButton.Enabled = true;

            RpIsLastSavePointTextBox.Text = RpIsSettings["lastiteration"];
            RpIsSettings = RpDataSet.Tables["Settings"].ToDictionary();
            RpIsProgress_Update(int.Parse(RpIsLastSavePointTextBox.Text));
            RpDataSet.ExportXml(SavePath + "\\PhaseRetrievalConfig.xml");

            RpWorkFlow RetrievePhase = new RpWorkFlow(SavePath, OutputLog, RpCts.Token);
            await RetrievePhase.Run(Stop);
        }