/// <summary> /// 加载数据 /// </summary> /// <param name="state">状态</param> /// <returns>加载状态</returns> public static int LoadData(int state) { if (m_mainUI != null) { m_mainUI.LoadData(); } return(0); }
/// <summary> /// 加载 /// </summary> /// <param name="name">名称</param> public void LoadXml(String name) { if (name == "EmailWindow") { m_xml = new EmailWindow(); } else if (name == "EmailWindow2") { m_xml = new EmailWindow2(); } m_xml.CreateNative(); m_native = m_xml.Native; m_native.Paint = new GdiPlusPaintEx(); m_host = new WinHostEx(); m_host.Native = m_native; m_native.Host = m_host; m_host.HWnd = Handle; m_native.AllowScaleSize = true; m_native.DisplaySize = new SIZE(ClientSize.Width, ClientSize.Height); m_xml.ResetScaleSize(GetClientSize()); m_xml.Native.ResourcePath = DataCenter.GetAppPath() + "\\image"; m_xml.Script = new GaiaScript(m_xml); m_xml.Load(DataCenter.GetAppPath() + "\\config\\" + name + ".html"); m_host.ToolTip = new ToolTipA(); m_host.ToolTip.Font = new FONT("SimSun", 20, true, false, false); (m_host.ToolTip as ToolTipA).InitialDelay = 250; m_native.Update(); Invalidate(); LoginForm loginForm = new LoginForm(); loginForm.ShowDialog(); if (name == "EmailWindow") { (m_xml as EmailWindow).EmailInfo = loginForm.EmailInfo; } else if (name == "EmailWindow2") { (m_xml as EmailWindow2).EmailInfo = loginForm.EmailInfo; } m_xml.LoadData(); }