private void Runner_OnStopped(object sender, StopEventArgs e) { Invoke(new MethodInvoker(delegate() { listData.Items.Add("Stoped!"); //displays the stop message when the runner stop })); }
void DoStop(object sender, StopEventArgs e) { /* * if (this.Channel != null) * this.Channel.Cancel(); * */ }
/* * // 获得缺省帐户信息。回调函数,用于resdircontrol * // return: * // 2 already login succeed * // 1 dialog return OK * // 0 dialog return Cancel * // -1 other error * public int AskAccountInfo(DtlpChannel channel, * string strPath, * out IWin32Window owner, // 如果需要出现对话框,这里返回对话框的宿主Form * out string strUserName, * out string strPassword) * { * owner = null; * strUserName = ""; * strPassword = ""; * * LoginDlg dlg = new LoginDlg(); * * AccountItem item = (AccountItem)AccountTable[strPath]; * if (item == null) * { * item = new AccountItem(); * AccountTable.Add(strPath, item); * * // 从配置文件中得到缺省账户 * item.UserName = MainForm.applicationInfo.GetString( * "preference", * "defaultUserName", * "public"); * item.Password = MainForm.applicationInfo.GetString( * "preference", * "defaultPassword", * ""); * * * } * * dlg.textBox_serverAddr.Text = strPath; * dlg.textBox_userName.Text = item.UserName; * dlg.textBox_password.Text = item.Password; * * // 先登录一次再说 * { * byte[] baResult = null; * int nRet = channel.API_ChDir(dlg.textBox_userName.Text, * dlg.textBox_password.Text, * strPath, * out baResult); * * // 登录成功 * if (nRet > 0) * return 2; * } * * * * * dlg.StartPosition = FormStartPosition.CenterScreen; * dlg.ShowDialog(this); * * if (dlg.DialogResult == DialogResult.OK) * { * item.UserName = dlg.textBox_userName.Text; * item.Password = dlg.textBox_password.Text; * * strUserName = dlg.textBox_userName.Text; * strPassword = dlg.textBox_password.Text; * owner = this; * return 1; * } * * return 0; * } * */ void DoStop(object sender, StopEventArgs e) { if (this.Channel != null) { this.Channel.Cancel(); } }
private void stop_StatusChanged(StopEventArgs args) { ATSStop atsStop = args.Stop as ATSStop; if (((StopBase)atsStop).Status != null) { this.activeStops[((StopBase)atsStop).Instrument].Remove(atsStop); // ISSUE: method pointer atsStop.StatusChanged -= new StopEventHandler(this.stop_StatusChanged); } if (((StopBase)atsStop).Status != FreeQuant.Trading.StopStatus.Executed) { return; } try { Strategy strategy = (Strategy)null; if (!this.strategies.TryGetValue(((StopBase)atsStop).Instrument, out strategy)) { return; } strategy.OnStopExecuted(Map.FQ_OQ_Stop[(object)atsStop] as OpenQuant.API.Stop); } catch (Exception ex) { this.EmitError(ex); } }
/* * // 在一个节点下级插入"loading...",以便出现+号 * static void SetLoading(TreeNode node) * { * // 新node * TreeNode nodeNew = new TreeNode("loading...", ResTree.RESTYPE_LOADING, ResTree.RESTYPE_LOADING); * * node.Nodes.Clear(); * node.Nodes.Add(nodeNew); * } * * // 下级是否包含loading...? * static bool IsLoading(TreeNode node) * { * if (node.Nodes.Count == 0) * return false; * * if (node.Nodes[0].Text == "loading...") * return true; * * return false; * } */ // 回调函数 void DoStop(object sender, StopEventArgs e) { if (this.channel != null) { this.channel.Abort(); } }
private void MediaPlayer1_OnStop(object sender, StopEventArgs e) { Invoke((Action)(() => { tbTimeline.Value = 0; })); }
private async void _player_OnStop(object sender, StopEventArgs e) { await _player.CloseAsync(); tmPosition.Stop(); videoView1.Invalidate(); MessageBox.Show("Playback complete."); }
void DoGcatStop(object sender, StopEventArgs e) { #if OLD_CODE if (this.GcatChannel != null) { this.GcatChannel.Abort(); } #endif }
void DoStop(object sender, StopEventArgs e) { #if NO if (Program.MainForm.Channel != null) { Program.MainForm.Channel.Abort(); } #endif }
private void Player_OnStop(object sender, StopEventArgs e) { _tmPosition.Stop(); Dispatcher.UIThread.InvokeAsync(() => { VideoView1.Refresh(); //ShowMessage("Playback complete."); }); }
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(); }
private void VideoEdit1_OnStop(object sender, StopEventArgs e) { Invoke((Action)(() => { ProgressBar1.Value = 0; })); if (e.Successful) { MessageBox.Show(this, "Completed successfully", string.Empty, MessageBoxButtons.OK); } else { MessageBox.Show(this, "Stopped with error", string.Empty, MessageBoxButtons.OK); } }
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(); } }
internal void DoStop(object sender, StopEventArgs e) { // 兼容旧风格 if (this.Channel != null) { this.Channel.Abort(); } foreach (LibraryChannel channel in _channelList) { if (channel != null) { channel.Abort(); } } }
private void VideoEdit1_OnStop(object sender, StopEventArgs e) { Invoke((Action)(() => { ProgressBar1.Value = 0; lbFiles.Items.Clear(); })); if (e.Successful) { MessageBox.Show("Completed successfully", string.Empty, MessageBoxButtons.OK); } else { MessageBox.Show("Stopped with error", string.Empty, MessageBoxButtons.OK); } VideoEdit1.Input_Clear_List(); VideoEdit1.Video_Transition_Clear(); }
void DoStop(object sender, StopEventArgs e) { if (this.DtlpChannel != null) this.DtlpChannel.Cancel(); }
void new_stop_OnStop(object sender, StopEventArgs e) { if (this.m_gcatClient != null) { this.m_gcatClient.Abort(); } }
protected override void OnStopEvent(object sender, StopEventArgs e) { base.OnStopEvent(sender, e); }
// 目录检索停止按钮被触发 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); } }
void DoStop(object sender, StopEventArgs e) { if (this.Channel != null) this.Channel.Abort(); }
void DoStop(object sender, StopEventArgs e) { }
private void MediaPlayer1_OnStop(object sender, StopEventArgs e) { BeginInvoke(new StopDelegate(StopDelegateMethod), null); }
private void stop_StatusChanged(StopEventArgs args) { }
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(); }
public void StopShowMessage(object sender, StopEventArgs e) { MessageBox.Show("Download Stops, Final Percentage is " + e.percent); }
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(); } } } }
void DoStop(object sender, StopEventArgs e) { /* if (this.Channel != null) this.Channel.Cancel(); * */ }
void DoStop(object sender, StopEventArgs e) { if (this.webClient != null) this.webClient.CancelAsync(); }
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(); } }
private void MediaPlayer1_OnStop(object sender, StopEventArgs e) { tbTimeline.Value = 0; }
void DoStop(object sender, StopEventArgs e) { #if NO if (this.MainForm.Channel != null) this.MainForm.Channel.Abort(); #endif }
internal void DoStop(object sender, StopEventArgs e) { // 兼容旧风格 if (this.Channel != null) this.Channel.Abort(); foreach (LibraryChannel channel in _channelList) { if (channel != null) channel.Abort(); } }
void DoStopPrint(object sender, StopEventArgs e) { }
internal void DoStop(object sender, StopEventArgs e) { if (this._channel != null) this._channel.Abort(); #if NO if (this.Channel != null) this.Channel.Abort(); #endif }
// 停止,被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(); } }
// 停止当前的一个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(); } }
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 }