Example #1
0
 /// <summary>
 /// 加载
 /// </summary>
 /// <param name="name">名称</param>
 public void LoadXml(String name)
 {
     if (name == "PlanWindow")
     {
         DataCenter.ExportService = new ExportService();
         DataCenter.PlanService   = new PlanService();
         m_xml = new PlanWindow();
         DataCenter.PlanWindow = m_xml as PlanWindow;
     }
     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.Script = new GaiaScript(m_xml);
     m_xml.Native.ResourcePath = DataCenter.GetAppPath() + "\\config";
     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();
 }
Example #2
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();
        }