示例#1
0
        public Guitar search(Guitar searchGuitar) {
            for (int i = 0; i < this.guitars.Count; i++) {
                Guitar guitar = this.guitars[i];

                string builder = searchGuitar.getBuilder();
                if ((builder != null) && (!builder.Equals("")) && (!builder.Equals(guitar.getBuilder()))) {
                    continue;
                }

                // TODO : compare each property of the guitar

                return guitar;
            }

            return null;
        }
示例#2
0
        public Guitar search(Guitar searchGuitar)
        {
            for (int i = 0; i < this.guitars.Count; i++)
            {
                Guitar guitar = this.guitars[i];

                string builder = searchGuitar.getBuilder();
                if ((builder != null) && (!builder.Equals("")) && (!builder.Equals(guitar.getBuilder())))
                {
                    continue;
                }

                // TODO : compare each property of the guitar

                return(guitar);
            }

            return(null);
        }
示例#3
0
 private void displaySorryMessage(Guitar guitar) {
     string sorryMsg = String.Format("Not found guitar build from {0}.", guitar.getBuilder());
     MessageBox.Show(sorryMsg);
 }
示例#4
0
        private void displaySorryMessage(Guitar guitar)
        {
            string sorryMsg = String.Format("Not found guitar build from {0}.", guitar.getBuilder());

            MessageBox.Show(sorryMsg);
        }