Exemple #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (Category != null ? Category.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (CateringCode != null ? CateringCode.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ConnectionIndicator != null ? ConnectionIndicator.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (CourseIndicator != null ? CourseIndicator.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (HeadCode != null ? HeadCode.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (OperatingCharacteristics != null ? OperatingCharacteristics.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (PortionId != null ? PortionId.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (PowerType != null ? PowerType.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (int)RecordIdentity;
         hashCode = (hashCode * 397) ^ (int)Reservations;
         hashCode = (hashCode * 397) ^ (Rsid != null ? Rsid.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (int)SeatingClass;
         hashCode = (hashCode * 397) ^ (ServiceBranding != null ? ServiceBranding.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ServiceCode != null ? ServiceCode.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (int)Sleepers;
         hashCode = (hashCode * 397) ^ Speed;
         hashCode = (hashCode * 397) ^ (TimingLoad != null ? TimingLoad.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Tiploc != null ? Tiploc.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (TiplocSuffix != null ? TiplocSuffix.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (TrainIdentity != null ? TrainIdentity.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (UicCode != null ? UicCode.GetHashCode() : 0);
         return(hashCode);
     }
 }
 static private IEnumerator WaitForRequest(WWW recvResult)
 {
     //UnityEngine.Debug.Log ("entering wait for request");
     while (!recvResult.isDone && string.IsNullOrEmpty(recvResult.error))
     {
         ConnectionIndicator.SetWaitingIndication(true);
         yield return(null);
     }
     //UnityEngine.Debug.Log ("exiting waiting for request");
     ConnectionIndicator.SetWaitingIndication(false);
 }
Exemple #3
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(gameObject);
     }
 }
Exemple #4
0
        public MainView()
        {
            Text       = "ThinkForce";
            KeyPreview = true;
            BackColor  = Color.FromArgb(245, 245, 245);

            Label = new UILabel();

            Label.Text      = "BRAINWAVE RECEIVER | LAMP CONTROL";
            Label.TextAlign = ContentAlignment.MiddleLeft;
            Label.Font      = new Font("Trebuchet MS", 9, FontStyle.Bold);

            AddView(Label);

            InstructionLabel           = new UILabel();
            InstructionLabel.TextAlign = ContentAlignment.MiddleLeft;
            InstructionLabel.Font      = new Font("Trebuchet MS", 9, FontStyle.Regular);
            InstructionLabel.Text      = "Assign keys to turn lamps on, off or to change their color ";

            AddView(InstructionLabel);

            Indicator = new ConnectionIndicator();

            AddView(Indicator);

            turnOn  = new KeyConfirmationBox("Turn on ");
            turnOff = new KeyConfirmationBox("Turn off ");

            colorChange1 = new KeyConfirmationBox("Change color to ", true);
            colorChange2 = new KeyConfirmationBox("Change color to ", true);

            AddView(turnOn);
            AddView(turnOff);

            AddView(colorChange1);
            AddView(colorChange2);

            BottomInstructionLabel           = new UILabel();
            BottomInstructionLabel.TextAlign = ContentAlignment.MiddleLeft;
            BottomInstructionLabel.Font      = new Font("Trebuchet MS", 9, FontStyle.Regular);
            BottomInstructionLabel.Text      = "* Click on a color to 'choose' that color";

            AddView(BottomInstructionLabel);
        }
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (AtocCode != null ? AtocCode.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (AtsCode != null ? AtsCode.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (int)BankHolidayRunning;
         hashCode = (hashCode * 397) ^ (int)CateringCode;
         hashCode = (hashCode * 397) ^ (ConnectionIndicator != null ? ConnectionIndicator.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (CourseIndicator != null ? CourseIndicator.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (DataSource != null ? DataSource.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ DateRunsFrom.GetHashCode();
         hashCode = (hashCode * 397) ^ DateRunsTo.GetHashCode();
         hashCode = (hashCode * 397) ^ (HeadCode != null ? HeadCode.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (int)OperatingCharacteristics;
         hashCode = (hashCode * 397) ^ (OperatingCharacteristicsString != null ? OperatingCharacteristicsString.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (PortionId != null ? PortionId.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (int)PowerType;
         hashCode = (hashCode * 397) ^ (int)RecordIdentity;
         hashCode = (hashCode * 397) ^ (int)Reservations;
         hashCode = (hashCode * 397) ^ (Rsid != null ? Rsid.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (int)RunningDays;
         hashCode = (hashCode * 397) ^ (ScheduleLocations != null ? ScheduleLocations.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (int)SeatingClass;
         hashCode = (hashCode * 397) ^ (int)ServiceBranding;
         hashCode = (hashCode * 397) ^ (int)ServiceTypeFlags;
         hashCode = (hashCode * 397) ^ (int)Sleepers;
         hashCode = (hashCode * 397) ^ Speed;
         hashCode = (hashCode * 397) ^ (int)StpIndicator;
         hashCode = (hashCode * 397) ^ (TimingLoad != null ? TimingLoad.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (TrainCategory != null ? TrainCategory.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (TrainIdentity != null ? TrainIdentity.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (TrainServiceCode != null ? TrainServiceCode.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (TrainStatus != null ? TrainStatus.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (TrainUid != null ? TrainUid.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (UicCode != null ? UicCode.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (UniqueId != null ? UniqueId.GetHashCode() : 0);
         return(hashCode);
     }
 }
 private void OnDestroy()
 {
     s_instance = null;
 }
 private void Awake()
 {
     s_instance    = this;
     this.m_active = false;
     this.m_indicator.SetActive(false);
 }