public override int GetHashCode() { int hash = 1; if (Id.Length != 0) { hash ^= Id.GetHashCode(); } if (registrationDate_ != null) { hash ^= RegistrationDate.GetHashCode(); } if (CompanyWebsite.Length != 0) { hash ^= CompanyWebsite.GetHashCode(); } if (ContactPhone.Length != 0) { hash ^= ContactPhone.GetHashCode(); } if (ContactName.Length != 0) { hash ^= ContactName.GetHashCode(); } if (CompanyLogo.Length != 0) { hash ^= CompanyLogo.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { var hashCode = 1027370663; hashCode = hashCode * -1521134295 + ID.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(FirstName); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(LastName); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Patronymic); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Name); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Birthday); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Phone); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Email); hashCode = hashCode * -1521134295 + RegistrationDate.GetHashCode(); hashCode = hashCode * -1521134295 + DateLastVisit.GetHashCode(); hashCode = hashCode * -1521134295 + CountVisit.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Title); return(hashCode); }
public override string ToString() { return(PrivateName.ToString() + FamilyName.ToString() + MailAddress.ToString() + Status.ToString() + RegistrationDate.ToString() + EntryDate.ToString() + ReleaseDate.ToString() + Area.ToString() + Type.ToString() + Adults.ToString() + Children.ToString() + Pool.ToString() + Jacuzzi.ToString() + Garden.ToString() + ChildrensAttractions.ToString()); }
public override string ToString() { StringBuilder sb = new StringBuilder(100); sb.Append("Name: ").Append(Name).Append(", type: ").Append(Type).Append(Environment.NewLine) .Append("Owner: ").Append(Owner.Name).Append(", phone number: ").Append(Owner.PhoneNumber) .Append(Environment.NewLine).Append("Registration date: ") .Append(RegistrationDate.ToString("dd.MM.yyyy")); return(sb.ToString()); }
public IEnumerable <SearchQueryCriteria <Client> > GetClientCriterias() { yield return(Q.MapString(s => new SearchQueryCriteria <Client>(x => x.Email.Contains(s) || x.PhoneNumber.Contains(s) || x.Name.Contains(s)))); yield return(Deactivated.MapNullable(d => new SearchQueryCriteria <Client>(x => x.DeActivated == d))); yield return(RegistrationDate.GetSearchCriteriaFromGenericRange <Client, DateTime>(x => x.CreatedOn)); if (SearchSex) { yield return(new SearchQueryCriteria <Client>(x => x.Sex == Sex)); } }
/// <summary> /// this function describing the guest request /// </summary> /// <returns> /// returns a string with the details /// </returns> public override string ToString() { //string result = " מספר הבקשה לאירוח: " + GuestRequestKey + '\n' + "שם הלקוח: " + PrivateName + '\n' + ' ' + FamilyName + '\n' + "מייל: " + MailAddress + '\n' + " סטטוס הבקשה: " + Status + '\n' + // "תאריך רישום למערכת: " + (RegistrationDate.ToString()).Remove(10) + '\n' + "תאריך רצוי לתחילת הנופש: " + (EntryDate.ToString()).Remove(10) + '\n' + "תאריך רצוי לסיום הנופש: " + (ReleaseDate.ToString()).Remove(10) + '\n' + // "אזור הנופש הרצוי בארץ: " + Area + '\n' + "סוג יחידת האירוח הרצוי: " + Type + '\n' + "מספר המבוגרים: " + Adults + '\n' + "מספר ילדים: " + Children + '\n' + // "בריכה: " + Pool + '\n' + "ג'קוזי: " + Jacuzzi + '\n' + " גינה: " + Garden + '\n'; string result = "Guest Request Key: " + GuestRequestKey + '\n' + "Name: " + PrivateName + ' ' + FamilyName + '\n' + "Mail Address: " + MailAddress + '\n' + " Status: " + Status + '\n' + "Registration Date: " + (RegistrationDate.ToString()).Remove(10) + '\n' + "Entry Date: " + (EntryDate.ToString()).Remove(10) + '\n' + "Release Date: " + (ReleaseDate.ToString()).Remove(10) + '\n' + "Area: " + Area + '\n' + "Type of Hosting Unit: " + Type + '\n' + "Adults: " + Adults + '\n' + " Children: " + Children + '\n' + " Pool: " + Pool + '\n' + "Jacuzzi: " + Jacuzzi + '\n' + "Garden: " + Garden + '\n'; return(result); }
/// <summary> /// Sets billing address for the party /// </summary> /// <param name="address">The address</param> /// <param name="city">The city</param> /// <param name="postalCode">The postal code</param> /// <param name="province">The province</param> /// <param name="country">The country</param> /// <param name="effectiveDate">The country</param> public void ChangeBillingAddress(string address, string city, string postalCode, string province, string country, DateTime effectiveDate) { if (string.IsNullOrEmpty(address) || string.IsNullOrEmpty(city) || string.IsNullOrEmpty(country)) { throw new InvalidOperationException("A valid address, city and country must be provided"); } if (effectiveDate < RegistrationDate.ToLocalTime()) { throw new ArgumentException("Cannot change the billing address to an effective date before the registration date", nameof(effectiveDate)); } var e = new PartyBillingAddressChangedEvent(Id, address, city, postalCode, province, country, effectiveDate); RaiseEvent(e); }
/// <summary> /// Sets legal address for the party /// </summary> /// <param name="address">The address</param> /// <param name="city">The city</param> /// <param name="postalCode">The postal code</param> /// <param name="province">The province</param> /// <param name="country">The country</param> /// <param name="effectiveDate">The country</param> /// <param name="userId"></param> public void ChangeLegalAddress(string address, string city, string postalCode, string province, string country, DateTime effectiveDate, Guid userId) { if (string.IsNullOrEmpty(address) || string.IsNullOrEmpty(city) || string.IsNullOrEmpty(country)) { throw new InvalidOperationException("A valid address, city and country must be provided"); } if (effectiveDate > DateTime.Now) { throw new ArgumentException("The legal address change cannot be scheduled in the future", nameof(effectiveDate)); } if (effectiveDate < RegistrationDate.ToLocalTime()) { throw new ArgumentException("Cannot change the legal address to an effective date before the registration date", nameof(effectiveDate)); } var e = new PartyLegalAddressChangedEvent(Id, address, city, postalCode, province, country, effectiveDate, userId); RaiseEvent(e); }
public bool Add(string name, string password) { bool res = false; bool nameExist = CheckNameInDb(name); if (nameExist == true) { res = false; } else { RegistrationDate = DateTime.Now; string date = RegistrationDate.ToString(); string stm = "INSERT INTO " + DbTable + " (name, registration_date, password) VALUES ('" + name + "', '" + date + "', '" + password + "')"; Db.RunNonQuery(stm); res = true; } return(res); }
public void ChangeName(string newName, DateTime effectiveDate, Guid userId) { if (string.IsNullOrEmpty(newName)) { throw new ArgumentException("The new Company name must be specified", nameof(newName)); } if (effectiveDate > DateTime.Now) { throw new ArgumentException("The name change cannot be scheduled in the future", nameof(effectiveDate)); } if (effectiveDate < RegistrationDate.ToLocalTime()) { throw new ArgumentException("Cannot change the company name to an effective date before the registration date", nameof(effectiveDate)); } var e = new CompanyNameChangedEvent(this.Id, newName, effectiveDate, userId); RaiseEvent(e); }
public override string ToString() // יש לממש בהתאם לדרישות הפרוייקט. { string str = ""; str += "Guest request key : " + GuestRequestKey + "\n" + "Geust name: " + PrivateName + " " + FamilyName + "\n" + "MailAddress: " + MailAddress + "\n" + "Status: " + Status + "\n" + "Registration Date: " + RegistrationDate.ToString() + "\n" + "Entry date: " + EntryDate.Date.ToString() + "\n" + "Release date: " + ReleaseDate.Date.ToString() + "\n" + "Area: " + Area + "\n" + "type: " + type + "\n" + "Adults: " + Adults + "\n" + "Children" + Children + "\n" + "Pool: " + Pool + "\n" + "Jacuzzi: " + Jacuzzi + "\n" + "Garden: " + Garden + "\n" + "Childrens Attractions: " + ChildrensAttractions + "\n"; return(str); }
public override string ToString() { return("Guest Request Key: " + GuestRequestKey.ToString() + "\n" + "First Name: " + FirstName + "\n" + "LastName: " + LastName + "\n" + "MailAddress: " + MailAddress + "\n" + "Status: " + Status.ToString() + "\n" + "RegistrationDate: " + RegistrationDate.ToString() + "\n" + "EntryDate: " + EntryDate.ToString() + "\n" + "ReleaseDate: " + ReleaseDate.ToString() + "\n" + "Area: " + Area.ToString() + "\n" + "SubArea: " + SubArea + "\n" + "Type of unit: " + Type.ToString() + "\n" + "number of adoults: " + Adults.ToString() + "\n" + "number of children: " + Children.ToString() + "\n" + "want swimming pool? " + Pool.ToString() + "\n" + "want jacuzzi? " + Jacuzzi.ToString() + "\n" + "want a garden? " + Garden.ToString() + "\n" + "want children attractions? " + ChildrensAttractions.ToString() + "\n"); }
public override string ToString() { string ret = "בקשה מספר: " + GuestRequestKey + "\nשם פרטי: " + PrivateName + "\t\tשם משפחה: " + FamilyName + "\nמייל: " + MailAddress + "\tמספר מבוגרים: " + Adults + "\nמספר ילדים: " + Children + "\t\tתאריך רישום: " + RegistrationDate.ToString("dd/MM/yyyy") + "\nתאריך כניסה: " + EntryDate.ToString("dd/MM/yyyy") + "\tתאריך יציאה: " + ReleaseDate.ToString("dd/MM/yyyy") + "\nסטטוס: " + HebrewEnum.GuestReqStatus(Status) + "\t\tאיזור: " + HebrewEnum.Area(Area) + "\nסוג: " + HebrewEnum.GuestReqType(Type) + "\t\tבריכה: " + HebrewEnum.options(Pool) + "\nג'קוז: " + HebrewEnum.options(Jacuzzi) + "\t\tגינה: " + HebrewEnum.options(Garden) + "\nאטרקציות לילדים: " + HebrewEnum.options(ChildrensAttractions); return(ret); }
public override string ToString() { return("Guest Request Key: " + GuestRequestKey.ToString() + "\n" + "Private Name: " + PrivateName.ToString() + "\n" + "Family Name: " + FamilyName.ToString() + "\n" + "Mail Address: " + MailAddress.ToString() + "\n" + "Request's status: " + Status.ToString() + "\n" + "Registration Date: " + RegistrationDate.ToString() + "\n" + "Entry Date: " + EntryDate.ToString() + "\n" + "Release Date: " + ReleaseDate.ToString() + "\n" + "Request Area: " + Area.ToString() + "\n" + "Request Type: " + Type.ToString() + "\n" + "Adults: " + Adults.ToString() + "\n" + "Children: " + Children.ToString() + "\n" + "Pool: " + Pool.ToString() + "\n" + "Jacuzzi " + Jacuzzi.ToString() + "\n" + "Garden: " + Garden.ToString() + "\n" + "Beach: " + Beach.ToString() + "\n" + "Attractions: " + ChildrenAttractions.ToString() + "\n" + "Minimum price: " + minPrice.ToString() + "\n" + "Maximum price: " + maxPrice.ToString() + "\n"); }
/// <summary> /// The function returns the GuestRequest information in a string type /// </summary> /// <returns>The GuestRequest information in string type</returns> ///<seealso cref="Object.ToString()"/> public override string ToString() { string res = ""; res += "Guest Request Key: " + GuestRequestKey + "\n"; res += "Private Name: " + PrivateName + "\n"; res += "Family Name: " + FamilyName + "\n"; res += "Mail Address: " + MailAddress + "\n"; res += "Status: " + Status + "\n"; res += "Registration Date: " + RegistrationDate.ToString("dd.MM.yyyy") + "\n"; res += "Entry Date: " + EntryDate.ToString("dd.MM.yyyy") + "\n"; res += "Release Date: " + ReleaseDate.ToString("dd.MM.yyyy") + "\n"; res += "Area: " + Area + "\n"; res += "Type: " + Type + "\n"; res += "Adults: " + Adults + "\n"; res += "Children: " + Children + "\n"; res += "Pool: " + Pool + "\n"; res += "Jacuzzi: " + Jacuzzi + "\n"; res += "Garden" + Garden + "\n"; res += "Childrens Attractions: " + ChildrensAttractions + "\n"; return(res); }
public void Add(RegisteredCourse type) { lock (type) { if (Count == RegisteredCourseId.Length) { var newLength = RegisteredCourseId.Length + 1000; var _RegisteredCourseId = new string[newLength]; RegisteredCourseId.CopyTo(_RegisteredCourseId); RegisteredCourseId = _RegisteredCourseId; var _RegistrationDate = new System.DateTime[newLength]; RegistrationDate.CopyTo(_RegistrationDate); RegistrationDate = _RegistrationDate; var _StudentId = new string[newLength]; StudentId.CopyTo(_StudentId); StudentId = _StudentId; var _Semester = new string[newLength]; Semester.CopyTo(_Semester); Semester = _Semester; var _MountedCourseId = new string[newLength]; MountedCourseId.CopyTo(_MountedCourseId); MountedCourseId = _MountedCourseId; var _AcademicYear = new string[newLength]; AcademicYear.CopyTo(_AcademicYear); AcademicYear = _AcademicYear; var _Approved = new bool[newLength]; Approved.CopyTo(_Approved); Approved = _Approved; } RegisteredCourseId.Span[Count] = type.RegisteredCourseId; RegistrationDate.Span[Count] = type.RegistrationDate; StudentId.Span[Count] = type.StudentId; Semester.Span[Count] = type.Semester; MountedCourseId.Span[Count] = type.MountedCourseId; AcademicYear.Span[Count] = type.AcademicYear; Approved.Span[Count] = type.Approved; } }
public override string ToString() { return("Guest Request Key: " + GuestRequestKey.ToString() + "\n" + "PrivateName: " + PrivateName.ToString() + "\n" + "FamilyName: " + FamilyName.ToString() + "\n" + "Area: " + Area.ToString() + "\n" + "Sub Area: " + SubArea.ToString() + "\n" + "Type: " + Type.ToString() + "\n" + "Adults: " + Adults.ToString() + "\n" + "Children: " + Children.ToString() + "\n" + "Pool: " + Pool.ToString() + "\n" + "Jacuzzi " + Jacuzzi.ToString() + "\n" + "Garden: " + Garden.ToString() + "\n" + "Status: " + Status.ToString() + "\n" + "Mail Address: " + MailAddress.ToString() + "\n" + "Registration Date: " + RegistrationDate.ToString() + "\n" + "EntryDate: " + EntryDate.ToString() + "\n" + "ReleaseDate: " + ReleaseDate.ToString() + "\n" + "Synagogue: " + Synagogue.ToString() + "\n" + "Childrens Attractions: " + ChildrensAttractions.ToString() + "\n" ); }
public override int GetHashCode() { var hashCode = 701007377; hashCode = hashCode * -1521134295 + GuestRequestKey.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <Guest> .Default.GetHashCode(GuestPersonalDetails); hashCode = hashCode * -1521134295 + Status.GetHashCode(); hashCode = hashCode * -1521134295 + RegistrationDate.GetHashCode(); hashCode = hashCode * -1521134295 + EntryDate.GetHashCode(); hashCode = hashCode * -1521134295 + ReleaseDate.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <List <AreaTypes> > .Default.GetHashCode(Areas); hashCode = hashCode * -1521134295 + EqualityComparer <List <string> > .Default.GetHashCode(SunbAreas); hashCode = hashCode * -1521134295 + Type.GetHashCode(); hashCode = hashCode * -1521134295 + Adults.GetHashCode(); hashCode = hashCode * -1521134295 + Children.GetHashCode(); hashCode = hashCode * -1521134295 + Pool.GetHashCode(); hashCode = hashCode * -1521134295 + HotTub.GetHashCode(); hashCode = hashCode * -1521134295 + Garden.GetHashCode(); hashCode = hashCode * -1521134295 + ChildrenAttractions.GetHashCode(); return(hashCode); }
public void MergeFrom(CompanyProfilePayload other) { if (other == null) { return; } if (other.Id.Length != 0) { Id = other.Id; } if (other.registrationDate_ != null) { if (registrationDate_ == null) { RegistrationDate = new global::Google.Protobuf.WellKnownTypes.Timestamp(); } RegistrationDate.MergeFrom(other.RegistrationDate); } if (other.CompanyWebsite.Length != 0) { CompanyWebsite = other.CompanyWebsite; } if (other.ContactPhone.Length != 0) { ContactPhone = other.ContactPhone; } if (other.ContactName.Length != 0) { ContactName = other.ContactName; } if (other.CompanyLogo.Length != 0) { CompanyLogo = other.CompanyLogo; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }
public override string ToString() { string isSubArea = SubArea != default(Enum_s.SubArea) ? " Specific Area: " + SubArea.ToString("g") : ""; return("Guest Request ID: " + GuestRequestKey.ToString() + " Name: " + FirstName + ' ' + LastName + " Mail Address: " + MailAddress + "\nOrder Status: " + Status.ToString("g") + " Application Date: " + RegistrationDate.ToString("d") + " Check In Date: " + EntryDate.ToString("d") + " Check Out Date: " + ReleaseDate.ToString("d") + "\nArea: " + Area.ToString("g") + isSubArea + " Hosting Unit Type: " + Type + "\nYour Group: Adults- " + Adults.ToString() + " Children- " + Children.ToString() + " Special Additions: Pool- " + Pool.ToString("g") + " Jucuzzi- " + Jacuzzi.ToString("g") + " Garden- " + Garden.ToString("g") + " Attractions For Children- " + ChildrenAttractions.ToString("g") + '\n'); }
public void FillBasicInformation(string br, string name, string othername) { Thread.Sleep(5000); WebDriver.driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(30); Thread.Sleep(3000); txtBRNumber.EnterText(br); txtConBRNumber.EnterText(br); Actions dropdown = new Actions(WebDriver.driver); dpdCorporateStatus.ButtonClick(); dropdown.SendKeys(Keys.ArrowDown).SendKeys(Keys.Enter).Perform(); Thread.Sleep(2000); dpdCountry.ButtonClick(); dropdown.SendKeys(Keys.ArrowDown).SendKeys(Keys.Enter).Perform(); Thread.Sleep(2000); dpdCorporateType.ButtonClick(); Thread.Sleep(2000); chkClient.ButtonClick(); Thread.Sleep(5000); txtCorporateName.ButtonClick(); Thread.Sleep(2000); dpdBusinessType.ButtonClick(); dropdown.SendKeys(Keys.ArrowDown).SendKeys(Keys.Enter).Perform(); Thread.Sleep(1000); IJavaScriptExecutor js = WebDriver.driver as IJavaScriptExecutor; js.ExecuteScript("window.scrollBy(0,200);"); Thread.Sleep(1000); dpdCorporateGrade.ButtonClick(); dropdown.SendKeys(Keys.ArrowDown).SendKeys(Keys.Enter).Perform(); Thread.Sleep(2000); txtCorporateName.EnterText(name); txtCorporateOtherName.EnterText(othername); Thread.Sleep(2000); WebDriver.driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(30); Actions acc = new Actions(WebDriver.driver); RegistrationDate.ButtonClick(); Thread.Sleep(2000); RegMonth.ButtonClick(); acc.SendKeys(Keys.ArrowUp).SendKeys(Keys.Enter).Perform(); RegYear.ButtonClick(); acc.SendKeys(Keys.ArrowUp).SendKeys(Keys.Enter).Perform(); Thread.Sleep(2000); RegDate.ButtonClick(); dpdLanguage.ButtonClick(); dropdown.SendKeys(Keys.ArrowDown).SendKeys(Keys.Enter).Perform(); Thread.Sleep(2000); dpdSector.ButtonClick(); dropdown.SendKeys(Keys.ArrowDown).SendKeys(Keys.Enter).Perform(); Thread.Sleep(1000); dpdCommunicationMode.ButtonClick(); chkCommunication.ButtonClick(); Thread.Sleep(1000); txtCorporateName.ButtonClick(); dpdSupplierType.ButtonClick(); dropdown.SendKeys(Keys.ArrowDown).SendKeys(Keys.Enter).Perform(); Thread.Sleep(2000); IJavaScriptExecutor jsc = WebDriver.driver as IJavaScriptExecutor; jsc.ExecuteScript("window.scrollBy(0,-200);"); Thread.Sleep(2000); btnNext.ButtonClick(); Thread.Sleep(3000); }
public override bool IsSettingsDefault() { return(ObservationDate.IsSettingsDefault() && RegistrationDate.IsSettingsDefault() && ChangeDate.IsSettingsDefault()); }
public void ResetSettings() { ObservationDate.ResetSettings(); RegistrationDate.ResetSettings(); ChangeDate.ResetSettings(); }
public override string ToString() { string Answer = "Last Name: " + LastName + ", \nFirst Name: " + FirstName + ", \nEmail Address: " + Email + ", \nOrder Number: " + GuestRequestKey + ", \nRegistration Date: " + RegistrationDate.ToString("dd/MM/yyyy") + ", \nEntry Date: " + EntryDate.ToString("dd/MM/yyyy") + ", \nRelease Date: " + ReleaseDate.ToString("dd/MM/yyyy") + ", \nHosting Unit Type: " + HostingUnitType + ", \nArea: " + Area + ", \nClient Requirement Status: " + RequirementStatus + ",\nNum Of Adults: " + NumOfAdults + ", \nNum Of Kids: " + NumOfKids + ", \nPool: " + Pool + ", \nJacuzzi: " + Jacuzzi + ", \nPorch: " + Porch + ", \nAttractions: " + ChildrenAttractions + ", \nFood: " + Food + "\n"; return(Answer); }
/// <summary> /// Compare two Scout based on how long they have been scouts. /// </summary> /// <param name="other">The other scout</param> /// <returns></returns> public int CompareTo(Scout other) { return(RegistrationDate.CompareTo(other.RegistrationDate)); }
public RegistrationExists(Guid personId, Guid registrationTarget, RegistrationDate registrationDate) { PersonId = personId; RegistrationTarget = registrationTarget; RegistrationDate = registrationDate; }
/// <summary> /// Get the information from the device once it is connected /// </summary> public async void Connect() { HCM = new Device(); for (int j = 0; j < 15; j++) { MessageFromUnit = ""; MySerialPort.DiscardInBuffer(); MySerialPort.WriteLine(DeviceCommand.DEVICE_INFORMATION); await DelayTime(200); MessageFromUnit = MySerialPort.ReadExisting(); string[] temp = MessageFromUnit.Split(','); if (temp.Length >= 6) { if (MessageFromUnit.Contains("HT-DEVIC,001,HCM001")) { if (temp[3].Length == 9) { temp[3] = temp[3].Substring(1, 8); } HCM.SerialNumber = temp[3]; HCM.RegistrationDate = RegistrationDate.GetRegistrationDate(temp[3]); HCM.HardwareVersion = temp[4]; HCM.FirmwareVersion = temp[5].RemoveLineBreaks(); EnableButtons = false; break; } } } if (!EnableButtons) { for (int j = 0; j < 5; j++) { MySerialPort.DiscardInBuffer(); MySerialPort.DiscardOutBuffer(); MySerialPort.WriteLine(DeviceCommand.HCM_DATA_MODE); await DelayTime(200); MessageFromUnit = MySerialPort.ReadExisting(); if (MessageFromUnit.Contains("HT-CALIB,001")) { break; } } for (int j = 0; j < 5; j++) { MessageFromUnit = ""; MySerialPort.DiscardInBuffer(); MySerialPort.WriteLine("HT-DEVIC,060"); await DelayTime(200); MessageFromUnit = MySerialPort.ReadExisting(); if (MessageFromUnit.Contains("HT-DEVIC,060")) { string[] temp = MessageFromUnit.Split(','); HCM.MACAddress = (temp[2]).RemoveLineBreaks(); break; } } for (int j = 0; j < 5; j++) { MessageFromUnit = ""; MySerialPort.DiscardInBuffer(); MySerialPort.WriteLine("HT-DEVIC,056"); await DelayTime(200); MessageFromUnit = MySerialPort.ReadExisting(); if (MessageFromUnit.Contains("HT-DEVIC,056")) { string[] temp = MessageFromUnit.Split(','); temp[3] = temp[3].RemoveLineBreaks(); HCM.BuildDate = temp[2] + " - " + temp[3]; break; } } for (int j = 0; j < 5; j++) { MessageFromUnit = ""; MySerialPort.DiscardInBuffer(); MySerialPort.WriteLine(DeviceCommand.HCM_GET_LAST_CALIBRATED_DATE); await DelayTime(200); MessageFromUnit = MySerialPort.ReadExisting(); if (MessageFromUnit.Contains("HT-CALIB,007")) { string[] temp = MessageFromUnit.Split(','); HCM.LastCalibratedDate = temp[4] + "/" + temp[5] + "/20" + temp[3]; break; } } for (int j = 0; j < 5; j++) { MessageFromUnit = ""; MySerialPort.DiscardInBuffer(); MySerialPort.WriteLine(DeviceCommand.HCM_GET_NEXT_CALIBRATION_DATE); await DelayTime(200); MessageFromUnit = MySerialPort.ReadExisting(); if (MessageFromUnit.Contains("HT-CALIB,007")) { string[] temp = MessageFromUnit.Split(','); HCM.NextCalibrationDate = temp[4] + "/" + temp[5] + "/20" + temp[3]; break; } } HCM.BootloaderVersion = "1400"; DisplayMessage("Completed", MessageTypeEnum.Info); } else { DisplayMessage("Cannot set device into data mode", MessageTypeEnum.Critical); } }