コード例 #1
0
ファイル: SystemInfoViewModel.cs プロジェクト: a1lic/Mystique
 static AccountViewModel()
 {
     tickCall = new Timer(
         _ => TimeTickCall.Raise(EventArgs.Empty),
         null, 0, 20 * 1000);
     ThreadHelper.Halt += () => tickCall.Dispose();
 }
コード例 #2
0
ファイル: AccountInfo.cs プロジェクト: a1lic/Mystique
        protected void OnConnectionStateChanged(EventArgs e)
        {
            var threadSafeHandler = Interlocked.CompareExchange(ref ConnectionStateChanged, null, null);

            if (threadSafeHandler != null)
            {
                threadSafeHandler(this, e);
            }
            ConnectionStateChangedEvent.Raise(e);
        }
コード例 #3
0
ファイル: Statistics.cs プロジェクト: Rires-Magica/Mystique
        private static void OnWakeupTimeUpdated(EventArgs e)
        {
            var threadSafeHandler = Interlocked.CompareExchange(ref WakeupTimeUpdated, null, null);

            if (threadSafeHandler != null)
            {
                threadSafeHandler(null, e);
            }
            WakeupTimeUpdatedEvent.Raise(e);
        }
コード例 #4
0
ファイル: Statistics.cs プロジェクト: Rires-Magica/Mystique
        private static void OnTweetSpeedUpdated(EventArgs e)
        {
            var threadSafeHandler = Interlocked.CompareExchange(ref TweetSpeedUpdated, null, null);

            if (threadSafeHandler != null)
            {
                threadSafeHandler(null, e);
            }
            TweetSpeedUpdatedEvent.Raise(e);
        }
コード例 #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);
        }
コード例 #6
0
        protected void OnRequireClose(NotifierViewModelEventArgs e)
        {
            var threadSafeHandler = Interlocked.CompareExchange(ref RequireClose, null, null);

            if (threadSafeHandler != null)
            {
                threadSafeHandler(this, e);
            }
            RequireCloseEvent.Raise(e);
        }
コード例 #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);
        }
コード例 #8
0
        protected void OnItemsOpening(EventArgs e)
        {
            var threadSafeHandler = Interlocked.CompareExchange(ref ItemsOpening, null, null);

            if (threadSafeHandler != null)
            {
                threadSafeHandler(this, e);
            }
            ItemsOpeningEvent.Raise(e);
        }
コード例 #9
0
ファイル: TabProperty.cs プロジェクト: a1lic/Mystique
        protected void OnLinkAccountInfoChanged(EventArgs e)
        {
            var threadSafeHandler = Interlocked.CompareExchange(ref LinkAccountInfoChanged, null, null);

            if (threadSafeHandler != null)
            {
                threadSafeHandler(this, e);
            }
            LinkAccountInfoChangedEvent.Raise(e);
        }
コード例 #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);
        }
コード例 #11
0
ファイル: Setting.cs プロジェクト: Rires-Magica/Mystique
        private static void OnSettingValueChanged(EventArgs e)
        {
            var threadSafeHandler = Interlocked.CompareExchange(ref SettingValueChanged, null, null);

            if (threadSafeHandler != null)
            {
                threadSafeHandler(null, e);
            }
            SettingValueChangedEvent.Raise(e);
        }
コード例 #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);
        }