📄 contact_tip_widget.cs
字号:
if (this.m_crbttome_page.IsValid())
{
this.update_bounds(this.m_contact_rect);
this.do_paint();
}
else
{
this.m_player.Visible = false;
}
}
}
}
catch (Exception exception)
{
ClientLogger.WriteGeneral("ContactTip", exception.ToString(), 10);
}
}
private void on_player_errorevent(object sender, EventArgs e)
{
try
{
IWMPErrorItem item = this.m_player.Error.get_Item(0);
string summary = string.Format(StringTable.InfoOfColorRbt.ErrorInfoOfColorRbt.EISummaryOfPlay, this.m_player.currentMedia.sourceURL);
string detail = string.Format(StringTable.InfoOfColorRbt.ErrorInfoOfColorRbt.EIDetailOfPlay, item.errorCode, item.errorDescription);
string text = string.Format(StringTable.InfoOfColorRbt.ErrorInfoOfColorRbt.EIResolveMethod, this.m_player.currentMedia.sourceURL);
ClientLogger.WriteBizOperation(summary, detail, 20);
if (WMPPlayState.wmppsStopped != this.m_player.playState)
{
this.iframe.UnifiedMessageBox.ShowInfo(this, text);
}
this.m_player.Error.clearErrorQueue();
}
catch (Exception exception)
{
ClientLogger.WriteGeneral("ContactTip", exception.ToString(), 10);
}
}
private void on_player_playstatechange(object sender, _WMPOCXEvents_PlayStateChangeEvent e)
{
try
{
Trace.WriteLine(string.Format("Player state: {0}", (WMPPlayState) e.newState));
switch (e.newState)
{
case 0:
case 1:
case 10:
this.on_stopplaying_crbt();
return;
case 2:
case 3:
case 9:
this.on_play_crbt();
return;
case 4:
case 5:
case 6:
case 7:
case 8:
return;
}
}
catch (Exception exception)
{
ClientLogger.WriteGeneral("ContactTip", exception.ToString(), 10);
}
}
private void on_selected_page_changed()
{
try
{
if (((this.m_selected_page != null) && this.m_selected_page.visible) && (this.m_selected_page == this.m_crbttome_page))
{
if (this.is_playing)
{
this.m_player.Ctlcontrols.stop();
}
try
{
IWMPNetwork network = this.m_player.network;
if (ConnectionFactory.WebProxy != null)
{
if (this.iframe.AccountManager.CurrentUser.Configuration.UserSetting.NetworkSetting.UseHttpProxy)
{
if (this.iframe.AccountManager.CurrentUser.Configuration.UserSetting.NetworkSetting.UseIeProxy)
{
network.setProxySettings("HTTP", 1);
}
else
{
Uri proxy = ConnectionFactory.WebProxy.GetProxy(new Uri(this.m_crbttome_page.crbt.Url));
network.setProxySettings("HTTP", 2);
network.setProxyName("HTTP", proxy.Host);
network.setProxyPort("HTTP", proxy.Port);
}
}
else
{
network.setProxySettings("HTTP", 3);
}
}
}
catch (Exception exception)
{
ClientLogger.WriteGeneral("ContactTip", exception.ToString(), 10);
}
try
{
if (this.m_player.currentPlaylist.count > 0)
{
this.m_player.currentPlaylist.clear();
}
if (!string.IsNullOrEmpty(this.m_crbttome_page.crbt.Url))
{
IWMPMedia pIWMPMedia = this.m_player.newMedia(this.m_crbttome_page.crbt.Url);
this.m_player.currentPlaylist.appendItem(pIWMPMedia);
}
}
catch (Exception exception2)
{
ClientLogger.WriteGeneral("ContactTip", exception2.ToString(), 10);
}
}
}
catch (Exception exception3)
{
ClientLogger.WriteGeneral("ContactTip", exception3.ToString(), 10);
}
}
private void on_set_default_crbttobuddy_err(object sender, ImpsErrorEventArgs args)
{
try
{
if (UserAccountStatus.Logon == this.iframe.AccountManager.CurrentUser.Status)
{
UiErrorHelper.ShowImpsError(this.iframe, this, args);
}
}
catch (Exception exception)
{
ClientLogger.WriteGeneral("ContactTip", exception.ToString(), 10);
}
}
private void on_stopplaying_crbt()
{
this.m_close_button.Visible = false;
this.paint_title_bar();
}
protected override void OnHandleCreated(EventArgs e)
{
base.OnHandleCreated(e);
axmediaplayer_creator.instance.create_player(this, new axmediaplayer_creator.create_player_callback_proc(this.on_player_created), null);
}
private void OnMainWindowVisibleChanged(object sender, EventArgs e)
{
if ((base.IsHandleCreated && !base.IsDisposed) && !this.iframe.MainWindow.Visible)
{
base.Hide();
}
}
protected override void OnMouseDown(MouseEventArgs e)
{
base.OnMouseDown(e);
if (MouseButtons.Left == e.Button)
{
this.m_last_leftdown = e.get_Location();
on_page_mousedown_args context = new on_page_mousedown_args();
context.m_cursor_position = e.get_Location();
this.browse_pages(new browse_pages_proc(this.on_page_mousedown_proc), context);
}
}
protected override void OnMouseLeave(EventArgs e)
{
base.OnMouseLeave(e);
this.Cursor = Cursors.Default;
this.mouse_location = point_area.default_area;
if (!base.Bounds.Contains(Cursor.Position))
{
if (this.on_mouse_leavehide != null)
{
CancelEventArgs args = new CancelEventArgs(false);
this.on_mouse_leavehide(this, args);
if (!args.Cancel)
{
base.Hide();
}
}
else if (!this.is_playing)
{
base.Hide();
}
}
}
protected override void OnMouseMove(MouseEventArgs e)
{
base.OnMouseMove(e);
if (e.get_Location().Y <= this.m_score_level_bounds.Bottom)
{
if (this.m_headicon_rect.Contains(e.get_Location()))
{
this.Cursor = Cursors.Hand;
this.mouse_location = point_area.headicon_area;
}
else if (this.m_status_img_bounds.Contains(e.get_Location()))
{
this.Cursor = Cursors.Default;
this.mouse_location = point_area.statusimage_area;
}
else if ((this.m_contact == null) && this.m_score_level_bounds.Contains(e.get_Location()))
{
this.Cursor = Cursors.Hand;
this.mouse_location = point_area.score_level;
}
}
else
{
on_page_mousemove_args context = new on_page_mousemove_args();
context.m_hitted = false;
context.m_cursor_position = e.get_Location();
if (this.m_personal_msg.UrlMouseTest(e.get_Location()))
{
context.m_hitted = true;
}
this.browse_pages(new browse_pages_proc(this.on_page_mousemove_proc), context);
this.Cursor = context.m_hitted ? Cursors.Hand : Cursors.Default;
this.mouse_location = point_area.default_area;
}
}
protected override void OnMouseUp(MouseEventArgs e)
{
base.OnMouseUp(e);
if (MouseButtons.Left == e.Button)
{
if (this.m_headicon_rect.Contains(e.get_Location()) && this.m_headicon_rect.Contains(this.m_last_leftdown))
{
this.on_click_headicon();
}
else if (((this.m_contact == null) && this.m_score_level_bounds.Contains(e.get_Location())) && this.m_score_level_bounds.Contains(this.m_last_leftdown))
{
this.on_click_score_level();
}
else if (this.m_personal_msg.UrlMouseTest(e.get_Location()))
{
string url = this.m_personal_msg.UrlMouseHitTest(e.get_Location());
if (!string.IsNullOrEmpty(url))
{
ShellHelper.StartUrl(url);
}
}
}
}
protected override void OnPaint(PaintEventArgs e)
{
if (base.DesignMode)
{
base.OnPaint(e);
}
else
{
this.do_paint(e);
}
}
protected override void OnPaintBackground(PaintEventArgs e)
{
if (base.DesignMode)
{
base.OnPaintBackground(e);
}
}
protected override void OnVisibleChanged(EventArgs e)
{
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -