コード例 #1
0
 private void List_BeforeChange(object sender, RejectableEventArgs <object> e)
 {
     if (e.Value.ToString() == "Görkem")
     {
         e.RejectOperation();
     }
 }
コード例 #2
0
        private void HandleBeforeChanged(object sender, RejectableEventArgs <string> e)
        {
            bool test = e.IsOperationRejected;

            //e.RejectOperation();
            Count = e.Count;
        }
コード例 #3
0
 private void HandleBeforeChanged(object sender, RejectableEventArgs <string> e)
 {
     if (e.Value == "lök")
     {
         e.RejectOperation();
         Rejected = true;
         //throw new OperationRejectedException();
     } // För test
 }
コード例 #4
0
ファイル: TestApp.cs プロジェクト: sish/Development
 void intList_BeforeChange(object sender, RejectableEventArgs <int> e)
 {
     if (Operation.Add == e.Operation && e.Value > 1000)
     {
         e.RejectOperation();
         MessageBox.Show("Only values of 1000 and below accepted.");
     }
     else if (Operation.Remove == e.Operation && e.Count <= 2)
     {
         e.RejectOperation();
         MessageBox.Show("Cannot reduce list to less than 2 elements.");
     }
 }