Ejemplo n.º 1
0
        private void cmdSurveyDate_Click(object sender, EventArgs e)
        {
            frmSurveyDateTime frm = new frmSurveyDateTime(SurveyDate);

            if (frm.ShowDialog() == DialogResult.OK)
            {
                SurveyDate         = frm.SurveyDateTime;
                txtSurveyDate.Text = SurveyDate is SurveyDateTime?SurveyDate.ToString() : SurveyDateTime.NotSetString;
            }
        }
Ejemplo n.º 2
0
        public int CompareTo(DEMSurvey dem)
        {
            System.Diagnostics.Debug.WriteLine("Comparing '{0}' with {1} to '{2}' with {3}", Name, SurveyDate, dem.Name, dem.SurveyDate);

            if (SurveyDate == null || dem.SurveyDate == null)
            {
                return(-1);
            }
            else
            {
                return(SurveyDate.CompareTo(dem.SurveyDate));
            }
        }
Ejemplo n.º 3
0
        public override bool Equals(object obj)
        {
            var response = obj as Response;

            if (response != null)
            {
                return(ResponseID.ToString().Equals(response.ResponseID.ToString(), StringComparison.Ordinal) &&
                       RespondentID.Equals(response.RespondentID) &&
                       SurveyDate.Equals(response.SurveyDate) &&
                       Answer1.Equals(response.Answer1) &&
                       Answer2.Equals(response.Answer2) &&
                       Answer3.Equals(response.Answer3) &&
                       Answer4.Equals(response.Answer4) &&
                       Answer5.Equals(response.Answer5) &&
                       Answer6.Equals(response.Answer6));
            }

            return(false);
        }
Ejemplo n.º 4
0
        public Dictionary <string, string> AsDictionary()
        {
            var dict = new Dictionary <string, string> {
                { "study", "uqmndv1" },
                { "name", ParticipantName },
                { "user_id", ParticipantID },
                { "submission_date", SurveyDate.ToString() },
                { "submission", SurveyYYYYMMDD }
            };

            foreach (var s in _sections)
            {
                dict.Add(s.SectionVariable, s.CompletionText);
            }
            dict.Add("D21", Weight.ToString());
            foreach (var q in _questions)
            {
                dict.Add(q.QuestionVariable, Math.Round(q.AnswerValue, 1).ToString());
            }

            return(dict);
        }
Ejemplo n.º 5
0
        private void frmDEMProperties_Load(object sender, EventArgs e)
        {
            Cursor = Cursors.WaitCursor;

            Text       = string.Format("{0} Properties", Raster.Noun);
            cmdOK.Text = Properties.Resources.UpdateButtonText;

            txtName.Text = Raster.Name;
            txtPath.Text = ProjectManager.Project.GetRelativePath(Raster.Raster.GISFileInfo);

            ucRasterProperties1.Initialize(Raster.Noun, Raster.Raster);

            if (Raster is DEMSurvey)
            {
                txtSurveyDate.Text = SurveyDate is SurveyDateTime?SurveyDate.ToString() : SurveyDateTime.NotSetString;
            }
            else
            {
                lblSurveyDate.Visible       = false;
                txtSurveyDate.Visible       = false;
                cmdSurveyDate.Visible       = false;
                ucRasterProperties1.Height += ucRasterProperties1.Top - txtSurveyDate.Top;
                ucRasterProperties1.Top     = txtSurveyDate.Top;
            }

            if (!ProjectManager.IsArcMap)
            {
                cmdAddTopMap.Visible = false;
                txtPath.Width        = cmdAddTopMap.Right - txtPath.Left;
            }

            tTip.SetToolTip(txtName, "The name used to refer to this item within the GCD project. It cannot be empty and it must be unique among all other items of this type.");
            tTip.SetToolTip(txtPath, "The relative file path of this raster within the GCD project.");
            tTip.SetToolTip(cmdAddTopMap, "Add the raster to the current map document.");
            tTip.SetToolTip(txtSurveyDate, "The date on which the DEM survey was collected.");
            tTip.SetToolTip(cmdSurveyDate, "Configure the date on which the DEM survey was collected.");

            Cursor = Cursors.Default;
        }
Ejemplo n.º 6
0
 public override int GetHashCode()
 {
     return($"{MapImageName}:{CityVillageTownship}:{State}:{County}:{DefunctTownship}:{LotNumbers}:{Section}:{Tract}:{Range}:{SurveyDate.ToString()}:{SurveyorName}:{Address}:{CrossStreet}:{ParcelNumbers}:{AutomatedFileNumber}:{Subdivision}:{Sublot}:{SurveyName}:{ClientName}:{Notes}".GetHashCode());
 }