private void Decompose6()
        {
            var n = new Name3("A", "B", "C");

            var(f, m, l) = n;
            Console.WriteLine($"{f}, {m}, {l}");
        }
Exemple #2
0
        //Next button
        private void button1_Click(object sender, EventArgs e)
        {
            double fee = 0;

            ResultPanel.Visible = false;

            if (checkBox1.Checked)
            {
                MoesPanel.Visible       = true;
                this.MoesTitle.Location = new System.Drawing.Point(230, 10);
                MoesTitle.Text          = "MOE'S";
                fee = 3.0;
            }
            else if (checkBox2.Checked)
            {
                MoesPanel.Visible       = true;
                this.MoesTitle.Location = new System.Drawing.Point(210, 10);
                MoesTitle.Text          = "CHINESE";
                fee = 3.0;
            }
            else if (checkBox3.Checked)
            {
                MoesPanel.Visible       = true;
                this.MoesTitle.Location = new System.Drawing.Point(200, 10);
                MoesTitle.Text          = "SONNY && TONY'S";
                fee = 2.5;
            }
            else if (checkBox4.Checked)
            {
                MoesPanel.Visible       = true;
                this.MoesTitle.Location = new System.Drawing.Point(190, 10);
                MoesTitle.Text          = "CHICKEN && RIB CRIB";
                fee = 2.0;
            }
            else if (checkBox5.Checked)
            {
                MoesPanel.Visible = true;
                MoesTitle.Text    = " ";
            }
            else
            {
                showError("Check a box!");
                return;
            }

            tipBox.Text = "20";
            delBox.Text = Convert.ToString(fee);

            //Always empty the boxes when clicking next
            Name1.Clear();  price1.Clear();
            Name2.Clear();  price2.Clear();
            Name3.Clear();  price3.Clear();
            Name4.Clear();  price4.Clear();
            Name5.Clear();  price5.Clear();
            Name6.Clear();  price6.Clear();
            Name7.Clear();  price7.Clear();
            Name8.Clear();  price8.Clear();
            Name9.Clear();  price9.Clear();
            Name10.Clear(); price10.Clear();
        }
Exemple #3
0
        public static Name3 SetupNameForPutRequest()
        {
            Name3 name = new Name3();

            name.title  = "Mr";
            name.first  = "John";
            name.middle = "P";
            name.last   = "Smith";
            return(name);
        }
Exemple #4
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Id.Length != 0)
            {
                hash ^= Id.GetHashCode();
            }
            if (Name1 != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Name1);
            }
            if (Name2 != 0F)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Name2);
            }
            if (Name3 != 0)
            {
                hash ^= Name3.GetHashCode();
            }
            if (Name4 != 0L)
            {
                hash ^= Name4.GetHashCode();
            }
            if (Name5 != 0)
            {
                hash ^= Name5.GetHashCode();
            }
            if (Name6 != 0UL)
            {
                hash ^= Name6.GetHashCode();
            }
            if (Name7 != false)
            {
                hash ^= Name7.GetHashCode();
            }
            if (Name8.Length != 0)
            {
                hash ^= Name8.GetHashCode();
            }
            hash ^= name9_.GetHashCode();
            hash ^= name10_.GetHashCode();
            hash ^= name11_.GetHashCode();
            hash ^= name12_.GetHashCode();
            hash ^= name13_.GetHashCode();
            hash ^= name14_.GetHashCode();
            hash ^= name15_.GetHashCode();
            hash ^= name16_.GetHashCode();
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Exemple #5
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (Name1 != null ? Name1.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Name2 != null ? Name2.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Name3 != null ? Name3.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Course;
         hashCode = (hashCode * 397) ^ (Group != null ? Group.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Title != null ? Title.GetHashCode() : 0);
         return(hashCode);
     }
 }
Exemple #6
0
        /// <summary>
        /// Constructor for a Framing DSO.
        /// It takes a ViewportFoV and a DeepSkyObject and calculates XY values in pixels from the top left edge of the image subtracting half of its size.
        /// Those coordinates can be used to place the DSO including its name and size in any given image.
        /// </summary>
        /// <param name="dso">The DSO including its coordinates</param>
        /// <param name="viewport">The viewport of the offending DSO</param>
        public FramingDSO(DeepSkyObject dso, ViewportFoV viewport)
        {
            dsoType      = dso.DSOType;
            arcSecWidth  = viewport.ArcSecWidth;
            arcSecHeight = viewport.ArcSecHeight;

            if (dso.Size != null && dso.Size >= arcSecWidth)
            {
                sizeWidth = dso.Size.Value;
            }
            else
            {
                sizeWidth = DSO_DEFAULT_SIZE;
            }

            if (dso.Size != null && dso.Size >= arcSecHeight)
            {
                sizeHeight = dso.Size.Value;
            }
            else
            {
                sizeHeight = DSO_DEFAULT_SIZE;
            }

            Id    = dso.Id;
            Name1 = dso.Name;
            Name2 = dso.AlsoKnownAs.FirstOrDefault(m => m.StartsWith("M "));
            Name3 = dso.AlsoKnownAs.FirstOrDefault(m => m.StartsWith("NGC "));

            if (Name3 != null && Name1 == Name3.Replace(" ", ""))
            {
                Name1 = null;
            }

            if (Name1 == null && Name2 == null)
            {
                Name1 = Name3;
                Name3 = null;
            }

            if (Name1 == null && Name2 != null)
            {
                Name1 = Name2;
                Name2 = Name3;
                Name3 = null;
            }

            coordinates = dso.Coordinates;

            RecalculateTopLeft(viewport);
        }
 private void Name3_Tick_3(object sender, EventArgs e)
 {
     this.Text = "Running..." + txtIp.Text;
     Name1.Start();
     Name3.Stop();
 }
 private void Name2_Tick_1(object sender, EventArgs e)
 {
     this.Text = "Services Hosted By: " + txtIp.Text;
     Name3.Start();
     Name2.Stop();
 }
 public static void Deconstruct(this Name3 n, out string first, out string middle, out string last)
 {
     first  = n.First;
     middle = n.Middle;
     last   = n.Last;
 }