示例#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}");
     }
 }
示例#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;
 }
示例#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);
        }
示例#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);
 }
示例#6
0
 static void OnNameChanged(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine($"Gradebook changing names from {args.ExistingName} to {args.NewName}");
 }
示例#7
0
 private static void OnNamechanged(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine($"name changed from {args.Existingname} to {args.NewName}");
 }
示例#8
0
文件: Program.cs 项目: tonypie/Grades
 public static void NameChanged2(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine($"2nd subscriber : Name changed from {args.existingName} to {args.newName}!");
 }
示例#9
0
 static void OnNameChanged(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine("Grade book changing name from {0} to {1}", args.ExistingName, args.NewName);
 }
示例#10
0
 static void Derpa(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine($"{args.NewName}");
 }
示例#11
0
文件: Program.cs 项目: PeddleM/Grades
 private static void OnNameChanged(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine("Name changed from {0} to {1}", args.OldValue, args.NewValue);
 }
示例#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}");
 }
示例#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}");
 }
示例#15
0
 static void OnToon(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine($"Toon Events" +
                       $"{args.ExistingName}" +
                       $" to {args.NewName}");
 }
示例#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}");
 }
示例#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}'");
 }
示例#19
0
 void OnNameChanged(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine("Book name Changing from" + args.ExistingString + "to" + args.NewString);
 }
示例#20
0
 static void OnNameChanged(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine($"Grade Book [{args.OldName}] has been renamed to  [{args.NewName}]");
 }
示例#21
0
 void OnChanged(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine("Multiple delegates to same delgated method variable");
 }
示例#22
0
文件: Program.cs 项目: plvice/c-lama
 static void OnNameChanged(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine($"Name changed from {args.OldName} to {args.NewName}");
 }
示例#23
0
 static void OnSecondNameChanged(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine($"Name changed second time from {args.ExistingName} to {args.NewName} by {sender.ToString()}");
 }
示例#24
0
 static void OnNameChanged(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine("OnNameChanged: " + args.NewName);
 }
示例#25
0
 private static void BookOnNameChanged(object sender, NameChangedEventArgs <string> eventArgs)
 {
     Console.WriteLine("Name changed to: " + eventArgs.NewName);
 }
示例#26
0
 static void OnNameChanged(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine("Grade book changing name from {0} to {1}", args.ExistingName, args.NewName);
 }
示例#28
0
 private static void OnNameChanged(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine($"Vardas pakeistas is {args.OldValue} i {args.NewValue}.");;
 }
示例#29
0
 static void OnNameChanged(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine($"Name of Grade Book Changed from {args.ExistingName} to {args.NewName}");
 }
示例#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}");
        }
示例#31
0
 static void OnNameChangedReportChange(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine($"Grade book changed name from {args.Existing} to {args.NewName}");
 }
示例#32
0
 private static void OnNameChanged(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine("name changed from {0} to {1}",  args.OldValue, args.NewValue);
 }
示例#33
0
 static void OnNameChangedDrawStars(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine("***");
 }
示例#34
0
文件: Program.cs 项目: PeddleM/Grades
 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}");
 }
示例#37
0
 private static void OnNameChanged2(object sender, NameChangedEventArgs args)
 {
     Console.WriteLine("GradeBookName: {0}", args.NewValue);
 }