/// <summary> /// 分类信息管理 /// </summary> /// <returns></returns> public ContentResult ClassInfoManage() { string type = Request["_type"]; switch (type) { case "1": TClass tclass = new TClass(); tclass.Class_Name = Request["_name"]; tclass.Class_Code = Request["_code"]; tclass.Class_Order = StringToInt(Request["_order"]); tclass.DDList_ID =StringToInt(Request["_ddlist"]); _db.tclass.Add(tclass); _db.SaveChanges(); result = "1"; break; case "2": break; case "3": int sel_id = StringToInt(Request["_selectid"]); var selclass = _db.tclass.Find(sel_id); _db.tclass.Remove(selclass); _db.SaveChanges(); break; } return Content(result); }
public TClass Create <TClass>() where TClass : class, TBaseClassOrInterface, new() { System.Type type = typeof(TClass); TClass instance = null; List <TBaseClassOrInterface> pool = null; if (!m_pools.TryGetValue(type, out pool)) { instance = new TClass(); } else { int cache_count = pool.Count; if (cache_count > 0) { instance = (TClass)pool[cache_count - 1]; pool.RemoveAt(cache_count - 1); } else { instance = new TClass(); } } return(instance); }
public static void GenericMethodTest3() { var tclass = new TClass(); var a = new AClass() { MSG = "AClass" }; Console.WriteLine("Simple Type"); tclass.Test(a, param => { Console.WriteLine($"param: {LitJson.JsonMapper.ToJson(param)}"); }); var ga = new GenericClass <AClass>() { t = a }; Console.WriteLine("Complex Type"); tclass.Test(ga, param => { Console.WriteLine($"param: {LitJson.JsonMapper.ToJson(param)}"); }); }
public static TClass CreateContext <TClass>() where TClass : new() { try { dynamic context = new TClass(); var company = HttpContext.Current.Request.QueryString.Get("company"); if (!String.IsNullOrEmpty(company)) { context.Company = company; } if (ServiceConfig.GetAuthenticationMode() == ServiceConfig.AuthenticationMode.ThirdPartyProvider) { context.LogonAsUser = String.Format("{0}\\{1}", HttpContext.Current.User.Identity.AuthenticationType, HttpContext.Current.User.Identity.Name); } return(context); } catch (Exception e) { throw e; } }
public static List <String> getJGKZsForClass(List <TSchueler> students) { DateTime StichTag = DateTime.Parse("01.08." + DateTime.Now.Year.ToString()); DateTime ADatum = DateTime.Now; List <string> returnList = new List <string>(); foreach (TSchueler student in students) { TClass studentClass = new TClass(student.Klasse); int timeOnGym = studentClass.getClass() - 6; int beginnYear = 0; if (ADatum > StichTag) { beginnYear = StichTag.Year - timeOnGym + 1; } else { beginnYear = StichTag.Year - timeOnGym; } returnList.Add("JG" + beginnYear.ToString().Substring(2) + studentClass.GetKZ()); } return(returnList); }
public override void BuffOnEnter(GameObject obj) { TClass = obj.GetComponent <Status>(); CalculationBuffNum(); TClass.AddAttackCarryingBuff(TakeBuff); Over = false; }
public static bool isBiggerClass(string value1, string value2) { TClass class1 = new TClass(value1); TClass class2 = new TClass(value2); if (class1.IsSek2() == true && class2.IsSek2() == false) { return(true); } else if (class1.IsSek2() == false && class2.IsSek2() == true) { return(false); } if (class1.getClass() > class2.getClass()) { return(true); } else if (class2.getClass() > class1.getClass()) { return(false); } if (findIndex(Statics.courses, class1.GetKZ()) > findIndex(Statics.courses, class2.GetKZ())) { return(true); } else { return(false); } }
/// <summary> /// 获取类型实例 /// </summary> /// <typeparam name="TClass">资源类型</typeparam> /// <returns>类型实例</returns> public static TClass Resolve <TClass>() where TClass : class { TClass resource = default(TClass); bool existing = TryGet <TClass>(out resource); if (!existing) { ConstructorInfo constructor = null; lock (_operationLock) { if (!_mapping.ContainsKey(typeof(TClass))) { throw new ResourceNotResolvedException( string.Format(CultureInfo.InvariantCulture, "Cannot find the target type : {0}", typeof(TClass).FullName)); } Type concrete = _mapping[typeof(TClass)]; constructor = concrete.GetConstructor(BindingFlags.Instance | BindingFlags.Public, null, new Type[0], null); if (constructor == null) { throw new ResourceNotResolvedException( string.Format(CultureInfo.InvariantCulture, "Public constructor is missing for type : {0}", typeof(TClass).FullName)); } } Add <TClass>((TClass)constructor.Invoke(null)); } return(Get <TClass>()); }
public MemObjRegionalCollection CollectionByCellAddress(long aCellAddress, TClass aClass, out int aCollectionIndex) { aCollectionIndex = -1; int itemIndex = -1; MemOpBase item = null; return(CollectionByCellAddress(aCellAddress, aClass, out item, out aCollectionIndex, out itemIndex)); }
public TClass Bind <TClass>() where TClass : class, new() { var currentObject = new TClass(); bindedObjects.Add(currentObject); return(currentObject); }
public override void BuffOnEnter(GameObject obj) { TClass = obj.GetComponent <Status>(); takeBuff = new Burning(LV, true); Over = false; CalculationBuffNum(); TClass.AddAttackCarryingBuff(takeBuff); Debug.Log(TClass.AttackCarryingBuffs.Count); }
public override void BuffOnEnter(GameObject obj) { Over = false; TClass = obj.GetComponent <Status>(); liveTime = 10; TakeBuff = BuffFactory.GetBuff(2, 1); TClass.AddAttackCarryingBuff(TakeBuff); Over = false; }
public static List <String> getJGKZsForStudents(List <TSchueler> students) { List <String> KZList = new List <string>(); foreach (TSchueler student in students) { KZList.Add("JG" + student.AufnahmeJahrgang.ToString().Substring(2) + TClass.getKZFromStr(student.Klasse)); } return(KZList); }
public static void GenericMethodTest4() { var tclass = new TClass(); tclass.Test <OneCallbackData>(param => { //Console.WriteLine($"输出: {LitJson.JsonMapper.ToJson(param)}"); }); tclass.Test <AnotherCallbackData>(param => { //Console.WriteLine($"输出: {LitJson.JsonMapper.ToJson(param)}"); }); }
/// <summary> /// Creates service clients based on the Generic type TClass /// </summary> /// <typeparam name="TClass">The generic representation to the class</typeparam> /// <returns>The service class based on the generic type</returns> public static TClass CreateClient <TClass>() where TClass : new() { try { dynamic client = new TClass(); client.ClientCredentials.Windows.ClientCredential = ServiceConfig.NetworkCredential(); return(client); } catch (Exception e) { throw e; } }
public static void RegisterMethodDelegate <T1, T2>(AppDomain appdomain) { #if UNITY_EDITOR var a = new TClass(typeof(T1), typeof(T2)); if (m_2.Contains(a)) { Debug.LogError($"重复注册:RegisterMethodDelegate<{a}>"); } else { m_2.Add(a); } #endif appdomain.DelegateManager.RegisterMethodDelegate <T1, T2>(); }
public static void RegisterFunctionDelegate <T1, T2, T3, T4, TResult>(AppDomain appdomain) { #if UNITY_EDITOR var a = new TClass(typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(TResult)); if (f_4.Contains(a)) { Debug.LogError($"重复注册:RegisterFunctionDelegate<{a}>"); } else { f_4.Add(a); } #endif appdomain.DelegateManager.RegisterFunctionDelegate <T1, T2, T3, T4, TResult>(); }
public override BTStatus Tick() { bool addover = TClass.AddFood(); if (addover) { return(BTStatus.Success); } else if (TClass.target != null && !addover) { return(BTStatus.Running); } else { return(BTStatus.Fail); } throw new System.Exception("no node, but try get it"); }
public override BTStatus Tick() { bool enterTarget = TClass.Move(TClass.target); if (enterTarget) { return(BTStatus.Success); } else if (TClass.target != null && !enterTarget) { return(BTStatus.Running); } else { return(BTStatus.Fail); } throw new System.Exception("no node, but try get it"); }
public static TClass CreateContext <TClass>() where TClass : new() { try { dynamic context = new TClass(); var company = HttpContext.Current.Request.QueryString.Get("company"); if (!String.IsNullOrEmpty(company)) { context.Company = company; } if (ServiceConfig.GetAuthenticationMode() == ServiceConfig.AuthenticationMode.ThirdPartyProvider) { context.LogonAsUser = String.Format("{0}\\{1}", HttpContext.Current.User.Identity.AuthenticationType, HttpContext.Current.User.Identity.Name); } else if (ServiceConfig.GetAuthenticationMode() == ServiceConfig.AuthenticationMode.Impersonate) { string domain = HttpContext.Current.User.Identity.AuthenticationType; string username = ""; ClaimsPrincipal claimsPrincipal = HttpContext.Current.User as ClaimsPrincipal; string email = claimsPrincipal.FindFirst(ClaimTypes.Upn) != null?claimsPrincipal.FindFirst(ClaimTypes.Upn).Value : claimsPrincipal.FindFirst(ClaimTypes.Email).Value; //aad is Azure Active Directory - if aad is used then use the internal network domain name from the app settings //Other possible values are Google, Facebook, Twitter - for those we will pass direct to AX as a claims user if (String.Equals(domain, "aad")) { domain = ConfigurationManager.AppSettings["API_AUTH_USER_DOMAIN"]; MailAddress addr = new MailAddress(email); //takes [email protected] username = addr.User; //returns username } context.LogonAsUser = String.Format("{0}\\{1}", domain, username); } return(context); } catch (Exception e) { throw e; } }
/// <summary> /// Creates an interface from steamclient. /// </summary> /// <typeparam name="TClass">The interface type. ex: ISteamClient009</typeparam> /// <param name="version">The interface version.</param> /// <returns>An instance of an interface object, or null if an error occurred.</returns> public static TClass CreateInterface <TClass>() where TClass : InteropHelp.INativeWrapper, new() { if (CallCreateInterface == null) { throw new InvalidOperationException("Steam4NET library has not been initialized."); } IntPtr address = CallCreateInterface(InterfaceVersions.GetInterfaceIdentifier(typeof(TClass)), IntPtr.Zero); if (address == IntPtr.Zero) { return(default(TClass)); } var rez = new TClass(); rez.SetupFunctions(address); return(rez); }
public TClass Resolve <TClass>() { if (!_factories.ContainsKey(typeof(TClass))) { return(_container.Resolve <TClass>()); } IInjectionFactory <TClass> factory = _factories[typeof(TClass)] as IInjectionFactory <TClass>; if (factory == null) { throw new ArgumentException("TClass : factory = null"); } TClass result = factory.Create(this); if (factory.IsSingleFactory) { _factories.Remove(typeof(TClass)); RegisterInstance <TClass>(result); } return(result); }
public MemOpBase ItemByOperationIndex(long aOpIndex, TClass aClass, out int aIndex) { aIndex = -1; MemOpBase ret = null; int count = iItems.Count; // for (int i = count - 1; i >= 0; i--) { MemOpBase item = (MemOpBase)iItems[i]; if (item.OperationIndex == aOpIndex) { if (aClass == TClass.ENotApplicable || item.Class == aClass) { aIndex = i; ret = item; break; } } } // return(ret); }
public MemObjRegionalCollection CollectionByCellAddress(long aCellAddress, TClass aClass, out MemOpBase aItem, out int aCollectionIndex, out int aItemIndex) { aItem = null; aCollectionIndex = -1; aItemIndex = -1; MemObjRegionalCollection ret = null; // First check whether the item is in the current collection (if we have one) if (iCurrentCollection != null) { aItem = iCurrentCollection.ItemByAddress(aCellAddress, aClass, out aItemIndex); if (aItem != null) { // Yes, it resides in the current collection... ret = iCurrentCollection; } } else { // Need to search the remaining collections. Must search backwards! int count = iCollections.Count; for (int i = count - 1; i >= 0; i--) { MemObjRegionalCollection collection = (MemObjRegionalCollection)iCollections[i]; aItem = collection.ItemByAddress(aCellAddress, aClass, out aItemIndex); if (aItem != null) { // Yes, its in this collection ret = collection; aCollectionIndex = i; break; } } } return(ret); }
void ReleaseDesignerOutlets() { if (AStList != null) { AStList.Dispose(); AStList = null; } if (AParList != null) { AParList.Dispose(); AParList = null; } if (ATeaList != null) { ATeaList.Dispose(); ATeaList = null; } if (AAClassForm != null) { AAClassForm.Dispose(); AAClassForm = null; } if (AAClassLetter != null) { AAClassLetter.Dispose(); AAClassLetter = null; } if (AAClassProfile != null) { AAClassProfile.Dispose(); AAClassProfile = null; } if (AAClassYear != null) { AAClassYear.Dispose(); AAClassYear = null; } if (AAddClErr != null) { AAddClErr.Dispose(); AAddClErr = null; } if (AAddGrillErr != null) { AAddGrillErr.Dispose(); AAddGrillErr = null; } if (AAddLessErr != null) { AAddLessErr.Dispose(); AAddLessErr = null; } if (AAddParErr != null) { AAddParErr.Dispose(); AAddParErr = null; } if (AAddProfile != null) { AAddProfile.Dispose(); AAddProfile = null; } if (AAddProfileErr != null) { AAddProfileErr.Dispose(); AAddProfileErr = null; } if (AAddRoomErr != null) { AAddRoomErr.Dispose(); AAddRoomErr = null; } if (AAddStClass != null) { AAddStClass.Dispose(); AAddStClass = null; } if (AAddStErr != null) { AAddStErr.Dispose(); AAddStErr = null; } if (AAddStHome != null) { AAddStHome.Dispose(); AAddStHome = null; } if (AAddStLast != null) { AAddStLast.Dispose(); AAddStLast = null; } if (AAddStMail != null) { AAddStMail.Dispose(); AAddStMail = null; } if (AAddStName != null) { AAddStName.Dispose(); AAddStName = null; } if (AAddStNum != null) { AAddStNum.Dispose(); AAddStNum = null; } if (AAddStPesel != null) { AAddStPesel.Dispose(); AAddStPesel = null; } if (AAddStRegNum != null) { AAddStRegNum.Dispose(); AAddStRegNum = null; } if (AAddSubErr != null) { AAddSubErr.Dispose(); AAddSubErr = null; } if (AAddTeaErr != null) { AAddTeaErr.Dispose(); AAddTeaErr = null; } if (AAddUnitErr != null) { AAddUnitErr.Dispose(); AAddUnitErr = null; } if (AALessClL != null) { AALessClL.Dispose(); AALessClL = null; } if (AALessClY != null) { AALessClY.Dispose(); AALessClY = null; } if (AALessDay != null) { AALessDay.Dispose(); AALessDay = null; } if (AALessRF != null) { AALessRF.Dispose(); AALessRF = null; } if (AALessRR != null) { AALessRR.Dispose(); AALessRR = null; } if (AALessSub != null) { AALessSub.Dispose(); AALessSub = null; } if (AALessUH != null) { AALessUH.Dispose(); AALessUH = null; } if (AALessUM != null) { AALessUM.Dispose(); AALessUM = null; } if (AAParHome != null) { AAParHome.Dispose(); AAParHome = null; } if (AAParLast != null) { AAParLast.Dispose(); AAParLast = null; } if (AAParMail != null) { AAParMail.Dispose(); AAParMail = null; } if (AAParMoney != null) { AAParMoney.Dispose(); AAParMoney = null; } if (AAParNa != null) { AAParNa.Dispose(); AAParNa = null; } if (AAParNum != null) { AAParNum.Dispose(); AAParNum = null; } if (AAParPe != null) { AAParPe.Dispose(); AAParPe = null; } if (AARoomChairs != null) { AARoomChairs.Dispose(); AARoomChairs = null; } if (AARoomFloor != null) { AARoomFloor.Dispose(); AARoomFloor = null; } if (AARoomRoom != null) { AARoomRoom.Dispose(); AARoomRoom = null; } if (AASub != null) { AASub.Dispose(); AASub = null; } if (AATaNa != null) { AATaNa.Dispose(); AATaNa = null; } if (AATeaHome != null) { AATeaHome.Dispose(); AATeaHome = null; } if (AATeaLast != null) { AATeaLast.Dispose(); AATeaLast = null; } if (AATeaMail != null) { AATeaMail.Dispose(); AATeaMail = null; } if (AATeaName != null) { AATeaName.Dispose(); AATeaName = null; } if (AATeaPe != null) { AATeaPe.Dispose(); AATeaPe = null; } if (AATeaPhone != null) { AATeaPhone.Dispose(); AATeaPhone = null; } if (AATeaWork != null) { AATeaWork.Dispose(); AATeaWork = null; } if (AAUnitH != null) { AAUnitH.Dispose(); AAUnitH = null; } if (AAUnitM != null) { AAUnitM.Dispose(); AAUnitM = null; } if (ACClass != null) { ACClass.Dispose(); ACClass = null; } if (ACForm != null) { ACForm.Dispose(); ACForm = null; } if (AchCl != null) { AchCl.Dispose(); AchCl = null; } if (AChClass != null) { AChClass.Dispose(); AChClass = null; } if (AChClErr != null) { AChClErr.Dispose(); AChClErr = null; } if (AChFormEr != null) { AChFormEr.Dispose(); AChFormEr = null; } if (AChFormErr != null) { AChFormErr.Dispose(); AChFormErr = null; } if (AChSt != null) { AChSt.Dispose(); AChSt = null; } if (ADelgrillErr != null) { ADelgrillErr.Dispose(); ADelgrillErr = null; } if (ADelGrillPar != null) { ADelGrillPar.Dispose(); ADelGrillPar = null; } if (ADelGrillSt != null) { ADelGrillSt.Dispose(); ADelGrillSt = null; } if (ADelPar != null) { ADelPar.Dispose(); ADelPar = null; } if (ADelParErr != null) { ADelParErr.Dispose(); ADelParErr = null; } if (ADelSt != null) { ADelSt.Dispose(); ADelSt = null; } if (ADelStErr != null) { ADelStErr.Dispose(); ADelStErr = null; } if (ADelTea != null) { ADelTea.Dispose(); ADelTea = null; } if (ADelteaErr != null) { ADelteaErr.Dispose(); ADelteaErr = null; } if (AGrillParent != null) { AGrillParent.Dispose(); AGrillParent = null; } if (AGrillStudent != null) { AGrillStudent.Dispose(); AGrillStudent = null; } if (PChildList != null) { PChildList.Dispose(); PChildList = null; } if (PeselInput != null) { PeselInput.Dispose(); PeselInput = null; } if (PLegitimize != null) { PLegitimize.Dispose(); PLegitimize = null; } if (PLegitimizeErr != null) { PLegitimizeErr.Dispose(); PLegitimizeErr = null; } if (PMyInfo != null) { PMyInfo.Dispose(); PMyInfo = null; } if (PNotes != null) { PNotes.Dispose(); PNotes = null; } if (PPresance != null) { PPresance.Dispose(); PPresance = null; } if (PWarnings != null) { PWarnings.Dispose(); PWarnings = null; } if (SNotes != null) { SNotes.Dispose(); SNotes = null; } if (SPoints != null) { SPoints.Dispose(); SPoints = null; } if (SPresance != null) { SPresance.Dispose(); SPresance = null; } if (SWarnings != null) { SWarnings.Dispose(); SWarnings = null; } if (SyInfo != null) { SyInfo.Dispose(); SyInfo = null; } if (TAddCatErr != null) { TAddCatErr.Dispose(); TAddCatErr = null; } if (TBest1 != null) { TBest1.Dispose(); TBest1 = null; } if (TCatNam != null) { TCatNam.Dispose(); TCatNam = null; } if (TCatWeight != null) { TCatWeight.Dispose(); TCatWeight = null; } if (TChaPrErr != null) { TChaPrErr.Dispose(); TChaPrErr = null; } if (TCheckPresance != null) { TCheckPresance.Dispose(); TCheckPresance = null; } if (TCheckStudent != null) { TCheckStudent.Dispose(); TCheckStudent = null; } if (TChePrErr != null) { TChePrErr.Dispose(); TChePrErr = null; } if (TClass != null) { TClass.Dispose(); TClass = null; } if (TCNDesc != null) { TCNDesc.Dispose(); TCNDesc = null; } if (TCNSt != null) { TCNSt.Dispose(); TCNSt = null; } if (TCNVal != null) { TCNVal.Dispose(); TCNVal = null; } if (TErrNote != null) { TErrNote.Dispose(); TErrNote = null; } if (TErrNoteChange != null) { TErrNoteChange.Dispose(); TErrNoteChange = null; } if (TErrWar != null) { TErrWar.Dispose(); TErrWar = null; } if (TextOnFirstPage != null) { TextOnFirstPage.Dispose(); TextOnFirstPage = null; } if (TMyInfo != null) { TMyInfo.Dispose(); TMyInfo = null; } if (TNCat != null) { TNCat.Dispose(); TNCat = null; } if (TNDesc != null) { TNDesc.Dispose(); TNDesc = null; } if (TNSt != null) { TNSt.Dispose(); TNSt = null; } if (TNSub != null) { TNSub.Dispose(); TNSub = null; } if (TNVal != null) { TNVal.Dispose(); TNVal = null; } if (TPreSt != null) { TPreSt.Dispose(); TPreSt = null; } if (TPreStat != null) { TPreStat.Dispose(); TPreStat = null; } if (TPreUnit != null) { TPreUnit.Dispose(); TPreUnit = null; } if (TPrUnit != null) { TPrUnit.Dispose(); TPrUnit = null; } if (TWDesc != null) { TWDesc.Dispose(); TWDesc = null; } if (TWPoints != null) { TWPoints.Dispose(); TWPoints = null; } if (TWSt != null) { TWSt.Dispose(); TWSt = null; } }
public static XmlSchemaSet Infer <TClass>() where TClass : new() { TClass t = new TClass(); return(Infer(t.GetType())); }
public override void ViewDidLoad() { base.ViewDidLoad(); // Do any additional setup after loading the view. var listHours = new List <string>(new string[] { "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16" }); var students = Backendoptions.GetAllStudents(); var subjects = Backendoptions.GetSubjects(); var classes = Backendoptions.GetClasses(); var parents = Backendoptions.GetAllParents(); var teachers = Backendoptions.GetTeachers(); var rooms = Backendoptions.GetRooms(); var units = Backendoptions.GetUnits(); var profiles = Backendoptions.GetProfiles(); var status = Backendoptions.GetStatuses(); if (Backendoptions.IsParent()) { string stringinfo = "dzieci pod moją opieką:\n"; var child = Backendoptions.GetChildren(); foreach (var ch in child) { stringinfo = stringinfo + " " + ch + ","; } PMyInfo.StringValue = stringinfo.Remove(stringinfo.Length - 1); PChildList.UsesDataSource = true; PChildList.DataSource = new MyCombo(child); PChildList.Editable = false; PChildList.SelectItem(0); if (Backendoptions.IsChildSet()) { PNotes.StringValue = Backendoptions.GetMyChildPresance(); //Yes, presance - i've done a mistake while creating names in a builder PPresance.StringValue = Backendoptions.GetMyChildNotes(); //so here are notes PWarnings.StringValue = Backendoptions.GetMyChildWarnings(); PLegitimize.UsesDataSource = true; PLegitimize.DataSource = new MyCombo(Backendoptions.GetAbsence()); } } else { if (Backendoptions.IsAdmin()) { AStList.StringValue = Backendoptions.GetAllStudentsData(); AParList.StringValue = Backendoptions.GetAllParentsData(); ATeaList.StringValue = Backendoptions.GetAllTeachersData(); AAUnitH.UsesDataSource = true; AAUnitH.DataSource = new MyCombo(listHours); AAUnitH.Editable = false; AAUnitH.SelectItem(0); AAddStClass.UsesDataSource = true; AAddStClass.DataSource = new MyCombo(classes); AAddStClass.Editable = false; AGrillParent.UsesDataSource = true; AGrillStudent.UsesDataSource = true; AGrillStudent.DataSource = new MyCombo(students); AGrillStudent.Editable = false; AGrillParent.DataSource = new MyCombo(parents); AGrillParent.Editable = false; ACForm.UsesDataSource = true; ACClass.UsesDataSource = true; ACForm.DataSource = new MyCombo(teachers); ACForm.Editable = false; ACClass.DataSource = new MyCombo(classes); ACClass.Editable = false; AALessSub.UsesDataSource = true; AALessUH.UsesDataSource = true; AALessRR.UsesDataSource = true; AALessDay.UsesDataSource = true; AALessClL.UsesDataSource = true; var listDay = new List <string>(new string[] { "1", "2", "3", "4", "5", "6" }); AALessDay.DataSource = new MyCombo(listDay); AALessDay.Editable = false; AALessDay.SelectItem(0); AALessSub.DataSource = new MyCombo(subjects); AALessSub.Editable = false; AALessRR.DataSource = new MyCombo(rooms); AALessRR.Editable = false; if (rooms.Count > 0) { AALessRR.SelectItem(0); } AALessUH.DataSource = new MyCombo(units); AALessUH.Editable = false; AALessUH.SelectItem(0); AALessClL.DataSource = new MyCombo(classes); AALessClL.Editable = false; AAClassProfile.UsesDataSource = true; AAClassProfile.DataSource = new MyCombo(profiles); AAClassProfile.Editable = false; AAClassForm.UsesDataSource = true; AAClassForm.DataSource = new MyCombo(teachers); AAClassForm.Editable = false; ADelPar.UsesDataSource = true; ADelPar.DataSource = new MyCombo(parents); ADelPar.Editable = false; ADelSt.UsesDataSource = true; ADelSt.DataSource = new MyCombo(students); ADelSt.Editable = false; ADelTea.UsesDataSource = true; ADelTea.DataSource = new MyCombo(teachers); ADelTea.Editable = false; AChSt.UsesDataSource = true; AChSt.DataSource = new MyCombo(students); AChSt.Editable = false; AchCl.UsesDataSource = true; AchCl.DataSource = new MyCombo(classes); AchCl.Editable = false; ADelGrillPar.UsesDataSource = true; ADelGrillPar.DataSource = new MyCombo(parents); ADelGrillPar.Editable = false; ADelGrillSt.UsesDataSource = true; ADelGrillSt.DataSource = new MyCombo(students); ADelGrillSt.Editable = false; if (classes.Count > 0) { AAddStClass.SelectItem(0); ACClass.SelectItem(0); AALessClL.SelectItem(0); AchCl.SelectItem(0); } if (students.Count > 0) { AGrillStudent.SelectItem(0); ADelGrillSt.SelectItem(0); AChSt.SelectItem(0); ADelSt.SelectItem(0); } if (parents.Count > 0) { AGrillParent.SelectItem(0); ADelPar.SelectItem(0); ADelGrillPar.SelectItem(0); } if (teachers.Count > 0) { ADelTea.SelectItem(0); ACForm.SelectItem(0); AAClassForm.SelectItem(0); } } else { if (Backendoptions.IsTeacher()) { TClass.UsesDataSource = true; TClass.DataSource = new MyCombo(classes); TClass.Editable = false; if (Backendoptions.IsClassSet()) { if (Backendoptions.GetStudents().Count != 0) { var classstudents = Backendoptions.GetStudents(); TWSt.UsesDataSource = true; TWSt.DataSource = new MyCombo(classstudents); TWSt.Editable = false; TNSt.UsesDataSource = true; TNSt.DataSource = new MyCombo(classstudents); TNSt.Editable = false; TPreSt.UsesDataSource = true; TPreSt.DataSource = new MyCombo(classstudents); TPreSt.Editable = false; TWSt.SelectItem(0); TNSt.SelectItem(0); TPreSt.SelectItem(0); TCNSt.UsesDataSource = true; TCNSt.DataSource = new MyCombo(classstudents); TCNSt.Editable = false; TCNSt.SelectItem(0); string studentsstring = "", presance = ""; foreach (var st in classstudents) { studentsstring = studentsstring + st + "\n"; } TCheckStudent.StringValue = studentsstring; TCheckStudent.Editable = false; TCheckPresance.StringValue = presance; TCNDesc.UsesDataSource = true; TCNDesc.DataSource = new MyCombo(Backendoptions.GetLastNotes()); TCNDesc.Editable = false; var best = Backendoptions.GetTopThree(); TBest1.StringValue = best; TPreUnit.UsesDataSource = true; TPreUnit.DataSource = new MyCombo(Backendoptions.LastLessonsForClass()); TPreUnit.Editable = false; } } TNVal.UsesDataSource = true; TNCat.UsesDataSource = true; TNSub.UsesDataSource = true; var values = new List <string>(new string[] { "1", "2", "2.5", "3", "3.5", "4", "4.5", "5", "5.5", "6" }); TNVal.DataSource = new MyCombo(values); TNVal.Editable = false; TCNVal.UsesDataSource = true; TCNVal.DataSource = new MyCombo(values); TCNVal.Editable = false; TNSub.DataSource = new MyCombo(subjects); TNSub.Editable = false; TNCat.DataSource = new MyCombo(Backendoptions.GetCategories()); TNCat.Editable = false; TPreStat.UsesDataSource = true; TPrUnit.UsesDataSource = true; TPrUnit.DataSource = new MyCombo(units); TPrUnit.Editable = false; TPreStat.DataSource = new MyCombo(status); TPreStat.Editable = false; TClass.SelectItem(0); TNVal.SelectItem(0); TNSub.SelectItem(0); TNCat.SelectItem(0); TPreStat.SelectItem(0); TPrUnit.SelectItem(0); TCNVal.SelectItem(0); } else { if (Backendoptions.IsStudent()) { var warning = Backendoptions.GetMydWarnings(); SWarnings.StringValue = warning.Item1; SPoints.StringValue = warning.Item2.ToString(); SNotes.StringValue = Backendoptions.GetMyNotes(); SPresance.StringValue = Backendoptions.GetMyPresance(); SyInfo.StringValue = Backendoptions.GetMyStudentInfo(); } } } } }
public MemOpBase ItemByAddress(long aCellAddress, TClass aClass) { int index; return(ItemByAddress(aCellAddress, aClass, out index)); }
public override void BuffOver() { TClass.RemoveAttackCarryingBuff(TakeBuff); Over = true; }
public MemObjRegionalCollection CollectionByCellAddress(long aCellAddress, TClass aClass) { int index; return(CollectionByCellAddress(aCellAddress, aClass, out index)); }