示例#1
0
 // 5) declare method NewGoods for event initiation
 // use parameter string to get GoodsName
 internal void NewGoods(string GoodsName)
 {
     if (event4 != null)
     {
         var lol1 = new GoodsInfoEventArgs(GoodsName);
         event4(this, lol1);
     }
 }
示例#2
0
        // 8) declare method GotNewGoods with 2 parameters:
        // 1 - object type
        // 2 - GoodsInfoEventArgs type

        public void GotNewGoods(object sender, GoodsInfoEventArgs eventArgs)
        {
            Console.WriteLine($"For {name} is new good: {eventArgs.GoodsName}");
        }
示例#3
0
        // 8) declare method GotNewGoods with 2 parameters:
        // 1 - object type
        // 2 - GoodsInfoEventArgs type

        public void GotNewGoods(object sender, GoodsInfoEventArgs e)
        {
            Console.WriteLine("Hello new good");
        }
示例#4
0
        // 8) declare method GotNewGoods with 2 parameters:
        // 1 - object type
        // 2 - GoodsInfoEventArgs type

        public void GotNewGoods(object sender, GoodsInfoEventArgs e)
        {
            Console.WriteLine("Hello new good");
        }
示例#5
0
        // 7) declare constructor to initialize name


        // 8) declare method GotNewGoods with 2 parameters:
        // 1 - object type
        // 2 - GoodsInfoEventArgs type
        public void GotNewGoods(object sender, GoodsInfoEventArgs e)
        {
            Console.WriteLine("pisechka");
        }
示例#6
0
 // 8) declare method GotNewGoods with 2 parameters:
 // 1 - object type
 // 2 - GoodsInfoEventArgs type
 public void GotNewGoods(object obj, GoodsInfoEventArgs e)
 {
     Console.WriteLine($"Dear {this.name}.\t\tThe Store has new book:  \"{e.GoodName}\"");
 }
示例#7
0
 // 8) declare method GotNewGoods with 2 parameters:
 public void GotNewGoods(object obj, GoodsInfoEventArgs e)
 {
     Console.WriteLine("new Goods");
 }
示例#8
0
 // 8) declare method GotNewGoods with 2 parameters:
 // 1 - object type
 // 2 - GoodsInfoEventArgs type
 public void GotNewGoods(object o, GoodsInfoEventArgs e)
 {
     Console.WriteLine("{0} pain attention,we got new {1}", name, e.GoodsName);
 }