public TransferOfAxesConfig GetTransferOfAxesConfig() { var args = db.ConfigArgs.GetTransferOfAxesConfig(); TransferOfAxesConfig config = new TransferOfAxesConfig(); config.Zero = args.Find(i => i.Key == "TransferOfAxes.Zero").ToTModel(); config.Scale = args.Find(i => i.Key == "TransferOfAxes.Scale").ToTModel(); config.Direction = args.Find(i => i.Key == "TransferOfAxes.Direction").ToTModel(); return(config); }
public bool SetTransferOfAxesConfig(TransferOfAxesConfig config) { try { return(db.ConfigArgs.SetTransferOfAxesConfig(config.Zero.ToDbModel(), config.Scale.ToDbModel(), config.Direction.ToDbModel())); } catch (System.Exception ex) { Log.Error(LogTags.DbGet, "SetTransferOfAxesConfig", "Exception:" + ex); return(false); } }
// Use this for initialization void Start() { Instance = this; cofig = new TransferOfAxesConfig(); LocationManagerData = new LocationManager(); GetPercentageData(); GetLocationData(); GetAngleData(); ChangeTextColor(InitalizeButton); ChangeTextColor(SaveButton); InitalizeButton.GetComponent <Button>().onClick.AddListener(InitializeBut); SaveButton.GetComponent <Button>().onClick.AddListener(SaveBut); }
public bool SetTransferOfAxesConfig(TransferOfAxesConfig config) { bool r = Edit(config.Zero); if (r == false) { return(false); } r = Edit(config.Scale); if (r == false) { return(false); } r = Edit(config.Direction); return(r); }
public TransferOfAxesConfig GetTransferOfAxesConfig() { try { var args = db.ConfigArgs.GetTransferOfAxesConfig(); TransferOfAxesConfig config = new TransferOfAxesConfig(); config.Zero = args.Find(i => i.Key == "TransferOfAxes.Zero").ToTModel(); config.Scale = args.Find(i => i.Key == "TransferOfAxes.Scale").ToTModel(); config.Direction = args.Find(i => i.Key == "TransferOfAxes.Direction").ToTModel(); return(config); } catch (System.Exception ex) { Log.Error(LogTags.DbGet, "GetTransferOfAxesConfig", "Exception:" + ex); return(null); } }
void GetConfigs() { Debug.Log("->GetConfigs"); LocationServiceClient client = GetLocationServiceClient(); ConfigArg[] args = client.GetConfigArgList(); foreach (ConfigArg arg in args) { Debug.Log(string.Format("Key:{0},Value:{1}", arg.Key, arg.Value)); } TransferOfAxesConfig axesConfig = client.GetTransferOfAxesConfig(); Debug.Log("axesConfig"); Debug.Log(string.Format("Zero Key:{0},Value:{1}", axesConfig.Zero.Key, axesConfig.Zero.Value)); Debug.Log(string.Format("Scale Key:{0},Value:{1}", axesConfig.Scale.Key, axesConfig.Scale.Value)); Debug.Log(string.Format("Direction Key:{0},Value:{1}", axesConfig.Direction.Key, axesConfig.Direction.Value)); string[] pars = axesConfig.Zero.Value.Split(','); Vector3 vector31 = new Vector3(float.Parse(pars[0]), float.Parse(pars[1]), float.Parse(pars[1])); Debug.Log("vector31:" + vector31); }
public bool SetTransferOfAxesConfig(TransferOfAxesConfig config) { return(db.ConfigArgs.SetTransferOfAxesConfig(config.Zero.ToDbModel(), config.Scale.ToDbModel(), config.Direction.ToDbModel())); }
public bool SetTransferOfAxesConfig(TransferOfAxesConfig config) { return(service.SetTransferOfAxesConfig(config)); }