本文整理汇总了C#中DigitalPlatform.Stop.Register方法的典型用法代码示例。如果您正苦于以下问题:C# Stop.Register方法的具体用法?C# Stop.Register怎么用?C# Stop.Register使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DigitalPlatform.Stop
的用法示例。
在下文中一共展示了Stop.Register方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReaderManageForm_Load
private void ReaderManageForm_Load(object sender, EventArgs e)
{
if (this.MainForm != null)
{
MainForm.SetControlFont(this, this.MainForm.DefaultFont);
}
#if NO
MainForm.AppInfo.LoadMdiChildFormStates(this,
"mdi_form_state");
this.Channel.Url = this.MainForm.LibraryServerUrl;
this.Channel.BeforeLogin -= new BeforeLoginEventHandle(Channel_BeforeLogin);
this.Channel.BeforeLogin += new BeforeLoginEventHandle(Channel_BeforeLogin);
stop = new DigitalPlatform.Stop();
stop.Register(MainForm.stopManager, true); // 和容器关联
#endif
this.GetValueTable += new GetValueTableEventHandler(ReaderManageForm_GetValueTable);
// webbrowser
this.m_webExternalHost.Initial(this.MainForm, this.webBrowser_normalInfo);
this.webBrowser_normalInfo.ObjectForScripting = this.m_webExternalHost;
this.commander = new Commander(this);
this.commander.IsBusy -= new IsBusyEventHandler(commander_IsBusy);
this.commander.IsBusy += new IsBusyEventHandler(commander_IsBusy);
}
示例2: EaccForm_Load
private void EaccForm_Load(object sender, EventArgs e)
{
stop = new DigitalPlatform.Stop();
stop.Register(MainForm.stopManager, true); // 和容器关联
this.textBox_unihanFilenames.Text = MainForm.AppInfo.GetString(
"eacc_form",
"unihan_filename",
"");
this.textBox_e2uFilename.Text = MainForm.AppInfo.GetString(
"eacc_form",
"e2u_filename",
"");
/*
this.textBox_u2eFilename.Text = MainForm.applicationInfo.GetString(
"eacc_form",
"u2e_filename",
"");
* */
Global.FillEncodingList(this.comboBox_codePage,
false);
}
示例3: DtlpLogForm_Load
private void DtlpLogForm_Load(object sender, EventArgs e)
{
stop = new DigitalPlatform.Stop();
stop.Register(MainForm.stopManager, true); // 和容器关联
// 初始化ChannelArray
channelArray.appInfo = MainForm.AppInfo;
channelArray.AskAccountInfo += new AskDtlpAccountInfoEventHandle(channelArray_AskAccountInfo);
/*
channelArray.procAskAccountInfo = new Delegate_AskAccountInfo(
this.AskAccountInfo);
* */
// 准备唯一的通道
if (this.Channel == null)
{
this.Channel = channelArray.CreateChannel(0);
}
this.textBox_serverAddr.Text = MainForm.AppInfo.GetString(
"dtlplogform",
"serveraddr",
"");
this.textBox_logFileName.Text = MainForm.AppInfo.GetString(
"dtlplogform",
"logfilename",
"");
this.marcEditor_record.FieldNameCaptionWidth = 0;
}
示例4: ClockForm_Load
private void ClockForm_Load(object sender, EventArgs e)
{
if (this.MainForm != null)
{
MainForm.SetControlFont(this, this.MainForm.DefaultFont);
}
this.dateTimePicker1.Value = DateTime.Now;
#if NO
this.Channel.Url = this.MainForm.LibraryServerUrl;
this.Channel.BeforeLogin -= new BeforeLoginEventHandle(Channel_BeforeLogin);
this.Channel.BeforeLogin += new BeforeLoginEventHandle(Channel_BeforeLogin);
this.Channel.AfterLogin -= new AfterLoginEventHandle(Channel_AfterLogin);
this.Channel.AfterLogin += new AfterLoginEventHandle(Channel_AfterLogin);
stop = new DigitalPlatform.Stop();
stop.Register(MainForm.stopManager, true); // 和容器关联
#endif
// API.PostMessage(this.Handle, WM_PREPARE, 0, 0);
this.BeginInvoke(new Action(Initial));
this.timer1.Start();
}
示例5: ChangePasswordForm_Load
private void ChangePasswordForm_Load(object sender, EventArgs e)
{
this.Channels = new LibraryChannelCollection();
this.Channels.BeforeLogin += new BeforeLoginEventHandle(Channels_BeforeLogin);
this.Channels.AfterLogin += new AfterLoginEventHandle(Channels_AfterLogin);
stop = new DigitalPlatform.Stop();
stop.Register(MainForm.stopManager, true); // 和容器关联
}
示例6: XmlDetailForm_Load
private void XmlDetailForm_Load(object sender, EventArgs e)
{
stop = new DigitalPlatform.Stop();
stop.Register(MainForm.stopManager, true); // 和容器关联
Global.FillEncodingList(this.comboBox_originDataEncoding,
false);
this.NeedIndentXml = this.MainForm.AppInfo.GetBoolean(
"xmldetailform",
"need_indent_xml",
true);
API.PostMessage(this.Handle, WM_LOADSIZE, 0, 0);
}
示例7: HtmlPrintForm_Load
private void HtmlPrintForm_Load(object sender, EventArgs e)
{
if (this.MainForm != null)
{
MainForm.SetControlFont(this, this.MainForm.DefaultFont);
}
// 把第一页装入
this.LoadPageFile();
this.EnableButtons();
DisplayPageInfoLine();
stop = new DigitalPlatform.Stop();
stop.Register(MainForm.stopManager, true); // 和容器关联
}
示例8: QuickChangeBiblioForm_Load
private void QuickChangeBiblioForm_Load(object sender, EventArgs e)
{
if (this.MainForm != null)
{
MainForm.SetControlFont(this, this.MainForm.DefaultFont);
}
#if NO
this.Channel.Url = this.MainForm.LibraryServerUrl;
this.Channel.BeforeLogin -= new BeforeLoginEventHandle(Channel_BeforeLogin);
this.Channel.BeforeLogin += new BeforeLoginEventHandle(Channel_BeforeLogin);
stop = new DigitalPlatform.Stop();
stop.Register(MainForm.stopManager, true); // 和容器关联
#endif
}
示例9: PassGateForm_Load
private void PassGateForm_Load(object sender, EventArgs e)
{
if (this.MainForm != null)
{
MainForm.SetControlFont(this, this.MainForm.DefaultFont);
}
#if NO
this.Channel.Url = this.MainForm.LibraryServerUrl;
this.Channel.BeforeLogin -= new BeforeLoginEventHandle(Channel_BeforeLogin);
this.Channel.BeforeLogin += new BeforeLoginEventHandle(Channel_BeforeLogin);
stop = new DigitalPlatform.Stop();
stop.Register(MainForm.stopManager, true); // 和容器关联
#endif
// webbrowser
this.m_webExternalHost.Initial(this.MainForm, this.webBrowser_readerInfo);
this.webBrowser_readerInfo.ObjectForScripting = this.m_webExternalHost;
this.commander = new Commander(this);
this.commander.IsBusy -= new IsBusyEventHandler(commander_IsBusy);
this.commander.IsBusy += new IsBusyEventHandler(commander_IsBusy);
this.AcceptButton = this.button_passGate;
this.textBox_gateName.Text = this.MainForm.AppInfo.GetString(
"passgate_form",
"gate_name",
"");
this.checkBox_displayReaderDetailInfo.Checked = this.MainForm.AppInfo.GetBoolean(
"passgate_form",
"display_reader_detail_info",
true);
this.checkBox_hideBarcode.Checked = this.MainForm.AppInfo.GetBoolean(
"passgate_form",
"hide_barcode",
false);
this.checkBox_hideReaderName.Checked = this.MainForm.AppInfo.GetBoolean(
"passgate_form",
"hide_readername",
false);
this.StartWorkerThread();
}
示例10: SelectPatronDialog_Load
private void SelectPatronDialog_Load(object sender, EventArgs e)
{
_stopManager.Initial(this.toolStripButton_stop,
(object)this.toolStripLabel_message,
(object)null);
stop = new DigitalPlatform.Stop();
stop.Register(this._stopManager, true); // 和容器关联
FillRecPath();
EnableControls(false);
this.m_webExternalHost_patron.Initial(this.MainForm, this.webBrowser_patron);
this.webBrowser_patron.ObjectForScripting = this.m_webExternalHost_patron;
MessageVisible = MessageVisible;
// API.PostMessage(this.Handle, WM_LOAD_ALL_DATA, 0, 0);
this.BeginInvoke(new Action(Initial));
}
示例11: Initial
public void Initial(MainForm main_form,
bool bDoEvents = false)
{
this._doEvents = bDoEvents;
this.MainForm = main_form;
this.Channel.Url = this.MainForm.LibraryServerUrl;
this.Channel.BeforeLogin -= new BeforeLoginEventHandle(Channel_BeforeLogin);
this.Channel.BeforeLogin += new BeforeLoginEventHandle(Channel_BeforeLogin);
this.Channel.AfterLogin -= new AfterLoginEventHandle(Channel_AfterLogin);
this.Channel.AfterLogin += new AfterLoginEventHandle(Channel_AfterLogin);
this.Channel.Idle -= new IdleEventHandler(Channel_Idle);
this.Channel.Idle += new IdleEventHandler(Channel_Idle);
stop = new DigitalPlatform.Stop();
stop.Register(MainForm.stopManager, true); // 和容器关联
return;
}
示例12: ActivateForm_Load
private void ActivateForm_Load(object sender, EventArgs e)
{
if (this.MainForm != null)
{
MainForm.SetControlFont(this, this.MainForm.DefaultFont);
}
#if NO
MainForm.AppInfo.LoadMdiChildFormStates(this,
"mdi_form_state");
this.Channel.Url = this.MainForm.LibraryServerUrl;
this.Channel.BeforeLogin -= new BeforeLoginEventHandle(Channel_BeforeLogin);
this.Channel.BeforeLogin += new BeforeLoginEventHandle(Channel_BeforeLogin);
stop = new DigitalPlatform.Stop();
stop.Register(MainForm.stopManager, true); // 和容器关联
#endif
this.readerEditControl_old.SetReadOnly("librarian");
this.readerEditControl_old.GetValueTable += new GetValueTableEventHandler(readerEditControl1_GetValueTable);
this.readerEditControl_old.Initializing = false; // 如果没有此句,一开始在空模板上修改就不会变色
this.readerEditControl_new.SetReadOnly("librarian");
this.readerEditControl_new.GetValueTable += new GetValueTableEventHandler(readerEditControl1_GetValueTable);
this.readerEditControl_new.Initializing = false; // 如果没有此句,一开始在空模板上修改就不会变色
// webbrowser
this.m_webExternalHost_new.Initial(this.MainForm, this.webBrowser_newReaderInfo);
this.webBrowser_newReaderInfo.ObjectForScripting = this.m_webExternalHost_new;
this.m_webExternalHost_old.Initial(this.MainForm, this.webBrowser_oldReaderInfo);
this.webBrowser_oldReaderInfo.ObjectForScripting = this.m_webExternalHost_old;
// commander
this.commander = new Commander(this);
this.commander.IsBusy -= new IsBusyEventHandler(commander_IsBusy);
this.commander.IsBusy += new IsBusyEventHandler(commander_IsBusy);
}
示例13: ChangePasswordForm_Load
private void ChangePasswordForm_Load(object sender, EventArgs e)
{
if (this.MainForm != null)
{
MainForm.SetControlFont(this, this.MainForm.DefaultFont);
}
#if NO
this.Channel.Url = this.MainForm.LibraryServerUrl;
this.Channel.BeforeLogin -= new BeforeLoginEventHandle(Channel_BeforeLogin);
this.Channel.BeforeLogin += new BeforeLoginEventHandle(Channel_BeforeLogin);
stop = new DigitalPlatform.Stop();
stop.Register(MainForm.stopManager, true); // 和容器关联
#endif
bool bReader = this.MainForm.AppInfo.GetBoolean(
"default_account",
"isreader",
false);
if (bReader == false)
{
this.textBox_reader_oldPassword.Enabled = false;
}
else
{
this.textBox_reader_comment.Text = "这是读者为自己修改密码。";
this.tabControl_main.Controls.Remove(this.tabPage_worker);
this.AddFreeControl(this.tabPage_worker); // 2015/11/7
}
checkBox_worker_force_CheckedChanged(this, null);
API.PostMessage(this.Handle, WM_FIRST_SETFOCUS, 0, 0);
}
示例14: CheckBorrowInfoForm_Load
private void CheckBorrowInfoForm_Load(object sender, EventArgs e)
{
if (this.MainForm != null)
{
MainForm.SetControlFont(this, this.MainForm.DefaultFont);
}
#if NO
MainForm.AppInfo.LoadMdiChildFormStates(this,
"mdi_form_state");
this.Channel.Url = this.MainForm.LibraryServerUrl;
this.Channel.BeforeLogin -= new BeforeLoginEventHandle(Channel_BeforeLogin);
this.Channel.BeforeLogin += new BeforeLoginEventHandle(Channel_BeforeLogin);
stop = new DigitalPlatform.Stop();
stop.Register(MainForm.stopManager, true); // 和容器关联
#endif
Global.ClearForPureTextOutputing(this.webBrowser_resultInfo);
this.checkBox_displayPriceString.Checked = this.MainForm.AppInfo.GetBoolean(
"check_borrowinfo_form",
"display_price_string",
true);
this.checkBox_forceCNY.Checked = this.MainForm.AppInfo.GetBoolean(
"check_borrowinfo_form",
"force_cny",
false);
this.checkBox_overwriteExistPrice.Checked = this.MainForm.AppInfo.GetBoolean(
"check_borrowinfo_form",
"overwrite_exist_price",
false);
}
示例15: menu_printHtml_Click
// 打印解释内容
void menu_printHtml_Click(object sender, EventArgs e)
{
string strError = "";
if (this.listView_records.SelectedItems.Count == 0)
{
strError = "尚未选定要打印的行";
goto ERROR1;
}
List<string> filenames = new List<string>();
string strFileNamePrefix = this.MainForm.DataDir + "\\~operlog_print_";
string strFilename = strFileNamePrefix + (1).ToString() + ".html";
filenames.Add(strFilename);
File.Delete(strFilename);
StreamUtil.WriteText(strFilename,
"<html>" +
GetHeadString(false) +
"<body>");
Stop stop = new DigitalPlatform.Stop();
stop.Register(MainForm.stopManager, true); // 和容器关联
stop.OnStop += new StopEventHandler(this.DoStopPrint);
stop.Initial("正在创建打印页面 ...");
stop.BeginLoop();
m_webExternalHost = new WebExternalHost();
m_webExternalHost.Initial(this.MainForm, null);
m_webExternalHost.IsInLoop = true;
this.GetSummary += new GetSummaryEventHandler(OperLogForm_GetSummary);
try
{
stop.SetProgressRange(0, this.listView_records.SelectedItems.Count);
int i = 0;
foreach (ListViewItem item in this.listView_records.SelectedItems)
{
Application.DoEvents();
if (stop != null && stop.State != 0)
{
strError = "用户中断";
goto ERROR1;
}
OperLogItemInfo info = (OperLogItemInfo)item.Tag;
string strLogFileName = ListViewUtil.GetItemText(item, COLUMN_FILENAME);
string strIndex = ListViewUtil.GetItemText(item, COLUMN_INDEX);
string strXml = "";
// 从服务器获得
// return:
// -1 出错
// 0 正常
// 1 用户中断
int nRet = GetXml(item,
out strXml,
out strError);
if (nRet == 1)
return;
if (nRet == -1)
goto ERROR1;
Global.SetXmlString(this.webBrowser_xml,
strXml,
this.MainForm.DataDir,
"operlogexml");
string strHtml = "";
// 创建解释日志记录内容的 HTML 字符串
// return:
// -1 出错
// 0 成功
// 1 未知的操作类型
nRet = GetHtmlString(strXml,
false,
out strHtml,
out strError);
if (nRet == -1)
goto ERROR1;
if (nRet == 1)
strHtml = strError;
StreamUtil.WriteText(strFilename,
"<p class='record_title'>" + strLogFileName + " : " + strIndex + "</p>" + strHtml);
stop.SetProgressValue(i + 1);
i++;
}
}
finally
{
this.GetSummary -= new GetSummaryEventHandler(OperLogForm_GetSummary);
if (m_webExternalHost != null)
//.........这里部分代码省略.........