Exemplo n.º 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"]);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Update Progress for each iteration.
        /// </summary>
        /// <param name="Iteration"></param>
        private void RpIsProgress_Update(int CurrentIteration)
        {
            int TotalIterations = int.Parse(RpIsSettings["iterations"]);
            int DisplayN        = int.Parse(RpIsSettings["displayn"]);
            int LastSavePoint   = int.Parse(RpIsLastSavePointTextBox.Text);
            int NextSavePoint   = (CurrentIteration / DisplayN + 1) * DisplayN;

            if (NextSavePoint - LastSavePoint > DisplayN)
            {
                LastSavePoint = NextSavePoint - DisplayN;
                RpListView.FileListReload(RpSavePath, "RetrievedPhase*.png");
            }

            RpIsProgressBar.Value            = (CurrentIteration - LastSavePoint) * 100 / DisplayN;
            RpIsCurrentIterationTextBox.Text = CurrentIteration.ToString() + "/" + TotalIterations.ToString();
            RpIsLastSavePointTextBox.Text    = LastSavePoint.ToString();
            RpIsNextSavePointTextBox.Text    = NextSavePoint.ToString();
        }