void Awake() { recentered = false; _clientKit = FindObjectOfType <ClientKit>(); _displayController = FindObjectOfType <DisplayController>(); _vrController = FindObjectOfType <OsvrUnityNativeVR>(); }
private void SaveKit(IEnumerable <string> cards) { var client = new ClientKit(); var clientInfo = new Set10ExchangeLoyClient(Guid.NewGuid(), null, DbPg.GetHibernateSequenceNextVal(), null, null, null, null, null, 0, 3, 10, DateTime.Now, string.Empty); var cardsList = new ObservableCollection <Set10ExchangeLoyCard>(); foreach (var card in cards) { cardsList.Add(new Set10ExchangeLoyCard(clientInfo.Uid, clientInfo.Set10Guid, DbPg.GetHibernateSequenceNextVal(), card, clientInfo.BonusAccountId)); } client.Client = clientInfo; client.Cards = cardsList; try { client.Save(); if (IsPrintLabel) { Printer.Print(client.Cards[0]?.CardHexNumber, client.Cards[1]?.CardHexNumber, client.Client.Set10Guid.ToString()); } IsScansCount++; EventMsg = $"Комплект с номером {client.Client.Set10Guid} создан"; } catch (Exception ex) { EventMsg = ex.Message; } }
private void Sync(ClientKit kit, NpgsqlConnection dbConnection) { var isExistClient = DbPg.GetExistNumClient(kit.Client.Set10Guid); var cardComposition = kit.Cards.Select(card => new CardsCompositions(card, DbPg.GetExistCardByGuid(card, dbConnection), DbPg.GetExistCardByNumCard(card, dbConnection))).ToList(); dbConnection = DbPg.GetConnection(dbConnection); if (!dbConnection.FullState.Equals(ConnectionState.Open)) { dbConnection.Open(); } var transaction = dbConnection.BeginTransaction(); try { var bAccounts = DbPg.GetBonusAccounts(kit.Client.BonusAccountId, dbConnection); if (bAccounts == null || bAccounts.Count == 0) { BonusAccounts(kit.Client, transaction, dbConnection); } Client(kit.Client, isExistClient, transaction, dbConnection); if (cardComposition.Any()) { Cards(kit.Client, cardComposition, transaction, dbConnection); } transaction.Commit(); } catch (Exception e) { transaction.Rollback(); throw new Exception("Sync kit exception.", e); } }
public static ClientKit GetClientFullInfo(Set10ExchangeLoyClient client, SqlConnection dbConnection = null) { var clientFull = new ClientKit(); clientFull.Client = client; clientFull.Cards = new ObservableCollection <Set10ExchangeLoyCard>(DbMs.GetCardsByClientUid(client.Uid, dbConnection)); return(clientFull); }
void Awake() { _clientKit = ClientKit.instance; _displayController = FindObjectOfType<DisplayController>(); if (recenterOnPlay) SetRoomRotation(); }
public CardsBonusDetailTabItemViewModel(ClientKit client, string nameHeader) : base(nameHeader) { Client = client; BeginDate = DateTime.Now.Date.AddDays(-30); EndDate = DateTime.Now.Date; InitializeCommands(); OkCommandMethod(); }
void Start() { _clientKit = ClientKit.instance; if (_clientKit == null) { Debug.LogError("[OSVR-Unity] OsvrUnityNativeVR requires a ClientKit object in the scene."); } }
void Awake() { _clientKit = FindObjectOfType <ClientKit>(); if (_clientKit == null) { Debug.LogError("DisplayController requires a ClientKit object in the scene."); } SetupApplicationSettings(); }
void Awake() { _clientKit = ClientKit.instance; _displayController = FindObjectOfType <DisplayController>(); if (recenterOnPlay) { SetRoomRotation(); } }
public BlockCardTabItemViewModel(ClientKit client, string nameHeader) : base(nameHeader) { //Client = client; //NewCard = new Set10ExchangeLoyCard //{ // Uid = Guid.NewGuid(), // ClientUid = Client.Client.Uid //}; InitializeCommands(); }
void Start() { _clientKit = ClientKit.instance; if (_clientKit == null) { Debug.LogError("[OSVR-Unity] DisplayController requires a ClientKit object in the scene."); } SetupApplicationSettings(); }
void Awake() { _clientKit = FindObjectOfType <ClientKit>(); if (_clientKit == null) { Debug.LogError("DisplayController requires a ClientKit object in the scene."); } _camera = GetComponent <Camera>(); //get the "dummy" camera SetupApplicationSettings(); }
public ClientInfoTabItemViewModel(ClientKit client) : base( $"{client.Client?.LastName?.ToUpper()} {client.Client?.FirstName?.ToUpper()} {client.Client?.MiddleName?.ToUpper()}" ) { CurrentClient = client; DetailTabItems = new ObservableCollection <TabItemViewModel>(); MustHaveTabItems(); InitializeCommands(); }
private bool _linkDebug = false; //causes crash on exit if true, only enable for debugging //Initialize use of RenderManager via CreateRenderManager call public int InitRenderManager() { if (_linkDebug) { //this will cause a crash when exiting the Unity editor or an application //only use for debugging purposes, do not leave on for release. LinkDebug(functionPointer); // Hook our c++ plugin into Unity's console log. } _clientKit = FindObjectOfType <ClientKit>(); //create a client context for RenderManager. This context should not be updated from Unity. _renderManagerClientContext = new OSVR.ClientKit.ClientContext("com.sensics.rendermanagercontext", 0); return(CreateRenderManager(_renderManagerClientContext)); }
void Awake() { //if an instance of this singleton does not exist, set the instance to this object and make it persist if (_instance == null) { _instance = this; DontDestroyOnLoad(this); } else { //if an instance of this singleton already exists, destroy this one if (_instance != this) { Destroy(this.gameObject); } } }
public static ClientKit GetClientKit() { if (_clientKit == null) { var go = new GameObject("ClientKit"); go.SetActive(false); _clientKit = go.AddComponent <ClientKit>(); _clientKit.AppID = AppID; #if UNITY_STANDALONE_WIN _clientKit.autoStartServer = false; #endif go.SetActive(true); } return(_clientKit); }
void Init() { if (clientKit == null) { clientKit = GameObject.FindObjectOfType <ClientKit>(); } //cache: cachedTransform = transform; if (Camera == null) { if ((Camera = GetComponent <Camera>()) == null) { Camera = gameObject.AddComponent <Camera>(); } } SetViewportRects(); }
public static void SaveClientKit(ClientKit clientKit) { var xd = new XDocument( new XElement("clientKit", new XElement("Client", new XElement(nameof(clientKit.Client.Uid), clientKit.Client.Uid), new XElement(nameof(clientKit.Client.Set10Guid), clientKit.Client.Set10Guid), new XElement(nameof(clientKit.Client.BonusAccountId), clientKit.Client.BonusAccountId), new XElement(nameof(clientKit.Client.LastName), clientKit.Client.LastName), new XElement(nameof(clientKit.Client.FirstName), clientKit.Client.FirstName), new XElement(nameof(clientKit.Client.MiddleName), clientKit.Client.MiddleName), new XElement(nameof(clientKit.Client.BirthDate), clientKit.Client.BirthDate), new XElement(nameof(clientKit.Client.MobilePhone), clientKit.Client.MobilePhone), new XElement(nameof(clientKit.Client.SexId), clientKit.Client.SexId), new XElement(nameof(clientKit.Client.CategoryId), clientKit.Client.CategoryId), new XElement(nameof(clientKit.Client.ChangeTypeId), clientKit.Client.ChangeTypeId), new XElement(nameof(clientKit.Client.IsChanged), clientKit.Client.IsChanged), new XElement(nameof(clientKit.Client.IsNew), clientKit.Client.IsNew), new XElement(nameof(clientKit.Client.EMail), clientKit.Client.EMail)), new XElement("Cards", clientKit.Cards.Select(card => new XElement("Card", new XElement(nameof(card.Uid), card.Uid), new XElement(nameof(card.ClientUid), card.ClientUid), new XElement(nameof(card.Set10Guid), card.Set10Guid), new XElement(nameof(card.Set10ClientGuid), card.Set10ClientGuid), new XElement(nameof(card.CardNumber), card.CardNumber), new XElement(nameof(card.CardHexNumber), card.CardHexNumber), new XElement(nameof(card.BonusAccountId), card.BonusAccountId), new XElement(nameof(card.IsBlocked), card.IsBlocked), new XElement(nameof(card.IsChanged), card.IsChanged), new XElement(nameof(card.IsNew), card.IsNew)))))); xd.ToString(); using (var dbConnection = GetConnection()) { var p = new DynamicParameters(); p.Add("@kit", xd.ToString()); dbConnection.Execute("Set10Exchange_Loy_SaveClientKit", p, commandType: CommandType.StoredProcedure); } }
public AddNewCardTabItemViewModel(ClientKit client, string nameHeader) : base(nameHeader) { Client = client; NewCard = new Set10ExchangeLoyCard(Client.Client.Uid, Client.Client.Set10Guid, Client.Client.BonusAccountId); InitializeCommands(); }
void Init() { if(clientKit == null) { clientKit = GameObject.FindObjectOfType<ClientKit>(); } //cache: cachedTransform = transform; if (Camera == null) { if ((Camera = GetComponent<Camera>()) == null) { Camera = gameObject.AddComponent<Camera>(); } } SetViewportRects(); }
void Awake() { _clientKit = FindObjectOfType<ClientKit>(); if(_clientKit == null) { Debug.LogError("DisplayController requires a ClientKit object in the scene."); } _camera = GetComponent<Camera>(); //get the "dummy" camera SetupApplicationSettings(); }
void Awake() { _clientKit = ClientKit.instance; _displayController = FindObjectOfType <DisplayController>(); _vrController = FindObjectOfType <OsvrUnityNativeVR>(); }
void Awake() { _clientKit = FindObjectOfType<ClientKit>(); _displayController = FindObjectOfType<DisplayController>(); }
void Awake() { _clientKit = FindObjectOfType<ClientKit>(); if (_clientKit == null) { Debug.LogError("DisplayController requires a ClientKit object in the scene."); } SetupApplicationSettings(); }
public CardSingleOperationTabItemViewModel(ClientKit client, Set10ExchangeLoyCard card, string nameHeader) : base(nameHeader) { }
void Awake() { DLLSearchPathFixer.fix(); //if an instance of this singleton does not exist, set the instance to this object and make it persist if(_instance == null) { _instance = this; DontDestroyOnLoad(this); } else { //if an instance of this singleton already exists, destroy this one if(_instance != this) { Destroy(this.gameObject); } } }
void Awake() { _clientKit = ClientKit.instance; _displayController = FindObjectOfType <DisplayController>(); }
private bool _linkDebug = false; //causes crash on exit if true, only enable for debugging //Initialize use of RenderManager via CreateRenderManager call public int InitRenderManager() { if (_linkDebug) { //this will cause a crash when exiting the Unity editor or an application //only use for debugging purposes, do not leave on for release. LinkDebug(functionPointer); // Hook our c++ plugin into Unity's console log. } _clientKit = FindObjectOfType<ClientKit>(); //create a client context for RenderManager. This context should not be updated from Unity. _renderManagerClientContext = new OSVR.ClientKit.ClientContext("com.sensics.rendermanagercontext", 0); return CreateRenderManager(_renderManagerClientContext); }
void Awake() { _clientKit = FindObjectOfType <ClientKit>(); _displayController = FindObjectOfType <DisplayController>(); }
public ClientProfileTabItemViewModel(ClientKit client, string nameHeader) : base(nameHeader) { Client = client; SexTypes = DbMs.GetSexType(); ClientCategories = DbMs.GetClientCategory(); }
void Awake() { recentered = false; _clientKit = FindObjectOfType <ClientKit>(); _displayController = FindObjectOfType <DisplayController>(); }