コード例 #1
0
ファイル: Form1.cs プロジェクト: clirade/OrderSplitting
        //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();
        }
コード例 #2
0
        public Ref <ResolutionScopes> FromModuleName(Name1 name1)
        {
            var scope = GetScopeByName(name1, true);
            var def   = new ValueSlot <ResolutionScopes> {
                Value = scope
            };

            return(def.GetRef());
        }
コード例 #3
0
        public Ref <ResolutionScopes> FromAssemblyName(Name1 name1)
        {
            var scope = GetScopeByName(name1, false);
            var def   = new ValueSlot <ResolutionScopes> {
                Value = scope
            };

            return(def.GetRef());
        }
コード例 #4
0
ファイル: Location.cs プロジェクト: RHoKSoton/GeoLocationTool
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = (Name1 != null ? Name1.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Name2 != null ? Name2.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Name3 != null ? Name3.GetHashCode() : 0);
         return(hashCode);
     }
 }
コード例 #5
0
        private void btnListen_Click_1(object sender, EventArgs e)
        {
            IPAddress  ipAddr     = IPAddress.Parse(txtIp.Text);
            ChatServer mainServer = new ChatServer(ipAddr);

            ChatServer.StatusChanged += new StatusChangedEventHandler(mainServer_StatusChanged);
            mainServer.StartListening();
            btnListen.Enabled = false;
            txtIp.Enabled     = false;
            Name1.Start();
            MessageBox.Show("Default Administrative Username and password is. Username: Admin, Password: 123987", "Default Admin Username/Pass");
        }
コード例 #6
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);
     }
 }
コード例 #7
0
 protected virtual void draw_data(SpriteBatch sprite_batch)
 {
     foreach (TextSprite label in Stat_Labels)
     {
         label.draw(sprite_batch, -Loc);
     }
     foreach (Sprite stat in Stats)
     {
         stat.draw(sprite_batch, -Loc);
     }
     Name1.draw(sprite_batch, -Loc);
     Name2.draw(sprite_batch, -Loc);
     if (Weapon_Name_Visible)
     {
         Target_Weapon.draw(sprite_batch, -Loc);
     }
 }
コード例 #8
0
 private void Name_KeyDown(object sender, System.Windows.Input.KeyEventArgs e)
 {
     if (e.Key == Key.Space)
     {
         e.Handled = true;
     }
     if (e.Key == Key.Back && Name1.Text.Length == 1)
     {
         Name1.Text = "";
     }
     if (e.Key == Key.Back && Name1.Text.Length == 0)
     {
         Name1.SetValue(TextBoxHelper.WatermarkProperty, "请输入数据包名称");
         OK.IsEnabled = false;
     }
     oldIndex = Name1.CaretIndex;
     oldText  = Name1.Text;
 }
コード例 #9
0
        public Def<ResolutionScopes> DefineReferencedAssemblyName(Name1 assemblyName)
        {
            IMetadataScope scope;

            if (assemblyName.FullName == "mscorlib")
            {
                // Ensure corlib was added
                scope = this.module.TypeSystem.Corlib;
            }
            else
            {
                var assemblyRef = new AssemblyNameReference(assemblyName.FullName, null);
                module.AssemblyReferences.Add(assemblyRef);
                scope = assemblyRef;
            }

            return new ValueSlot<ResolutionScopes> { Value = scope };
        }
コード例 #10
0
        private IMetadataScope GetScopeByName(Name1 name1, bool isModule)
        {
            if (isModule)
            {
                throw new SyntaxException(Parsing.Location, Parsing.HLocation, "Module scope resolution is not supported by now.");
            }

            string name = name1.FullName;
            AssemblyNameReference result;

            result = module.AssemblyReferences.FirstOrDefault(a => a.Name == name);
            if (result == null)
            {
                var msg = string.Format("Missing assembly reference '{0}'.", name);
                throw new SyntaxException(Parsing.Location, Parsing.HLocation, msg);
            }

            return result;
        }
コード例 #11
0
        private IMetadataScope GetScopeByName(Name1 name1, bool isModule)
        {
            if (isModule)
            {
                throw new SyntaxException(Parsing.Location, Parsing.HLocation, "Module scope resolution is not supported by now.");
            }

            string name = name1.FullName;
            AssemblyNameReference result;

            result = module.AssemblyReferences.FirstOrDefault(a => a.Name == name);
            if (result == null)
            {
                var msg = string.Format("Missing assembly reference '{0}'.", name);
                throw new SyntaxException(Parsing.Location, Parsing.HLocation, msg);
            }

            return(result);
        }
コード例 #12
0
        public Def <ResolutionScopes> DefineReferencedAssemblyName(Name1 assemblyName)
        {
            IMetadataScope scope;

            if (assemblyName.FullName == "mscorlib")
            {
                // Ensure corlib was added
                scope = this.module.TypeSystem.Corlib;
            }
            else
            {
                var assemblyRef = new AssemblyNameReference(assemblyName.FullName, null);
                module.AssemblyReferences.Add(assemblyRef);
                scope = assemblyRef;
            }

            return(new ValueSlot <ResolutionScopes> {
                Value = scope
            });
        }
コード例 #13
0
 private void Name3_Tick_3(object sender, EventArgs e)
 {
     this.Text = "Running..." + txtIp.Text;
     Name1.Start();
     Name3.Stop();
 }
コード例 #14
0
 private void Name1_Tick_1(object sender, EventArgs e)
 {
     this.Text = "Running...";
     Name2.Start();
     Name1.Stop();
 }
コード例 #15
0
ファイル: Registration.cs プロジェクト: Kirik13/ShoeStore
 private void Name1_Enter(object sender, EventArgs e)
 {
     Name1.Clear();
     Name1.ForeColor = Color.Black;
 }
コード例 #16
0
 public Ref<ResolutionScopes> FromModuleName(Name1 name1)
 {
     var scope = GetScopeByName(name1, true);
     var def = new ValueSlot<ResolutionScopes> { Value = scope };
     return def.GetRef();
 }
コード例 #17
0
 public Ref<ResolutionScopes> FromAssemblyName(Name1 name1)
 {
     var scope = GetScopeByName(name1, false);
     var def = new ValueSlot<ResolutionScopes> { Value = scope };
     return def.GetRef();
 }
コード例 #18
0
 public bool Equals(Entry other)
 {
     return(Name1.Equals(other.Name1) && Name2.Equals(other.Name2) && Score == other.Score && Mode == other.Mode);
 }