Пример #1
0
        public GpdLoader(TrayApplicationContext _parent)
        {
            this.parent = _parent;

            InitializeComponent();

            //custom
            this.webBrowser1.ScrollBarsEnabled  = false;
            this.webBrowser1.DocumentCompleted += new System.Windows.Forms.WebBrowserDocumentCompletedEventHandler(this.webBrowser1_DocumentCompleted);
            this.webBrowser1.PreviewKeyDown    += new System.Windows.Forms.PreviewKeyDownEventHandler(this.webBrowser1_PreviewKeyDown);
            this.ShowInTaskbar   = false;
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            this.ClientSize      = new System.Drawing.Size(1200, 600);
            this.Location        = new Point(40, 35);
            this.TopMost         = true;

            //this.BackColor = Color.Fuchsia;
            //this.TransparencyKey = Color.Fuchsia;
            //this.Opacity = 0.5;



            //other
            xControllerThread = new ControllerThread(this);
            //xControllerThread.parent = this;

            RegistryKey key = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION", true);

            key.SetValue("GpdLoaderTray1.exe", 0x2AF9);

            string curDir = Directory.GetCurrentDirectory();

            webBrowser1.Url = new System.Uri(Directory.GetCurrentDirectory() + "\\html\\index2.html");// new Uri(String.Format("file:///{0}/index2.html", curDir));
            webBrowser1.ObjectForScripting = new Exports(this);
            return;
        }
Пример #2
0
 public MainHidden(TrayApplicationContext _parent)
 {
     this.parent = _parent;
     UsbNotification.RegisterUsbDeviceNotification(this.Handle);
 }