async void _promotionApplied(object sender, System.EventArgs e) { var answer = await DisplayAlert("Guanajoven", "Al aplicar esta promoción quedará registrado en la base de datos que has sido beneficiado por la empresa, ¿Estas seguro de Aplicar esta promoción?", "Sí", "No"); if (!answer) { } else { var user = PropertiesManager.GetUserInfo(); if (user != null) { CheckConnection(); ShowProgress("Validando"); var response = await ClientGuanajoven.setPromotion(id_promocion, user.data.codigo_guanajoven.token); if (ValidateResponse(response, checkError(response))) { ShowProgress(IProgressType.LogedIn); _qrImage.IsVisible = true; await Task.Delay(600); await DisplayAlert("Guanajoven", "Promoción aplicada", "Aceptar"); } HideProgress(); } } }
public void Destroy() { um = null; pm = null; log = null; CoreTimer.Stop(); }
static PageTypeGroup() { var user = PropertiesManager.GetUserInfo(); int fechainicio = Int32.Parse(DateTime.Parse(user.data.datos_usuario.fecha_nacimiento).ToString("yyyy")); DateTime date = DateTime.Today; int fechaactual = Int32.Parse(DateTime.Parse(date.ToString()).ToString("yyyy")); int edad = fechaactual - fechainicio; List <PageTypeGroup> Groups = new List <PageTypeGroup> { new PageTypeGroup("Inicio", "Inicio") { new ItemDrawer("Home", DrawerPage.HomeView, "home.png"), new ItemDrawer("Modificar perfil", DrawerPage.ProfileView, "profile.png"), new ItemDrawer("ID ADMIC", DrawerPage.CodigoView, "code.png"), new ItemDrawer("Cerrar sesión", DrawerPage.Cerrar, "turn-on.png") }, new PageTypeGroup("Actividades", "Actividades") { new ItemDrawer("Eventos", DrawerPage.EventosView, "event.png"), new ItemDrawer("Convocatorias", DrawerPage.ConvocatoriasView, "convocatorias.png"), new ItemDrawer("Promociones", DrawerPage.PromotionView, "promotion.png"), new ItemDrawer("Notificaciones", DrawerPage.NotificacionesView, "notificacion.png"), new ItemDrawer("Redes sociales", DrawerPage.RedesSocialesView, "socialmedia.png"), new ItemDrawer("Chat", DrawerPage.ChatView, "chat.png") }, new PageTypeGroup("General", "General") { new ItemDrawer("Sucursales", DrawerPage.RegionesView, "skyline.png"), new ItemDrawer("Acerca de ", DrawerPage.AcercaView, "info.png") } }; All = Groups; //set the publicly accessible list }
/// <summary> /// Initializes a new instance of the <see cref="MDModel" /> class. /// </summary> /// <param name="commandManager">The injected command manager.</param> /// <param name="menuService">The menu service.</param> public PropertiesToolModel()//ICommandManager commandManager, IMenuService menuService) { var commandManager = VEFModule.UnityContainer.Resolve(typeof(ICommandManager), "") as ICommandManager; var menuService = VEFModule.UnityContainer.Resolve(typeof(IMenuService), "") as IMenuService; PropertiesManager propMgr = (PropertiesManager)VEFModule.UnityContainer.Resolve(typeof(IPropertiesService), ""); propMgr.PropertiesToolModel = this; }
public void GetPropertyValueTest() { IDTSCustomPropertyCollection100 customPropertyCollection = new CustomPropertyCollectionTestImpl(); IDTSCustomProperty100 property = customPropertyCollection.New(); property.Name = "Name"; property.Value = 77; Assert.AreEqual <int>(77, (int)PropertiesManager.GetPropertyValue(customPropertyCollection, "Name")); }
public void ValidatePropertiesTest() { PropertiesManager target = new PropertiesManager(); IDTSCustomPropertyCollection100 customPropertyCollection = new CustomPropertyCollectionTestImpl(); PropertiesManager.AddComponentProperties(customPropertyCollection); Assert.AreEqual <DTSValidationStatus>(DTSValidationStatus.VS_ISVALID, target.ValidateProperties(customPropertyCollection, DTSValidationStatus.VS_ISVALID)); }
public void AddCustomPropertyTest1() { IDTSCustomPropertyCollection100 customPropertyCollection = new CustomPropertyCollectionTestImpl(); PropertiesManager_Accessor.AddCustomProperty(customPropertyCollection, "Name", "Description", "Value"); Assert.AreEqual <string>("Value", (string)PropertiesManager.GetPropertyValue(customPropertyCollection, "Name")); Assert.AreEqual(null, PropertiesManager.GetPropertyValue(customPropertyCollection, "Unexpected")); }
public App() { CurrentApp = this; InitializeComponent(); //MainPage = new ChatPage(null); //return; RealmConfiguration realmConfiguration = RealmConfiguration.DefaultConfiguration; try { RealmInstance = Realm.GetInstance(); } catch (RealmMigrationNeededException e) { try { Realm.DeleteRealm(realmConfiguration); //Realm file has been deleted. RealmInstance = Realm.GetInstance(realmConfiguration); } catch (Exception ex) { throw ex; } } var eventos = App.CurrentApp.RealmInstance.All <Notificacion>().ToList(); //MainPage = new NavigationPage(new GuanajovenCodePage()); // return; if (PropertiesManager.IsFirstTime()) { MainPage = new NavigationPage(new WelcomePage()); } else { if (PropertiesManager.IsLogedIn()) { // MainPage = new HomePage(); MainPage = new NavigationPage(new HomeDrawerPage()); } else { MainPage = new NavigationPage(new RootPage()); //MainPage = new NavigationPage(new HomeDrawerPage()); // MainPage = new NavigationPage(new PickIdiomas()); } } InitPushNotifications(); }
public void ValidatePropertyValueTest9() { PropertiesManager target = new PropertiesManager(); target.PostErrorEvent += delegate(string message) { Assert.AreEqual <string>(MessageStrings.RowDelimiterEmpty, message); }; Assert.AreEqual <DTSValidationStatus>(DTSValidationStatus.VS_ISBROKEN, target.ValidatePropertyValue(PropertiesManager.RowDelimiterPropName, string.Empty, DTSValidationStatus.VS_ISVALID)); }
private static void Load() { plyEdUtil.CheckPath(BloxEdGlobal.ResourcesRoot); PropertiesManagerEd._propertiesManager = plyEdUtil.LoadOrCreateAsset <PropertiesManager>(BloxEdGlobal.ResourcesRoot + "PropertiesManager.asset", true); PropertiesManagerEd._managedPropertyLabels = new GUIContent[PropertiesManagerEd._propertiesManager.properties.Count]; for (int i = 0; i < PropertiesManagerEd._propertiesManager.properties.Count; i++) { PropertiesManagerEd._managedPropertyLabels[i] = new GUIContent(PropertiesManagerEd._propertiesManager.properties[i].propertyName); } }
public static PropertyElement createElement(PropertiesManager managerT) { manager = managerT; element = new PropertyElement(manager); setDialog("新建属性单元"); dialog.comboBox_Value.SelectedIndex = 0; dialog.setPropsList(); dialog.ShowDialog(); return(element); }
public OptionWindow(PropertiesManager config) { InitializeComponent(); this.MinimumSize = new System.Drawing.Size(432, 171); LanguageLabel.Hide(); //for now LanguageCB.Hide(); Config = config; LanguageCB.Items.Add("Français"); LanguageCB.SelectedIndex = 0; //Convert.ToInt32(Config.get("LANGUAGE")); SaveDirectoryTB.Text = Config.get("FILE_PATH"); }
void Start() { // Get component to properties data manager pm = GetComponent <PropertiesManager> (); // Set skill values from prefab pm.SetValues(currentSkill.GetComponent <SkillsProperties>()); // Setting time reference time = Time.time; }
void SetPropertiesManager() { propertiesManager = transform.GetComponentsInChildren <PropertiesManager>(); for (int i = 0; i < propertiesManager.Length; i++) { propertiesManager[i].gameObject.SetActive(false); } currentPropertyManager = propertiesManager[index]; currentPropertyManager.OnSelected(); //currentPropertyManager.gameObject.SetActive(true); }
private static MethodsAggregator CreateLibrary() { var methodManager = new MethodsManager(); var propertiesManager = new PropertiesManager(); var lib = new TestLibrary(); propertiesManager.RegisterProperties(lib); methodManager.RegisterLibraries(lib); return(new MethodsAggregator(methodManager, propertiesManager)); }
public void SwitchObjectsLeft() { currentPropertyManager.gameObject.SetActive(false); currentObjectIndex--; if (currentObjectIndex < 0) { currentObjectIndex = propertiesManager.Length - 1; } currentPropertyManager = propertiesManager[currentObjectIndex]; // currentPropertyManager.gameObject.SetActive(true); currentPropertyManager.OnSelected(); index = 0; }
/*public void test() * { * _promotions = new List<Promotion>(); * Promotion user = new Promotion(); * user.evento_estado = "Abierto"; * user.titulo = "Oxxo"; * user.descripcion = "oferta red bull"; * user.fecha = "25/09/1992"; * user.fecha_fin = "26/09/1992"; * user.fecha_inicio = "27/09/1992"; * Promotion user2 = new Promotion(); * user2.evento_estado = "Cerrado"; * user2.titulo = "7eleven"; * user2.descripcion = "Monster"; * user2.fecha = "27/10/2007"; * user2.fecha_fin = "26/09/1992"; * user2.fecha_inicio = "27/09/1992"; * _promotions.Add(user); * _promotions.Add(user2); * ListView.ItemsSource = _promotions; * }*/ async void getPromotions() { if (PropertiesManager.IsDatePromotionTrue()) { PropertiesManager.SavePromotionDate(dateToSend); } else { dateToSend = PropertiesManager.GetDataPromotion(); } if (PropertiesManager.IsFirstDatePromotionTrue()) { PropertiesManager.SaveFirstPromotionDate(1); } else { PropertiesManager.SaveFirstPromotionDate(PropertiesManager.GetFirstDataPromotion() + 1); } CheckConnection(); ShowProgress("Validando"); String times = ""; if (PropertiesManager.GetFirstDataPromotion() > 1) { times = dateToSend.ToString("yyyy-MM-dd HH:MM:ss"); } else { times = "0000-00-00 00:00:00"; } //var times = dateToSend.ToString("yyyy-MM-dd HH:MM:ss"); _empresas = await ClientGuanajoven.getPromotions(times); var empresas = App.CurrentApp.RealmInstance.All <Empresa>().ToList(); if (_empresas != null && _empresas.Count > 0) { MergeLists(_empresas); } empresas = App.CurrentApp.RealmInstance.All <Empresa>().ToList().OrderBy(x => x.prioridad).ToList(); if (empresas != null) { dateToSend = time; PropertiesManager.SavePromotionDate(dateToSend); _empresas = empresas.ToList(); _flowListView.FlowItemsSource = _empresas; } HideProgress(); }
async void AdvertisingUpdate() { if (PropertiesManager.IsDateAdvertisingTrue()) { PropertiesManager.SaveAdvertisingDate(dateToSend); } else { dateToSend = PropertiesManager.GetDataAdvertising(); } if (PropertiesManager.IsDateFirstAdvertisingTrue()) { PropertiesManager.SaveFirstAdvertisingDate(1); } else { PropertiesManager.SaveFirstAdvertisingDate(PropertiesManager.GetFirstDataAdvertising() + 1); } CheckConnection(); //ShowProgress("Validando"); String times = ""; if (PropertiesManager.GetFirstDataAdvertising() > 1) { times = dateToSend.ToString("yyyy-MM-dd HH:MM:ss"); } else { times = "0000-00-00 00:00:00"; } //var times = dateToSend.ToString("yyyy-MM-dd HH:MM:ss"); _advertising = await ClientGuanajoven.getAdvertising(times); var publicidad = App.CurrentApp.RealmInstance.All <Publicidad>().ToList(); if (_advertising != null && _advertising.Count > 0) { MergeLists(_advertising); } publicidad = App.CurrentApp.RealmInstance.All <Publicidad>().ToList(); if (publicidad != null) { dateToSend = time; PropertiesManager.SaveEventDate(dateToSend); publicidad = publicidad.OrderByDescending(x => x.fecha_inicio).ToList(); } //HideProgress(); }
private void PutOne(PropertiesManager manager) { string[] props1 = null; manager.Put(ref props1, "one", "one-1"); manager.Get(props1, "one").Is("one-1"); string[] props2 = null; manager.Put(ref props2, "one", "one-2"); manager.Get(props1, "one").Is("one-1"); manager.Get(props2, "one").Is("one-2"); manager.Properties.Select(info => info.Key).Is(new[] { "one" }); props1[0].Is("one-1"); props2[0].Is("one-2"); }
async void information(object sender, System.EventArgs e) { CheckConnection(); ShowProgress("Validando"); var user = PropertiesManager.GetUserInfo(); //var response = await ClientGuanajoven.sendEmail(user.data.datos_usuario.id_usuario + "", id_convocatoria); var response = await ClientGuanajoven.sendEmail(user.data.api_token + "", id_convocatoria); if (ValidateResponseRegister(response)) { await Task.Delay(600); await DisplayAlert("ADMIC", "Gracias por interesarte en la convocatoria, en breve te llegará un correo electrónico con más información", "Aceptar"); } HideProgress(); }
//设置单元 public static bool configElement(PropertyElement elementT) { if (elementT == null) { Console.WriteLine("error in configElement"); return(false); } manager = (PropertiesManager)elementT.parent; element = elementT; setDialog("设置属性单元"); dialog.textBox_name.Text = element.name; dialog.comboBox_Value.SelectedIndex = element.ValueType == Consts.PARAM_INT ? 0 : element.ValueType == Consts.PARAM_STR ? 1 : element.ValueType == Consts.PARAM_PROP ? 2 : 3; dialog.setPropsList(); dialog.ShowDialog(); return(needRefreshUI); }
private void Overwriting(PropertiesManager manager) { string[] props = null; manager.Put(ref props, "one", "one-A"); manager.Put(ref props, "two", "two-A"); manager.Get(props, "one").Is("one-A"); manager.Get(props, "two").Is("two-A"); manager.Put(ref props, "one", "one-B"); manager.Get(props, "one").Is("one-B"); manager.Get(props, "two").Is("two-A"); manager.Put(ref props, "two", "two-B"); manager.Get(props, "one").Is("one-B"); manager.Get(props, "two").Is("two-B"); }
private void VisibleAfter(PropertiesManager manager) { string[] props = null; manager.Put(ref props, "one", "one-1"); manager.Put(ref props, "two", "two-1"); manager.Put(ref props, "three", "three-1"); manager.Properties.Where(info => info.Visible).Select(info => info.Key).Is(Enumerable.Empty <string>()); manager.MarkVisible("two"); manager.Properties.Where(info => info.Visible).Select(info => info.Key).Is(new[] { "two" }); manager.MarkVisible("one"); manager.Properties.Where(info => info.Visible).Select(info => info.Key).Is(new[] { "one", "two" }); manager.MarkVisible("ten"); manager.Properties.Where(info => info.Visible).Select(info => info.Key).Is(new[] { "one", "two" }); }
public void AddComponentPropertiesTest() { IDTSCustomPropertyCollection100 customPropertyCollection = new CustomPropertyCollectionTestImpl(); PropertiesManager.AddComponentProperties(customPropertyCollection); Assert.AreEqual <string>(",", (string)PropertiesManager.GetPropertyValue(customPropertyCollection, PropertiesManager.ColumnDelimiterPropName)); Assert.AreEqual <string>("\r\n", (string)PropertiesManager.GetPropertyValue(customPropertyCollection, PropertiesManager.RowDelimiterPropName)); Assert.AreEqual <string>(string.Empty, (string)PropertiesManager.GetPropertyValue(customPropertyCollection, PropertiesManager.TextQualifierPropName)); Assert.AreEqual <string>("\r\n", (string)PropertiesManager.GetPropertyValue(customPropertyCollection, PropertiesManager.HeaderRowDelimiterPropName)); Assert.AreEqual <bool>(true, (bool)PropertiesManager.GetPropertyValue(customPropertyCollection, PropertiesManager.IsUnicodePropName)); Assert.AreEqual <bool>(true, (bool)PropertiesManager.GetPropertyValue(customPropertyCollection, PropertiesManager.TreatEmptyStringsAsNullPropName)); Assert.AreEqual <bool>(false, (bool)PropertiesManager.GetPropertyValue(customPropertyCollection, PropertiesManager.ColumnNamesInFirstRowPropName)); Assert.AreEqual <int>(1252, (int)PropertiesManager.GetPropertyValue(customPropertyCollection, PropertiesManager.CodePagePropName)); Assert.AreEqual <int>(0, (int)PropertiesManager.GetPropertyValue(customPropertyCollection, PropertiesManager.DataRowsToSkipPropName)); Assert.AreEqual <int>(0, (int)PropertiesManager.GetPropertyValue(customPropertyCollection, PropertiesManager.HeaderRowsToSkipPropName)); }
async void GetChatMessages(object obj = null, EventArgs args = null) { _listView.IsRefreshing = true; var user = PropertiesManager.GetUserInfo(); var me = new Mensaje(); me.api_token = user.data.api_token; me.page = page + ""; var mensajes = await ClientGuanajoven.MensajeChat(me); _listView.IsRefreshing = false; if (mensajes != null && mensajes.Count > 0) { mensajes.Reverse(); int n = 0; foreach (var mensaje in mensajes) { _items.Insert(n, mensaje); if (page != 1) { await System.Threading.Tasks.Task.Delay(100); } n++; } page++; if (page == 2) { await System.Threading.Tasks.Task.Delay(300); ScrollToLast(); } } if (obj != null) { ScrollToLast(true); } }
public DetailPromotionPage(ADMIC.Data.Models.Promotion promotion, string imagen) { InitializeComponent(); Title = promotion.titulo; _image.Source = imagen; _title.Text = promotion.titulo; _descripcion.Text = promotion.descripcion; _bases.Text = promotion.bases; _codigo_promocion.Text = promotion.codigo_promocion; url = promotion.url_promocion; id_promocion = promotion.id_promocion + ""; _fechainicio.Text = DateTime.Parse(promotion.fecha_inicio).ToString("dd/MM/yyyy"); _fechafin.Text = DateTime.Parse(promotion.fecha_fin).ToString("dd/MM/yyyy"); var user = PropertiesManager.GetUserInfo(); var stream = DependencyService.Get <IBarcodeService>().ConvertImageStream(user.data.codigo_guanajoven.token); _qrImage.Source = ImageSource.FromStream(() => { return(stream); }); }
private void InitializeInternalComponents() { DomainList = new BindingList <Domain>(); AccountList = new BindingList <string>(); //DATABINDING DomainListbox.DataSource = DomainList; AccountListbox.DataSource = AccountList; //PROPERTIES HANDLING Config = new PropertiesManager("properties.dat"); //MISCELLANOUS this.MinimumSize = new System.Drawing.Size(990, 761); separator_line.Height = 2; statusLabel.Text = ""; DisableDomainButtons(); DisableAccountButtons(); AddAccountButton.Enabled = false; UnsavedModifications = false; }
async void getProfile() { ShowProgress("Validando"); TokenPOJO token = new TokenPOJO(); var localuser = PropertiesManager.GetUserInfo(); token.api_token = localuser.data.api_token; CheckConnection(); var response = await ClientGuanajoven.getProfile(token.api_token); if (ValidateResponse(response)) { var dataProfile = JsonConvert.DeserializeObject <DataUserResponse>(response); SetInfo(dataProfile); await Task.Delay(600); } HideProgress(); }
private void Awake() { _songManager = GetComponent <SongManager>(); _audioManager = GetComponent <AudioManager>(); _propertiesManager = GetComponent <PropertiesManager>(); _videoManager = GetComponent <VideoManager>(); _timeGridManager = GetComponent <TimeGridManager>(); _objectsLibraryManager = GetComponent <ObjectsLibraryManager>(); _dragSelectionHandler = GetComponent <DragSelectionHandler>(); _wave = WaveWalls.Find("Wave").GetComponent <RectTransform>(); _songWalls = WaveWalls.Find("Song Walls").GetComponent <RectTransform>(); _timeGrid = WaveWalls.Find("TimeGrid").GetComponent <RectTransform>(); _cursor = WaveWalls.Find("Song Walls/Cursor Song").GetComponent <RectTransform>(); _renderSong = _wave.Find("RenderSong").GetComponent <RenderSong>(); _mainCanvas = GetComponent <Canvas>(); _wallObjects = new List <WallObject>(); _selectedWallObjects = new List <WallObject>(); }
public GuanajovenCodePage(HomeDrawerPage _rootPage) { InitializeComponent(); RootPage = _rootPage; var user = PropertiesManager.GetUserInfo(); _background.Source = user.data.datos_usuario.ruta_imagen; _name.Text = user.data.datos_usuario.nombre + " " + user.data.datos_usuario.apellido_paterno + " " + user.data.datos_usuario.apellido_materno; _email.Text = user.data.email; _numero.Text = user.data.codigo_guanajoven.id_usuario + ""; var stream = DependencyService.Get <IBarcodeService>().ConvertImageStream(user.data.codigo_guanajoven.token); _qrImage.Source = ImageSource.FromStream(() => { return(stream); }); _curpcode.Text = user.data.datos_usuario.curp; _genre.Text = user.data.datos_usuario.genero.nombre; //_municipio.Text = user.data.datos_usuario.municipio.nombre; DateTime myDate = DateTime.Parse(user.data.datos_usuario.fecha_nacimiento); _fechanacimiento.Text = myDate.ToString("dd/MM/yyyy"); _estadonacimiento.Text = user.data.datos_usuario.estado_nacimiento.nombre; Background.BackgroundColor = Color.FromHex("#b7C7E1F5"); NavigationPage.SetHasNavigationBar(this, false); }
async void DownloadClicked(object sender, EventArgs args) { //PERMITE GUARDAR UNA VISTA DE LA IMAGEN SE CAMBIA POR ENVÍO DE CORREO /*var stream = await DependencyService.Get<IScreenshotManager>().CaptureAsync(); * //var stream1 = new MemoryStream(stream); * //imageTest.Source = ImageSource.FromStream(() => stream1); * //uses the IPicture interface to use the appropriate saving mechanism from the picture class in each individual project * DependencyService.Get<IPicture>().SavePictureToDisk("Guanajoven", stream); * //generic success message * await DisplayAlert("Guanajoven", "La imagen ha sido guardada", "Aceptar");*/ CheckConnection(); ShowProgress("Validando"); var user = PropertiesManager.GetUserInfo(); var response = await ClientGuanajoven.sendEmailID(user.data.api_token + ""); if (response) { await Task.Delay(600); await DisplayAlert("ADMIC", "Se te ha enviado un correo electrónico con tu credencial, gracias por hacer de Guanajuato tu proyecto de vida", "Aceptar"); } HideProgress(); }
/// <summary> /// test Initialize ---basic function only /// 把每个组件都初始化 /// </summary> void Initialize() { um = new UpdateManager(); um.Initialize(); pm = new PropertiesManager(); pm.AddPropertyManager<Material>(); pm.AddPropertyManager<State>(); Material bbb = new Material("ssss",1.2f); ///((PropertyManager<Material>)Material.propertyManager).addProperty(bbb); State ccc = new State(); ((PropertyManager<State>)State.propertyManager).addProperty(ccc); log = new Log(); CoreTimer.Start(); }