public DeviceDetectorForm(DeviceDetector detector)
 {
     InitializeComponent();
     _Detector = detector;
     _Detector.DeviceChanged += new DeviceDetector.DeviceDetectorEventHandler(_Detector_DeviceChanged);
 }
 public DeviceDetectorForm(DeviceDetector detector)
 {
     InitializeComponent();
     _Detector = detector;
     _Detector.DeviceChanged += new DeviceDetector.DeviceDetectorEventHandler(_Detector_DeviceChanged);
 }
Exemple #3
0
 void UpdateForm1()
 {
     detector = new DeviceDetector(false);
     detector.DeviceChanged += new DeviceDetector.DeviceDetectorEventHandler(detector_DeviceChanged);
     BusyLoadingCircle.Visible = false;
     BusyLoadingCircle.Top = HeaderPictureBox.Top;
     BusyLoadingCircle.Left = HeaderPictureBox.Left;
     defaultBody = HelpBodyLabel.Text;
     //if (DesignMode) return;
     OptionsPanel.InitOptions();
     // Set status.
     StatusSaveLabel.Visible = false;
     StatusEventsLabel.Visible = false;
     // Load Tab pages.
     ControlPages = new TabPage[4];
     ControlPages[0] = Pad1TabPage;
     ControlPages[1] = Pad2TabPage;
     ControlPages[2] = Pad3TabPage;
     ControlPages[3] = Pad4TabPage;
     //BuletImageList.Images.Add("bullet_square_glass_blue.png", new Bitmap(Helper.GetResource("Images.bullet_square_glass_blue.png")));
     //BuletImageList.Images.Add("bullet_square_glass_green.png", new Bitmap(Helper.GetResource("Images.bullet_square_glass_green.png")));
     //BuletImageList.Images.Add("bullet_square_glass_grey.png", new Bitmap(Helper.GetResource("Images.bullet_square_glass_grey.png")));
     //BuletImageList.Images.Add("bullet_square_glass_red.png", new Bitmap(Helper.GetResource("Images.bullet_square_glass_red.png")));
     //BuletImageList.Images.Add("bullet_square_glass_yellow.png", new Bitmap(Helper.GetResource("Images.bullet_square_glass_yellow.png")));
     foreach (var item in ControlPages) item.ImageKey = "bullet_square_glass_grey.png";
     // Hide status values.
     StatusDllLabel.Text = "";
     MainStatusStrip.Visible = false;
     // Check if INI and DLL is on disk.
     WarningsForm.CheckAndOpen();
 }
Exemple #4
0
 void LoadForm()
 {
     formLoaded = true;
     detector = new DeviceDetector(false);
     detector.DeviceChanged += new DeviceDetector.DeviceDetectorEventHandler(detector_DeviceChanged);
     BusyLoadingCircle.Visible = false;
     BusyLoadingCircle.Top = HeaderPictureBox.Top;
     BusyLoadingCircle.Left = HeaderPictureBox.Left;
     defaultBody = HelpBodyLabel.Text;
     //if (DesignMode) return;
     OptionsPanel.InitOptions();
     // Set status.
     StatusSaveLabel.Visible = false;
     StatusEventsLabel.Visible = false;
     // Load Tab pages.
     ControlPages = new TabPage[4];
     ControlPages[0] = Pad1TabPage;
     ControlPages[1] = Pad2TabPage;
     ControlPages[2] = Pad3TabPage;
     ControlPages[3] = Pad4TabPage;
     //BuletImageList.Images.Add("bullet_square_glass_blue.png", new Bitmap(Helper.GetResource("Images.bullet_square_glass_blue.png")));
     //BuletImageList.Images.Add("bullet_square_glass_green.png", new Bitmap(Helper.GetResource("Images.bullet_square_glass_green.png")));
     //BuletImageList.Images.Add("bullet_square_glass_grey.png", new Bitmap(Helper.GetResource("Images.bullet_square_glass_grey.png")));
     //BuletImageList.Images.Add("bullet_square_glass_red.png", new Bitmap(Helper.GetResource("Images.bullet_square_glass_red.png")));
     //BuletImageList.Images.Add("bullet_square_glass_yellow.png", new Bitmap(Helper.GetResource("Images.bullet_square_glass_yellow.png")));
     foreach (var item in ControlPages) item.ImageKey = "bullet_square_glass_grey.png";
     // Hide status values.
     StatusDllLabel.Text = "";
     MainStatusStrip.Visible = false;
     // Check if INI and DLL is on disk.
     WarningsForm.CheckAndOpen();
     if (!CheckFiles(true)) return;
     CheckEncoding(SettingManager.TmpFileName);
     CheckEncoding(SettingManager.IniFileName);
     // Show status values.
     MainStatusStrip.Visible = true;
     // Load PAD controls.
     ControlPads = new Controls.PadControl[4];
     for (int i = 0; i < ControlPads.Length; i++)
     {
         ControlPads[i] = new Controls.PadControl(i);
         ControlPads[i].Name = string.Format("ControlPad{0}", i + 1);
         ControlPads[i].Dock = DockStyle.Fill;
         ControlPages[i].Controls.Add(ControlPads[i]);
         ControlPads[i].InitPadControl();
     }
     // Initialize presets. Execute only after name of cIniFile is set.
     SettingsDatabasePanel.InitPresets();
     // Allow events after PAD control are loaded.
     MainTabControl.SelectedIndexChanged += new System.EventHandler(this.MainTabControl_SelectedIndexChanged);
     // Load about control.
     ControlAbout = new Controls.AboutControl();
     ControlAbout.Dock = DockStyle.Fill;
     AboutTabPage.Controls.Add(ControlAbout);
     // Update settings map.
     UpdateSettingsMap();
     ReloadXinputSettings();
     ////InitDirectInputTab();
     //// Timer will execute ReloadXInputLibrary();
     ////XInput.ReLoadLibrary(cXinput3File);
     ////XInput.ReLoadLibrary(cXinput3File);
     //// start capture events.
     if (WinAPI.IsVista && WinAPI.IsElevated() && WinAPI.IsInAdministratorRole) this.Text += " (Administrator)";
     ////ReloadXInputLibrary();
 }
