Example #1
0
        static int m_nLockTimeout = 5000;	// 5000=5秒

        internal void DoStop(object sender, StopEventArgs e)
        {

#if NO
            if (this.Channel != null && this.Channel.Channel != null)
                this.Channel.Channel.Abort();
#endif
            if (this.Container != null
                && this.Container._summaryChannel != null
                && this.Container._summaryChannel.Channel != null)
                this.Container._summaryChannel.Channel.Abort();
        }
Example #2
0
		private void stop_StatusChanged(StopEventArgs args)
		{
		}
Example #3
0
 void DoStop(object sender, StopEventArgs e)
 {
     if (this.webClient != null)
         this.webClient.CancelAsync();
 }
Example #4
0
 void DoStop(object sender, StopEventArgs e)
 {
     if (this.DtlpChannel != null)
         this.DtlpChannel.Cancel();
 }
Example #5
0
 void new_stop_OnStop(object sender, StopEventArgs e)
 {
     if (this.m_gcatClient != null)
     {
         this.m_gcatClient.Abort();
     }
 }
Example #6
0
 protected override void OnStopEvent(object sender, StopEventArgs e)
 {
     base.OnStopEvent(sender, e);
 }
Example #7
0
        // 停止,被StopManager调
        // locks: 写锁定
        // parameters:
        //      bHalfStop   是否为一半中断。所谓一般中断,就是不触发Stop事件,而只修改Stop状态。
        public void DoStop(object sender = null)
        {
            this.m_stoplock.AcquireWriterLock(Stop.m_nLockTimeout);
            try
            {
                bool bHalfStop = false;

                if ((this.Style & StopStyle.EnableHalfStop) != 0
                    && this.nStop == 0)
                {
                    bHalfStop = true;
                }

                if (bHalfStop == false)
                {
                    if (this.OnStop != null)
                    {
                        // OnStop()是在已经锁定的情况下调用的
                        StopEventArgs e = new StopEventArgs();
                        this.OnStop(sender == null ? this : sender, e);
                    }
                }

                nStop = 1;
            }
            finally
            {
                this.m_stoplock.ReleaseWriterLock();
            }
        }
Example #8
0
        void DoNewStop(object sender, StopEventArgs e)
        {
            Stop current_stop = (Stop)sender;
            if (current_stop == null)
                return;
            DtlpChannel channel = (DtlpChannel)current_stop.Tag;
            if (channel == null)
                return;

            channel.Cancel();
        }
        void DoStop(object sender, StopEventArgs e)
        {
#if NO
            if (this.MainForm.Channel != null)
                this.MainForm.Channel.Abort();
#endif
        }
Example #10
0
        new void DoStop(object sender, StopEventArgs e)
        {
            if (this.Channel != null)
                this.Channel.Abort();

            if (this._channels != null)
            {
                lock (this._channels)
                {
                    foreach (LibraryChannel channel in this._channels)
                    {
                        if (channel != null)
                            channel.Abort();
                    }
                }
            }
        }
Example #11
0
 void DoStop(object sender, StopEventArgs e)
 {
 }
Example #12
0
 // 停止当前的一个Z连接
 void DoStop(object sender, StopEventArgs e)
 {
     /*
     if (this.ZChannel.Connected == true)
     {
         CloseConnection();
     }
     else if (this.ZChannel != null)
     {
         // 如果处在没有连接的状态
         this.ZChannel.Stop();
     }
      * */
     ZConnection connection = this.FindCurrentZConnection();
     if (connection != null)
     {
         connection.DoStop();
     }
 }
Example #13
0
 // 目录检索停止按钮被触发
 void m_stopDir_OnStop(object sender, StopEventArgs e)
 {
     lock (this)
     {
         /*
         for (int i = 0; i < this.m_stops.Count; i++)
         {
             Stop stop = this.m_stops[i];
             if (stop.State == 0)
                 stop.DoStop(false);
         }*/
         StopDirSearchStops(false);
     }
 }
Example #14
0
 void DoStop(object sender, StopEventArgs e)
 {
     /*
     if (this.Channel != null)
         this.Channel.Cancel();
      * */
 }
Example #15
0
 void DoStopPrint(object sender, StopEventArgs e)
 {
 }
Example #16
0
        internal void DoStop(object sender, StopEventArgs e)
        {
            // 兼容旧风格
            if (this.Channel != null)
                this.Channel.Abort();

            foreach (LibraryChannel channel in _channelList)
            {
                if (channel != null)
                    channel.Abort();
            }
        }
Example #17
0
 void DoStop(object sender, StopEventArgs e)
 {
     if (this.Channel != null)
         this.Channel.Abort();
 }
Example #18
0
        internal void DoStop(object sender, StopEventArgs e)
        {
            if (this._channel != null)
                this._channel.Abort();
#if NO
            if (this.Channel != null)
                this.Channel.Abort();
#endif
        }
Example #19
0
        internal new void DoStop(object sender, StopEventArgs e)
        {
            if (this.Channel != null)
                this.Channel.Abort();
#if NO
            if (sender == this.browseWindow)
                this._browseWindowSelected = true;
#endif
        }
Example #20
0
 private void _mp3_Stopped(object sender, StopEventArgs e)
 {
     if (e.StopCase != StopEventArgs.StopCases.Finished) return;
     Mp3File nextFile = _mp3List.ElementAtOrDefault(_mp3List.IndexOf(_mp3) + 1);
     if (nextFile != null)
     {
         _mp3 = nextFile;
         PlaylistListBox.SelectedItem = _mp3;
         PlayTrack();
     }
 }