public SceneItemModel(ISceneItem item, string id, SceneItemModelType type) { Id = id; Type = type; Model = item; Rect = new Property <SceneRect>(item.Rect); Zoom = new ZoomModel(); Rect.OnChange = (o, n) => Model.Rect = n; Zoom.Changed = () => { Model.Ptz = Zoom.GetPtz(); Model.ZoomBehavior = Zoom.ZoomBehavior.Value.Value; }; }
public override void BreakTouch(TouchGroup touches, float touchOneStateMoveTime = 0.0f, float touchOneStateTime = 0.0f, CheckingRayIntoObject checkingRay = null) { if (stateT == TouchControllersState.TCS_End) { return; } Touch[] touchOne = touches.touchOne; Touch[] touchTwo = touches.touchTwo; Touch[] touchTree = touches.touchTree; Vector3 point1 = Vector3.zero; Vector3 point2 = Vector3.zero; Vector3 point1Delta = Vector3.zero; Vector3 point2Delta = Vector3.zero; if (touchOne != null) { point1 = touchOne[0].position; point1Delta = touchOne[0].deltaPosition; } if (touchTwo != null) { point2 = touchTwo[0].position; point2Delta = touchTwo[0].deltaPosition; } ZoomModel zoom = new ZoomModel { point1 = point1, point1Delta = point1Delta, point2 = point2, point2Delta = point2Delta, stateT = stateT }; if (stateT == TouchControllersState.TCS_Start) { MainContextView.DispatchStrangeEvent(EventGlobal.E_TouchAndMouseGestures_Zoom, zoom); zoom.stateT = TouchControllersState.TCS_Action; MainContextView.DispatchStrangeEvent(EventGlobal.E_TouchAndMouseGestures_Zoom, zoom); zoom.stateT = TouchControllersState.TCS_End; MainContextView.DispatchStrangeEvent(EventGlobal.E_TouchAndMouseGestures_Zoom, zoom); } else if (stateT == TouchControllersState.TCS_Action) { MainContextView.DispatchStrangeEvent(EventGlobal.E_TouchAndMouseGestures_Zoom, zoom); zoom.stateT = TouchControllersState.TCS_End; MainContextView.DispatchStrangeEvent(EventGlobal.E_TouchAndMouseGestures_Zoom, zoom); } }
private void ZoomEvent(TouchControllersState _stateT, Vector3 point1, Vector3 point2, Vector3 point1Delta, Vector3 point2Delta) { /* * Событие зума, имеет 3 состояния Старт,работа,конец * Происхотит при работе двумя пальцами, без учета пальцев попавших в элементы UI * Дополнительные проверки не нужны * point1 - палец 1 * point2 - палец 2 * point1Delta - дульта перемешения пальца 1 * point2Delta - дульта перемешения пальца 2 */ #if DEBUG_LOG Log.Write("ZoomEvent: " + _stateT.ToString() + " p1:" + point1.ToString() + " dp1:" + point1Delta.ToString() + " p2:" + point2.ToString() + " dp2:" + point2Delta.ToString()); #endif ZoomModel zoom = new ZoomModel { point1 = point1, point1Delta = point1Delta, point2 = point2, point2Delta = point2Delta, stateT = _stateT }; MainContextView.DispatchStrangeEvent(EventGlobal.E_TouchAndMouseGestures_Zoom, zoom); }
// GET: Zoom // GET: Zoom public ActionResult Zoom() { string apiKey = "XZLoLzk2S6G-eAjwmlRjdQ"; string apiSecret = "JhgWN5YTEJ6NoWANXIMusSOKv6JY2AJOyvod"; //string meetingNumber = "72487077366"; string dtParameter = RenderingContext.Current.Rendering.Parameters["Datasource"]; var thankyou_page_item = Sitecore.Context.Database.GetItem(dtParameter); //var thankyou_page_item = Sitecore.Context.Database.GetItem(new Sitecore.Data.ID("{64074570-1803-4D35-80A7-071571247B40}")); //var thanksurl = Sitecore.Feature.Library.Helper.Core.getGeneralLink(thankyou_page_item.Fields[Sitecore.Feature.Library.Templates.GeneralUrl.Fields.Url]); string meetingNumber = thankyou_page_item.Fields[Sitecore.Feature.Library.Templates.GeneralValue.Fields.Title].Value; String ts = (ToTimestamp(DateTime.UtcNow.ToUniversalTime()) - 30000).ToString(); string role = "0"; string token = GenerateToken(apiKey, apiSecret, meetingNumber, ts, role); ZoomModel zoom = new ZoomModel(); zoom.signature = token; zoom.meetingPwd = ""; zoom.meetingNumber = meetingNumber; zoom.apiKey = apiKey; return(View(zoom)); }
public ActionResult UpdateUserFromCRM(int UserId, string firstname, string lastname, string emailid, string companyname, string jobtitle, string phone, string crmregid, string allowpost, string senioritylevel, string primaryjob, string natureofbusiness, string country, string topicofinterest, string registeredforglobal, bool checkbox1, bool checkbox2, bool checkbox3, bool checkbox4, bool iszoomevent, bool isbigmarkerevent) { try { var registeredUser = db.RegisteredUsers.Find(UserId); registeredUser.CRM_FirstName = firstname; registeredUser.CRM_LastName = lastname; registeredUser.CRM_EmaiId = emailid; registeredUser.CRM_CompanyName = companyname; registeredUser.CRM_JobTitle = jobtitle; registeredUser.CRM_RegistrationId = crmregid; registeredUser.IsDeleted = false; registeredUser.IsRegistered = true; db.Entry(registeredUser).State = EntityState.Modified; var allowuser = db.Packages.Select(x => x.No_of_Registration).FirstOrDefault(); var reguser = db.RegisteredUsers.Where(x => x.EventId == registeredUser.EventId && x.Ispaid == true).Count(); var events = EventService.GetEventById(Convert.ToInt32(registeredUser.EventId)); var availablecredits = CustomerService.GetCustomerAvailableCredit(events.CustomerId); if (availablecredits > 0) { registeredUser.Ispaid = true; } else { registeredUser.Ispaid = false; } db.SaveChanges(); if (allowpost == "true" || allowpost == null || allowpost == "undefined") { ShareOnWall(Convert.ToInt32(registeredUser.EventId), registeredUser.ProfileId, registeredUser.AuthToken, registeredUser.UserId); } if (iszoomevent) { db.AddZoomUserDetails(0, registeredUser.EventId, registeredUser.UserId, senioritylevel, primaryjob, natureofbusiness, country, topicofinterest, registeredforglobal, checkbox1, checkbox2, checkbox3, checkbox4, null, null); var zoomtoken = db.SpGetEventToken(events.EventId); try { if (zoomtoken != null) { ZoomModel objZoomModel = new ZoomModel(); objZoomModel.id = events.WebinarId; objZoomModel.token = zoomtoken.FirstOrDefault(); objZoomModel.payload.first_name = registeredUser.FirstName; objZoomModel.payload.last_name = registeredUser.LastName; objZoomModel.payload.email = registeredUser.Email; objZoomModel.payload.org = registeredUser.Company; objZoomModel.payload.phone = phone; objZoomModel.payload.country = country; var jsonbody = JsonConvert.SerializeObject(objZoomModel); var client = new RestClient("https://connect-zoom.eventnx.com/api/webinar/register"); client.Timeout = -1; var request = new RestRequest(Method.PUT); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", jsonbody, ParameterType.RequestBody); IRestResponse <ZoomResponse> response = client.Execute <ZoomResponse>(request); var zoomresponse = response.Data; if (zoomresponse.token != null) { EventService.UpdateZoomTokenEvent(zoomresponse.token, events.CustomerId); } } } catch (Exception ex) { } } if (isbigmarkerevent) { db.AddBigMarkerUserDetails(0, registeredUser.EventId, registeredUser.UserId, senioritylevel, primaryjob, natureofbusiness, country, topicofinterest, registeredforglobal, checkbox1, checkbox2, checkbox3, checkbox4, null, null); var zoomtoken = db.SpGetBigMarkerEventToken(events.EventId); try { if (zoomtoken != null) { BigMarkerRequest bigMarkerModel = new BigMarkerRequest(); bigMarkerModel.Id = events.BigMarkerWebinairId; bigMarkerModel.Token = zoomtoken.FirstOrDefault(); bigMarkerModel.Payload.FirstName = registeredUser.FirstName; bigMarkerModel.Payload.LastName = registeredUser.LastName; bigMarkerModel.Payload.Email = registeredUser.Email; bigMarkerModel.Payload.CustomFields = ""; bigMarkerModel.Payload.UtmBmcrSource = registeredUser.Source; bigMarkerModel.Payload.CustomUserId = registeredUser.UserId.ToString(); var jsonbody = JsonConvert.SerializeObject(bigMarkerModel); var client = new RestClient("https://connect-zoom.eventnx.com/api/bigmarker/register"); client.Timeout = -1; var request = new RestRequest(Method.PUT); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", jsonbody, ParameterType.RequestBody); IRestResponse <BigMarkerResponse> response = client.Execute <BigMarkerResponse>(request); var bigmarkeresponse = response.Data; if (bigmarkeresponse.Token != null) { EventService.UpdateBigMarkerTokenEvent(bigmarkeresponse.Token); } } } catch (Exception ex) { } } return(Json(new { success = true, message = "saved Data successfully" })); } catch (Exception ex) { return(Json(new { success = false, message = "Could not saved Data" + ex.ToString() })); } }