Пример #1
0
        public MainForm()
        {
            InitializeComponent();
            cancelFinishedDelegate = new UserCallback(o =>
            {
                this.cts = null;
                this.mainTask = null;
                this.mode = Mode.Stopped;
                UpdateEnabledStatus();
            });

            updateBitmapDelegate = new UserCallback(SetBitmap);

            showErrorDelegate = new UserCallback(obj =>
            {
                Exception e = (Exception)obj;
                MessageBox.Show(e.Message, "Application Error", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                this.cts = null;
                this.mainTask = null;
                this.mode = Mode.Stopped;
                UpdateEnabledStatus();
            });

            UpdateEnabledStatus();            
        }
Пример #2
0
        public MainForm()
        {
            InitializeComponent();
            cancelFinishedDelegate = new UserCallback(o =>
            {
                this.cts      = null;
                this.mainTask = null;
                this.mode     = Mode.Stopped;
                UpdateEnabledStatus();
            });

            updateBitmapDelegate = new UserCallback(SetBitmap);

            showErrorDelegate = new UserCallback(obj =>
            {
                Exception e = (Exception)obj;
                MessageBox.Show(e.Message, "Application Error", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                this.cts      = null;
                this.mainTask = null;
                this.mode     = Mode.Stopped;
                UpdateEnabledStatus();
            });

            UpdateEnabledStatus();
        }
Пример #3
0
 public UsersRetriever(
     UserCallback callback,
     ErrorCallbackDelegate errorCallback)
 {
     this.callback      = callback;
     this.errorCallback = errorCallback;
 }
Пример #4
0
 public virtual void Enable(UserCallback callback = null)
 {
     if (_logger.IsDebugEnabled)
     {
         _logger.Debug("Enabling port : {0}", Name);
     }
     MMal.MMAL_STATUS_T status = MMal.mmal_port_enable(_port, null);
     if (status != MMal.MMAL_STATUS_T.MMAL_SUCCESS)
     {
         throw new Exception(String.Format("Unable to enable port {0} : {1}", Name, status));
     }
 }
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     try
     {
         UserCallback = new UserCallback();
         var instanceContext = new System.ServiceModel.InstanceContext(UserCallback);
         proxy = new KanbanSystemServiceClient(instanceContext);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }
Пример #6
0
 public static extern IntPtr initialize(
     [MarshalAs(UnmanagedType.LPWStr)] string platform, IntPtr platform_len,
     [MarshalAs(UnmanagedType.LPWStr)] string platform_version, IntPtr platform_version_len,
     [MarshalAs(UnmanagedType.LPWStr)] string sdk_version, IntPtr sdk_version_len,
     UserCallback user_callback, VoidTaskCallback void_callback, BsonCallback bson_callback, LogMessageCallback log_message_callback, ApiKeysCallback api_keys_callback);
Пример #7
0
 public Callable( UserCallback value )
 {
     Val = value;
 }
Пример #8
0
 public Callable(UserCallback value)
 {
     Val = value;
 }
Пример #9
0
 protected WindowsHook(HookType hookType, UserCallback userCallback)
 {
     this.hookType       = hookType;
     this.userCallback   = userCallback;
     this.systemCallback = Callback;
 }