示例#1
0
        private void SubscribeControls()
        {
            NumPub = new NumberPublisher();

            //Subscribe controls to publisher event
            txtNumber.SubscribeToNumberPublisher(NumPub);
            trkChange.SubscribeToNumberPublisher(NumPub);
        }
示例#2
0
文件: Form1.cs 项目: anneilb/ce-dev
        private void SubscribeControls()
        {
            NumPub = new NumberPublisher();

            //Subscribe controls to publisher event
            txtNumber.SubscribeToNumberPublisher(NumPub);
            trkChange.SubscribeToNumberPublisher(NumPub);
        }
示例#3
0
 //Subscribe delegate method NumberHasChanged to NumberPublisher's ValueChanged event
 public void SubscribeToNumberPublisher(NumberPublisher NumPub)
 {
     NumPub.ValueChanged += new NumberPublisher.ValueChangeHandler(NumberHasChanged);
 }
示例#4
0
文件: Form1.cs 项目: anneilb/ce-dev
 //Subscribe delegate method NumberHasChanged to NumberPublisher's ValueChanged event
 public void SubscribeToNumberPublisher(NumberPublisher NumPub)
 {
     NumPub.ValueChanged += new NumberPublisher.ValueChangeHandler(NumberHasChanged);
 }