public WebExtControl(WebCtrlExtension ext, SimFeedbackExtensionFacade facade) { webCtrlExt = ext; Globals.facade = facade; InitializeComponent(); try { PortData.ReadFile(); Globals.facade.LogDebug($"Got ports from PortData file - http '{PortData.Instance.httpPort}' - websvc '{PortData.Instance.webSvcPort}'"); } catch (Exception e) { Globals.facade.LogDebug($"Couldn't read PortData file: '{e.Message}'"); } HttpPortBox1.Validating += new CancelEventHandler(Number_Validating); HttpPortBox1.Text = PortData.Instance.httpPort.ToString(); WebSvcPortBox1.Validating += new CancelEventHandler(Number_Validating); WebSvcPortBox1.Text = PortData.Instance.webSvcPort.ToString(); SFBCtrlWebservices sfbCtrl = new SFBCtrlWebservices(); _ = sfbCtrl.StartWebServicesAsync(); }
public override void Init(SimFeedbackExtensionFacade facade, ExtensionConfig config) { base.Init(facade, config); // call this first Log("Initialize Web Controler Extension"); extControl = new WebExtControl(this, facade); }
public StreamdeckExtensionControl(StreamdeckExtension ext, SimFeedbackExtensionFacade simFeedbackFacade) { _streamdeckExtension = ext; _simFeedbackFacade = simFeedbackFacade; SimFeedbackFacadeProvider.Instance.SimFeedbackFacade = simFeedbackFacade; InitializeComponent(); GuiLoggerProvider.Instance.LogBox = _streamdeckExtensionControlGui1.debugBox; }
public FanatecExtControl(FanatecExtension ext, SimFeedbackExtensionFacade facade) { fanatecExt = ext; simFeedbackFacade = facade; // Initialize DirectInput directInput = new DirectInput(); InitializeComponent(); ListInputDevices(); trackBarMouseSpeed.Value = (int)(mouseSpeed * 10.0); }
public override void Init(SimFeedbackExtensionFacade facade, ExtensionConfig config) { base.Init(facade, config); // call this first Log("Initialize Fanatec Extension"); LogDebug("FanatecExtension: Reading Config"); extConfig = (FanatecExtConfig)config.CustomConfig; if (extConfig == null) { LogDebug("FanatecExtension: No Config found, creating new config"); extConfig = new FanatecExtConfig() { Test = 100, }; config.CustomConfig = extConfig; } extConfig.Test = 97; extControl = new FanatecExtControl(this, facade); }
public TestControl(SimFeedbackExtensionFacade facade, TestExtension extension, int startStopButton = -1, int decreaseIntensity1Button = -1, int increaseIntensity1Button = -1, int decreaseIntensity5Button = -1, int increaseIntensity5Button = -1, int decreaseIntensity10Button = -1, int increaseIntensity10Button = -1, int decreaseIntensity20Button = -1, int increaseIntensity20Button = -1) { this.startStopButton = startStopButton; this.decreaseIntensity1Button = decreaseIntensity1Button; this.increaseIntensity1Button = increaseIntensity1Button; this.decreaseIntensity5Button = decreaseIntensity5Button; this.increaseIntensity5Button = increaseIntensity5Button; this.decreaseIntensity10Button = decreaseIntensity10Button; this.increaseIntensity10Button = increaseIntensity10Button; this.decreaseIntensity20Button = decreaseIntensity20Button; this.increaseIntensity20Button = increaseIntensity20Button; this.facade = facade; this.extension = extension; directInput = new DirectInput(); startStopDelay = extension.GetStartStopDelay(); refreshBtn_Click(null, null); if (joystickList.Count > 0) { enableExtensionButton_Click(null, null); } InitializeComponent(); }
public virtual void Init(SimFeedbackExtensionFacade facade, ExtensionConfig config) { SimFeedbackFacade = facade; }
public override void Init(SimFeedbackExtensionFacade facade, ExtensionConfig config) { base.Init(facade, config); // call this first Log("Initialize Fanatec Extension"); LogDebug("Button Box: Reading Config"); if (!(config.CustomConfig is TestConfig)) { extConfig = new TestConfig() { OverallIntesity = 50, #if FANATEC_OLD_WAY Test = 100, #endif ToggleStartStopButton = -1, ToggleDecreaseIntensity1Button = -1, ToggleIncreaseIntensity1Button = -1, ToggleDecreaseIntensity5Button = -1, ToggleIncreaseIntensity5Button = -1, ToggleDecreaseIntensity10Button = -1, ToggleIncreaseIntensity10Button = -1, ToggleDecreaseIntensity20Button = -1, ToggleIncreaseIntensity20Button = -1, StartStopDelay = 5000 }; config.CustomConfig = extConfig; } extConfig = (TestConfig)config.CustomConfig; if (extConfig == null) { LogDebug("Button Box: No Config found, creating new config"); extConfig = new TestConfig() { OverallIntesity = 50, #if FANATEC_OLD_WAY Test = 100, #endif ToggleStartStopButton = -1, ToggleDecreaseIntensity1Button = -1, ToggleIncreaseIntensity1Button = -1, ToggleDecreaseIntensity5Button = -1, ToggleIncreaseIntensity5Button = -1, ToggleDecreaseIntensity10Button = -1, ToggleIncreaseIntensity10Button = -1, ToggleDecreaseIntensity20Button = -1, ToggleIncreaseIntensity20Button = -1, StartStopDelay = 5000 }; config.CustomConfig = extConfig; } this.conf = config; this.facade = facade; extControl = new TestControl(facade, this, extConfig.ToggleStartStopButton, extConfig.ToggleDecreaseIntensity1Button, extConfig.ToggleIncreaseIntensity1Button, extConfig.ToggleDecreaseIntensity5Button, extConfig.ToggleIncreaseIntensity5Button, extConfig.ToggleDecreaseIntensity10Button, extConfig.ToggleIncreaseIntensity10Button, extConfig.ToggleDecreaseIntensity20Button, extConfig.ToggleIncreaseIntensity20Button); new Thread(new ThreadStart(() => { Thread.Sleep(waitTimeBeforeSimFBInitialized); simFeedbackLoaded = true; Thread.CurrentThread.Join(); })).Start(); //extConfig.OverallIntesity = 50; //extControl = new FanatecExtControl(this, facade); }
public override void Init(SimFeedbackExtensionFacade facade, ExtensionConfig config) { base.Init(facade, config); Log("Initialize Streamdeck Extension"); _extCtrl = new StreamdeckExtensionControl(this, facade); }