Esempio n. 1
0
        /// <summary>
        /// 创建窗体
        /// </summary>
        /// <param name="setting"></param>
        /// <returns></returns>
        public string CreateBrowserWindow(string setting)
        {
            if (string.IsNullOrEmpty(setting))
            {
                return("参数错误!");
            }
            string        result        = string.Empty;
            WindowSetting windowSetting = Global.GetWindowSetting(setting);

            setting = JsonConvert.SerializeObject(windowSetting);
            frmScBrowser newWindow = new frmScBrowser(setting);

            if (windowSetting.Modeless)
            {
                newWindow.LoadUrl(windowSetting.Url, windowSetting.Viewmodel);
                newWindow.Visible = false;
                if (newWindow.ShowDialog(this) == DialogResult.OK)
                {
                    result = newWindow.sReturnData;
                }
                newWindow.Dispose();
            }
            else
            {
                newWindow.LoadUrl(windowSetting.Url, windowSetting.Viewmodel);
                newWindow.Show();
                Global.formList.Add(newWindow);
            }
            return(result);
        }
Esempio n. 2
0
 private void MainForm_Load(object sender, EventArgs e)
 {
     browser.LoadUrl(Global.sysConfig.WindowConfig.Url, "IE11");
     m_taskList.Show(dockPanel, DockState.DockLeft);
     browser.Show(dockPanel, DockState.Document);//È«²¿ÆÌÂú
 }