Exemple #5
0
 void LoadForm()
 {
     formLoaded = true;
     detector = new DeviceDetector(false);
     detector.DeviceChanged += new DeviceDetector.DeviceDetectorEventHandler(detector_DeviceChanged);
     BusyLoadingCircle.Visible = false;
     BusyLoadingCircle.Top = HeaderPictureBox.Top;
     BusyLoadingCircle.Left = HeaderPictureBox.Left;
     defaultBody = HelpBodyLabel.Text;
     //if (DesignMode) return;
     // init default
     OptionsPanel.InitOptions();
     // Set status.
     StatusSaveLabel.Visible = false;
     StatusEventsLabel.Visible = false;
     // Load Tab pages.
     ControlPages = new TabPage[4];
     ControlPages[0] = Pad1TabPage;
     ControlPages[1] = Pad2TabPage;
     ControlPages[2] = Pad3TabPage;
     ControlPages[3] = Pad4TabPage;
     BuletImageList.Images.Add("bullet_square_glass_blue.png", new Bitmap(Helper.GetResource("Images.bullet_square_glass_blue.png")));
     BuletImageList.Images.Add("bullet_square_glass_green.png", new Bitmap(Helper.GetResource("Images.bullet_square_glass_green.png")));
     BuletImageList.Images.Add("bullet_square_glass_grey.png", new Bitmap(Helper.GetResource("Images.bullet_square_glass_grey.png")));
     BuletImageList.Images.Add("bullet_square_glass_red.png", new Bitmap(Helper.GetResource("Images.bullet_square_glass_red.png")));
     BuletImageList.Images.Add("bullet_square_glass_yellow.png", new Bitmap(Helper.GetResource("Images.bullet_square_glass_yellow.png")));
     foreach (var item in ControlPages) item.ImageKey = "bullet_square_glass_grey.png";
     // Hide status values.
     StatusDllLabel.Text = "";
     MainStatusStrip.Visible = false;
     // Check if ini and dll is on disk.
     if (!CheckFiles(true)) return;
     CheckEncoding(SettingManager.TmpFileName);
     CheckEncoding(SettingManager.IniFileName);
     // Show status values.
     MainStatusStrip.Visible = true;
     // Load PAD controls.
     ControlPads = new Controls.PadControl[4];
     for (int i = 0; i < ControlPads.Length; i++)
     {
         ControlPads[i] = new Controls.PadControl(i);
         ControlPads[i].Name = string.Format("ControlPad{0}", i + 1);
         ControlPads[i].Dock = DockStyle.Fill;
         ControlPages[i].Controls.Add(ControlPads[i]);
         ControlPads[i].InitPadControl();
         // Init presets. Execute only after name of cIniFile is set.
         ControlPads[i].InitPresets();
     }
     // Allow events after PAD control are loaded.
     MainTabControl.SelectedIndexChanged += new System.EventHandler(this.MainTabControl_SelectedIndexChanged);
     // Load about control.
     ControlAbout = new Controls.AboutControl();
     ControlAbout.Dock = DockStyle.Fill;
     AboutTabPage.Controls.Add(ControlAbout);
     // Update settings map.
     UpdateSettingsMap();
     ReloadXinputSettings();
     Version v = new Version(Application.ProductVersion);
     this.Text += " " + Application.ProductVersion;
     // Version = major.minor.build.revision
     switch (v.Build)
     {
         case 0: this.Text += " Alpha"; break;  // Alpha Release (AR)
         case 1: this.Text += " Beta 1"; break; // Master Beta (MB)
         case 2: this.Text += " Beta 2"; break; // Feature Complete (FC)
         case 3: this.Text += " Beta 3"; break; // Technical Preview (TP)
         case 4: this.Text += " RC"; break;     // Release Candidate (RC)
         // case 5: this.Text += " RTM"; break; // Release to Manufacturing (RTM)
         // case 6: this.Text += " GM"; break;  // General Availability (GA) / Gold
     }
     ////InitDirectInputTab();
     //// Timer will execute ReloadXInputLibrary();
     ////XInput.ReLoadLibrary(cXinput3File);
     ////XInput.ReLoadLibrary(cXinput3File);
     //// start capture events.
     if (Win32.WinAPI.IsVista && Win32.WinAPI.IsElevated() && Win32.WinAPI.IsInAdministratorRole) this.Text += " (Administrator)";
     ////ReloadXInputLibrary();
 }
 void LoadForm()
 {
     formLoaded                = true;
     detector                  = new DeviceDetector(false);
     detector.DeviceChanged   += new DeviceDetector.DeviceDetectorEventHandler(detector_DeviceChanged);
     BusyLoadingCircle.Visible = false;
     BusyLoadingCircle.Top     = HeaderPictureBox.Top;
     BusyLoadingCircle.Left    = HeaderPictureBox.Left;
     defaultBody               = HelpBodyLabel.Text;
     //if (DesignMode) return;
     // init default
     OptionsPanel.InitOptions();
     // Set status.
     StatusSaveLabel.Visible   = false;
     StatusEventsLabel.Visible = false;
     // Load Tab pages.
     ControlPages    = new TabPage[4];
     ControlPages[0] = Pad1TabPage;
     ControlPages[1] = Pad2TabPage;
     ControlPages[2] = Pad3TabPage;
     ControlPages[3] = Pad4TabPage;
     //BuletImageList.Images.Add("bullet_square_glass_blue.png", new Bitmap(Helper.GetResource("Images.bullet_square_glass_blue.png")));
     //BuletImageList.Images.Add("bullet_square_glass_green.png", new Bitmap(Helper.GetResource("Images.bullet_square_glass_green.png")));
     //BuletImageList.Images.Add("bullet_square_glass_grey.png", new Bitmap(Helper.GetResource("Images.bullet_square_glass_grey.png")));
     //BuletImageList.Images.Add("bullet_square_glass_red.png", new Bitmap(Helper.GetResource("Images.bullet_square_glass_red.png")));
     //BuletImageList.Images.Add("bullet_square_glass_yellow.png", new Bitmap(Helper.GetResource("Images.bullet_square_glass_yellow.png")));
     foreach (var item in ControlPages)
     {
         item.ImageKey = "bullet_square_glass_grey.png";
     }
     // Hide status values.
     StatusDllLabel.Text     = "";
     MainStatusStrip.Visible = false;
     // Check if ini and dll is on disk.
     if (!CheckFiles(true))
     {
         return;
     }
     CheckEncoding(SettingManager.TmpFileName);
     CheckEncoding(SettingManager.IniFileName);
     // Show status values.
     MainStatusStrip.Visible = true;
     // Load PAD controls.
     ControlPads = new Controls.PadControl[4];
     for (int i = 0; i < ControlPads.Length; i++)
     {
         ControlPads[i]      = new Controls.PadControl(i);
         ControlPads[i].Name = string.Format("ControlPad{0}", i + 1);
         ControlPads[i].Dock = DockStyle.Fill;
         ControlPages[i].Controls.Add(ControlPads[i]);
         ControlPads[i].InitPadControl();
     }
     // Init presets. Execute only after name of cIniFile is set.
     SettingsDatabasePanel.InitPresets();
     // Allow events after PAD control are loaded.
     MainTabControl.SelectedIndexChanged += new System.EventHandler(this.MainTabControl_SelectedIndexChanged);
     // Load about control.
     ControlAbout      = new Controls.AboutControl();
     ControlAbout.Dock = DockStyle.Fill;
     AboutTabPage.Controls.Add(ControlAbout);
     // Update settings map.
     UpdateSettingsMap();
     ReloadXinputSettings();
     ////InitDirectInputTab();
     //// Timer will execute ReloadXInputLibrary();
     ////XInput.ReLoadLibrary(cXinput3File);
     ////XInput.ReLoadLibrary(cXinput3File);
     //// start capture events.
     if (WinAPI.IsVista && WinAPI.IsElevated() && WinAPI.IsInAdministratorRole)
     {
         this.Text += " (Administrator)";
     }
     ////ReloadXInputLibrary();
 }