public void ForceTests() { GroupM <A> .Init(); GroupM <B> .Init(); GroupM <C> .Init(); Manger.Init(); Manger.Create <A>(0); Manger.Create <B>(1); Manger.Create <C>(2); DateTime d1 = DateTime.Now; //Group<C> t; Group <A> ta; for (int i = 0; i < 10000000; i++) { //t = GroupM<C>.group;//18 //t = Manger.GetGroup<C>(2);//48 ta = GroupM <A> .group;//18 //ta = Manger.GetGroup<A>(0);//70 } DateTime d2 = DateTime.Now; Console.WriteLine((d2 - d1).TotalMilliseconds); }
public Pion(Organisation org, String nom, ZonePion zone) : base(org, nom) { comportementManger = null; avancer = new Avancer(); this.position = zone; statusCourant = new PionNonDouble(); }
public void Should_Store_The_Order() { var orderStore = new ReportingStore(); var manger = new Manger(orderStore); manger.Handle(SampleOrders.CreateSampleOrder()); Assert.That(orderStore.StoredOrders.Count, Is.EqualTo(1)); }
public void CreateManger(Manger manager) { //var authId = Environment.GetEnvironmentVariable("c2533b80-5870-dd44-851d-5adb8418534b"); //var authToken = Environment.GetEnvironmentVariable("nthnatiZtCYV3uwOlyTd"); //var client = new ClientBuilder(authId, authToken).Build(); //var lookup = new Lookup //{ // Street= manager.Address1, // City = manager.City, // State = manager.State, //}; //try //{ // client.Send(lookup); //} //catch (SmartyException ex) //{ // var Excepion = ex.Message; // var stack = (ex.StackTrace); //} //var candidates = lookup.Result; //if (candidates.Count == 0) //{ // var result = "No candidates. This means the address is not valid."; //} //else //{ //var firstCandidate = candidates[0]; //var succeed = "Address is valid. (There is at least one candidate)"; //var zip = ("ZIP Code: " + firstCandidate.Components.ZipCode); //var country = ("County: " + firstCandidate.Metadata.CountyName); //var lati = ("Latitude: " + firstCandidate.Metadata.Latitude); //var longit = ("Longitude: " + firstCandidate.Metadata.Longitude); managerrepository.Add(manager); //} }
public List <Dictionary <string, object> > GetLighthouseItems(ApiCall apiCall) { var result = new List <Dictionary <string, object> >(); var lighthouseItems = Manger.List(); foreach (var lighthouseItem in lighthouseItems) { var lighthouseItemDic = new Dictionary <string, object>() { { nameof(lighthouseItem.Name), lighthouseItem.Name }, { nameof(lighthouseItem.Description), lighthouseItem.Description }, }; var type = lighthouseItem.GetType(); var settingType = Lib.Reflection.TypeHelper.GetGenericType(type); if (settingType != null) { var settingDic = new List <Dictionary <string, object> >(); var instance = Activator.CreateInstance(settingType); var properties = settingType.GetProperties(); foreach (var item in properties) { var description = item.CustomAttributes.FirstOrDefault(f => f.AttributeType == typeof(DescriptionAttribute))?.ConstructorArguments.FirstOrDefault(); var controlType = item.PropertyType == typeof(bool) ? "Switch" : _numberType.Contains(item.PropertyType) ? "Number" : "Text"; settingDic.Add(new Dictionary <string, object> { { "Name", item.Name }, { "DisplayName", description?.Value ?? item.Name }, { "Value", item.GetValue(instance) }, { "ControlType", controlType }, }); } lighthouseItemDic.Add("Setting", settingDic); } else { lighthouseItemDic.Add("Setting", null); } result.Add(lighthouseItemDic); } return(result); }
private void elButton9_Click(object sender, EventArgs e) { FolderBrowserDialog fbd = new FolderBrowserDialog(); DialogResult result = fbd.ShowDialog(); if (result == DialogResult.OK) { Manger manger = new Manger(); //Fper.AlowFolPer(fbd.SelectedPath.ToString(), true); // Fper.AlowFilePer(fbd.SelectedPath.ToString() + @"\perMange.bac"); manger.Path = fbd.SelectedPath.ToString() + @"\perMangoe.bac"; manger.backUp(); // MessageBox.Show(fbd.SelectedPath.ToString() + @"\perMange.bac"); } }
public ActionResult Login() { ShopDal sdal = new ShopDal(); Manger M = new Manger(); List <Manger> objProduct = sdal.lgoinDb.ToList <Manger>(); // Take the values from the TextBox that the user/Manger Enter. M.Username = Request.Form["user.Username"].ToString(); M.Password = Request.Form["user.Password"].ToString(); // check if the username and the password are in the DB. foreach (Manger ob in objProduct) { // if they are in the Db go to MangerPanel if (M.Username == ob.Username && M.Password == ob.Password) { return(View("MangerPanel")); } } // Otherwise return to the Home Web. return(RedirectToAction("HomeWeb", "Home")); }
void Start() { obj = GetComponent <AudioSource>(); m = GameObject.Find("Main Camera").GetComponent <Manger>(); }
private void Awake() { instance = this; }
public static void add(Manger administrador) { administradores.Add(administrador); }
public void DeleteManger(Manger manager) { managerrepository.Delete(manager); }
public Pion(Organisation org, String nom) : base(org, nom) { comportementManger = null; statusCourant = new PionNonDouble(); }