public static void UpdateCamType() { if (ConfigControl.forceCamera.boolVal) { OtherCamCom.CamConfig config = OtherCamCom.CamConfig.Strict; switch (ConfigControl.forceType.stringVal) { case "SSTraditional": config = OtherCamCom.CamConfig.SSTraditional; break; case "Strict": config = OtherCamCom.CamConfig.Strict; break; case "RevTilt": config = OtherCamCom.CamConfig.RevTilt; break; case "Legacy": config = OtherCamCom.CamConfig.Legacy; break; } OtherCamCom.currentConfig = config; } }
public void UpdateCamConfig(OtherCamCom.CamConfig type) { Invoke((MethodInvoker) delegate { cB_Other_ForceMode.Text = type.ToString(); ConfigControl.forceType.UpdateValue(cB_Other_ForceMode.Text); }); }
public async Task CheckForCamera() { try { if (!MainForm.m.finishedLoading || !AsyncCamCom.sock.Connected) { isCamera = false; isActive = false; return; } if (ConfigControl.forceCamera.boolVal) { isCamera = true; SettingsPage.UpdateCamType(); } else { OtherCamCom.CamConfig cfg = await OtherCamCom.CheckConfiguration(); if (cfg != OtherCamCom.CamConfig.Null) { isCamera = true; } MainForm.m.setPage.UpdateCamConfig(cfg); } } catch (Exception e) { MessageBox.Show(e.ToString()); } }