Example #1
0
 static void OnNameChanged(object sender, NameChangedEventArgs args)
 {
     if (args.ExistingName != null)
     {
         Console.WriteLine($"Grade book changing name from {args.ExistingName} to {args.NewName}");
     }
     else
     {
         Console.WriteLine($"Grade book's name is now {args.NewName}");
     }
 }
Example #2
0
 public override void setGradeName(string inputname)
 {
     if (GradeName != inputname)
     {
         NameChangedEventArgs args = new NameChangedEventArgs();
         args.ExistingString = GradeName;
         args.NewString      = inputname;
         NameChanged(this, args);
     }
     GradeName = inputname;
 }
Example #3
0
        /// <summary>
        /// Set name of gradebook
        /// </summary>
        /// <param name="name">Name of gradebook</param>
        /// <returns>New name of gradebook</returns>
        public string SetName(string name)
        {
            if (name != null)
            {
                //delegate
                NameChanged(this.name, name);

                //event
                NameChangedEventArgs args = new NameChangedEventArgs
                {
                    Oldvalue = this.name,
                    NewValue = name
                };
                NewNameChanged(this, args);

                this.name = name;
            }
            else
            {
                throw new ArgumentNullException("Name cannot be null");
            }
            return(this.name);
        }
Example #4
0
 private static void OnNameChanged2(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine("name changing");
 }
 private static void OnNameChanged(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine("Name changed from {0} to {1}", args.oldName, args.newName);
 }
Example #6
0
 static void OnNameChanged(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine($"Gradebook changing names from {args.ExistingName} to {args.NewName}");
 }
Example #7
0
 private static void OnNamechanged(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine($"name changed from {args.Existingname} to {args.NewName}");
 }
Example #8
0
 public static void NameChanged2(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine($"2nd subscriber : Name changed from {args.existingName} to {args.newName}!");
 }
Example #9
0
 static void OnNameChanged(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine("Grade book changing name from {0} to {1}", args.ExistingName, args.NewName);
 }
Example #10
0
 static void Derpa(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine($"{args.NewName}");
 }
Example #11
0
 private static void OnNameChanged(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine("Name changed from {0} to {1}", args.OldValue, args.NewValue);
 }
Example #12
0
 private static void OnNameChanged(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine($"Sender {sender} notified GradeBook of name change from {args.ExistingName} to {args.NewName}");
 }
Example #13
0
 private static void OnNameChanged(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine($"Name changed from {args.OldValue} to {args.NewValue}");
 }
 static void OnNameChangedReportChange(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine($"Grade book changed name from {args.Existing} to {args.NewName}");
 }
Example #15
0
 static void OnToon(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine($"Toon Events" +
                       $"{args.ExistingName}" +
                       $" to {args.NewName}");
 }
Example #16
0
 static void OnNameChanged(object sender, NameChangedEventArgs args)//i have told the onname changed to write below codes.
 {
     Console.WriteLine($"Grade Book changing name from {args.ExistingName} to {args.NewName}");
 }
Example #17
0
 /*        static void OnNameChanged(string existingName, string newName)
  *      {
  *          Console.WriteLine("Name changed from "+existingName+" to "+newName);
  *      }
  */
 static void OnNameChanged(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine("Name changed from " + args.ExistingName + " to " + args.NewName);
 }
 static void OnNameChanged(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine($"Grade Book changed name from '{args.ExistingName}' to '{args.NewName}'");
 }
Example #19
0
 void OnNameChanged(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine("Book name Changing from" + args.ExistingString + "to" + args.NewString);
 }
Example #20
0
 static void OnNameChanged(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine($"Grade Book [{args.OldName}] has been renamed to  [{args.NewName}]");
 }
Example #21
0
 void OnChanged(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine("Multiple delegates to same delgated method variable");
 }
Example #22
0
 static void OnNameChanged(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine($"Name changed from {args.OldName} to {args.NewName}");
 }
Example #23
0
 static void OnSecondNameChanged(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine($"Name changed second time from {args.ExistingName} to {args.NewName} by {sender.ToString()}");
 }
Example #24
0
 static void OnNameChanged(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine("OnNameChanged: " + args.NewName);
 }
Example #25
0
 private static void BookOnNameChanged(object sender, NameChangedEventArgs <string> eventArgs)
 {
     Console.WriteLine("Name changed to: " + eventArgs.NewName);
 }
Example #26
0
 static void OnNameChanged(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine("Grade book changing name from {0} to {1}", args.ExistingName, args.NewName);
 }
Example #28
0
 private static void OnNameChanged(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine($"Vardas pakeistas is {args.OldValue} i {args.NewValue}.");;
 }
Example #29
0
 static void OnNameChanged(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine($"Name of Grade Book Changed from {args.ExistingName} to {args.NewName}");
 }
Example #30
0
        /*  static void writeGrades(string message, int gradeResult)
         * {
         *       Console.WriteLine("{0}: {1:f2}", message , gradeResult);
         * }*/

        static void OnNameChanged(object sender, NameChangedEventArgs args)
        {
            Console.WriteLine($"Name of book changing from {args.CurrentName} to {args.NewName}");
        }
Example #31
0
 static void OnNameChangedReportChange(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine($"Grade book changed name from {args.Existing} to {args.NewName}");
 }
Example #32
0
 private static void OnNameChanged(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine("name changed from {0} to {1}",  args.OldValue, args.NewValue);
 }
Example #33
0
 static void OnNameChangedDrawStars(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine("***");
 }
Example #34
0
 private static void OnNameChanged2(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine("***");
 }
 static void OnNameChanged2(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine("***");
 }
 static void onNameChange(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine($"The books name has been changed from {args.ExistingName} to {args.NewName}");
 }
Example #37
0
 private static void OnNameChanged2(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine("GradeBookName: {0}", args.NewValue);
 }