Esempio n. 1
0
 static AccountViewModel()
 {
     tickCall = new Timer(
         _ => TimeTickCall.Raise(EventArgs.Empty),
         null, 0, 20 * 1000);
     ThreadHelper.Halt += () => tickCall.Dispose();
 }
Esempio n. 2
0
        protected void OnConnectionStateChanged(EventArgs e)
        {
            var threadSafeHandler = Interlocked.CompareExchange(ref ConnectionStateChanged, null, null);

            if (threadSafeHandler != null)
            {
                threadSafeHandler(this, e);
            }
            ConnectionStateChangedEvent.Raise(e);
        }
Esempio n. 3
0
        private static void OnWakeupTimeUpdated(EventArgs e)
        {
            var threadSafeHandler = Interlocked.CompareExchange(ref WakeupTimeUpdated, null, null);

            if (threadSafeHandler != null)
            {
                threadSafeHandler(null, e);
            }
            WakeupTimeUpdatedEvent.Raise(e);
        }
Esempio n. 4
0
        private static void OnTweetSpeedUpdated(EventArgs e)
        {
            var threadSafeHandler = Interlocked.CompareExchange(ref TweetSpeedUpdated, null, null);

            if (threadSafeHandler != null)
            {
                threadSafeHandler(null, e);
            }
            TweetSpeedUpdatedEvent.Raise(e);
        }
Esempio n. 5
0
        private static void OnNotifyTextChanged(NotifyUpdatedEventArgs e)
        {
            var threadSafeHandler = Interlocked.CompareExchange(ref NotifyTextChanged, null, null);

            if (threadSafeHandler != null)
            {
                threadSafeHandler(null, e);
            }
            NotifyTextChangedEvent.Raise(e);
        }
Esempio n. 6
0
        protected void OnRequireClose(NotifierViewModelEventArgs e)
        {
            var threadSafeHandler = Interlocked.CompareExchange(ref RequireClose, null, null);

            if (threadSafeHandler != null)
            {
                threadSafeHandler(this, e);
            }
            RequireCloseEvent.Raise(e);
        }
Esempio n. 7
0
        protected virtual void OnFileDrop(FileDropEventArgs e)
        {
            var threadSafeHandler = Interlocked.CompareExchange(ref FileDrop, null, null);

            if (threadSafeHandler != null)
            {
                threadSafeHandler(this, e);
            }
            FileDropEvent.Raise(e);
        }
Esempio n. 8
0
        protected void OnItemsOpening(EventArgs e)
        {
            var threadSafeHandler = Interlocked.CompareExchange(ref ItemsOpening, null, null);

            if (threadSafeHandler != null)
            {
                threadSafeHandler(this, e);
            }
            ItemsOpeningEvent.Raise(e);
        }
Esempio n. 9
0
        protected void OnLinkAccountInfoChanged(EventArgs e)
        {
            var threadSafeHandler = Interlocked.CompareExchange(ref LinkAccountInfoChanged, null, null);

            if (threadSafeHandler != null)
            {
                threadSafeHandler(this, e);
            }
            LinkAccountInfoChangedEvent.Raise(e);
        }
Esempio n. 10
0
        private static void OnOnUnderControlChanged(UnderControlEventArgs e)
        {
            var threadSafeHandler = Interlocked.CompareExchange(ref OnUnderControlChanged, null, null);

            if (threadSafeHandler != null)
            {
                threadSafeHandler(null, e);
            }
            OnUnderControlChangedEvent.Raise(e);
        }
Esempio n. 11
0
        private static void OnSettingValueChanged(EventArgs e)
        {
            var threadSafeHandler = Interlocked.CompareExchange(ref SettingValueChanged, null, null);

            if (threadSafeHandler != null)
            {
                threadSafeHandler(null, e);
            }
            SettingValueChangedEvent.Raise(e);
        }
Esempio n. 12
0
        private static void OnEventRegistered(EventDescriptionEventArgs e)
        {
            var threadSafeHandler = Interlocked.CompareExchange(ref EventRegistered, null, null);

            if (threadSafeHandler != null)
            {
                threadSafeHandler(null, e);
            }
            EventRegisteredEvent.Raise(e);
        }