Beispiel #1
0
        public SecondScreenShowForm secondScreenShowWindow; //第二显示器显示的窗体

        public MainForm()
        {
            InitializeComponent();

            this.Check();

            //如果是xp系统,就进行谷歌浏览器初始化设置,不是xp系统则不设置
            //if (Environment.OSVersion.Version.Major == 5 && Environment.OSVersion.Version.Minor == 1)
            //{
            //    //初始化谷歌浏览器的全局设置
            //    MyChromiumBrowserExtend.BrowserInit();
            //}

            //初始化谷歌浏览器的全局设置
            MyChromiumBrowserExtend.BrowserInit();


            #region 分屏显示设置
            if (Screen.AllScreens.Length > 1)
            {
                secondScreenShowWindow = new SecondScreenShowForm();
                showOnMonitor(secondScreenShowWindow, 1);
            }
            #endregion

            this.Load        += MainForm_Load;
            this.FormClosing += MainForm_FormClosing;

            //Windows 7 不使用任务栏的退出程序功能
            if (Environment.OSVersion.Version.Major == 6 && Environment.OSVersion.Version.Minor == 1)
            {
                this.退出系统ToolStripMenuItem.Visible = false;
            }
        }
Beispiel #2
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            this.panel = new Panel();
            this.Controls.Add(panel);

            var path = Application.StartupPath + @"\html\test.html";

            path = path.Replace("#", "%23");

            myBrowser = new MyChromiumBrowserExtend(this);
            myBrowser.secodeScreenShowWindow = secondScreenShowWindow;


            string baseUrl = "http://119.23.15.8:8080/tty";

            try
            {
                baseUrl = ConfigurationManager.AppSettings["BaseUrl"];
            }
            catch (Exception)
            {
                baseUrl = "http://119.23.15.8:8080/tty";
            }
            myBrowser.Navigate(baseUrl);
            this.panel.Controls.Add(myBrowser.getWebBrowser());
            this.panel.Dock = DockStyle.Fill;

            //清理内存
            new Thread(TimerCleanLocalMemory).Start();
        }
Beispiel #3
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            this.panel = new Panel();
            this.Controls.Add(panel);

            var path = Application.StartupPath + "\\HtmlUI\\test.html";

            path = path.Replace("#", "%23");

            //myBrowser = MyChromiumBrowser.Instance(this);
            myBrowser = new MyChromiumBrowserExtend(this);
            myBrowser.secodeScreenShowWindow = secondScreenShowWindow;


            //myBrowser.Navigate("http://192.168.0.102:8080/WDSHGL");
            //myBrowser.Navigate("http://localhost:8080/WDSHGL");
            string baseUrl = "http://119.23.15.8:8080/tty";

            try
            {
                baseUrl = ConfigurationManager.AppSettings["BaseUrl"];
            }
            catch (Exception) {
                baseUrl = "http://119.23.15.8:8080/tty";
            }
            myBrowser.Navigate(baseUrl);
        }
Beispiel #4
0
        public SecondScreenShowForm secondScreenShowWindow; //第二显示器显示的窗体

        public MainForm()
        {
            InitializeComponent();

            this.Check();

            //初始化谷歌浏览器的全局设置
            MyChromiumBrowserExtend.BrowserInit();


            #region 分屏显示设置
            if (Screen.AllScreens.Length > 1)
            {
                secondScreenShowWindow = new SecondScreenShowForm();
                showOnMonitor(secondScreenShowWindow, 1);
            }
            #endregion

            this.Load        += MainForm_Load;
            this.FormClosing += MainForm_FormClosing;
        }
Beispiel #5
0
        public void SecondScreenShowForm_Load(object sender, EventArgs e)
        {
            this.panel = new Panel();
            this.Controls.Add(panel);

            var path = Application.StartupPath + "\\HtmlUI\\test.html";

            path = path.Replace("#", "%23");

            myBrowser = new MyChromiumBrowserExtend(this);

            //string baseUrl = "http://119.23.15.8:8080/tty";
            //try
            //{
            //    baseUrl = ConfigurationManager.AppSettings["BaseUrl"];
            //}
            //catch (Exception)
            //{
            //    baseUrl = "http://119.23.15.8:8080/tty";
            //}
            //myBrowser.Navigate(path);
        }