public Member(string type, string name, string dslName, Kinds kind = Kinds.Field) { Name = name; Type = type; Kind = kind; DslName = dslName; }
public static GCRootKind GetGCRootKind(Kinds kind) { Kinds k = (Kinds)((uint)kind & 0xFFFFFFF0); switch (k) { case Kinds.StaticVar: return(GCRootKind.StaticVar); case Kinds.ThreadStaticVar: return(GCRootKind.ThreadStaticVar); case Kinds.LocalVar: return(GCRootKind.LocalVar); case Kinds.Strong: return(GCRootKind.Strong); case Kinds.Weak: return(GCRootKind.Weak); case Kinds.Pinning: return(GCRootKind.Pinning); case Kinds.Finalizer: return(GCRootKind.Finalizer); case Kinds.AsyncPinning: return(GCRootKind.AsyncPinning); } throw new ArgumentException("[ClrtRoot.GetGCRootKind]"); }
public override bool DeSerialize(byte[] data, Pointer p) { base.DeSerialize(data, p); IsRefresh = BitPacker.GetBool(data, p); IsServerPacket = BitPacker.GetBool(data, p); int num = BitPacker.GetInt(data, p); for (int i = 0; i < num; i++) { if (!IsRefresh) { MatchNotificationType kind = (MatchNotificationType)BitPacker.GetInt(data, p); Kinds.Add(kind); } Game theGame = BitPacker.GetComponent(data, p, IsServerPacket) as Game; TheGames.Add(theGame); bool hasTargetPlayer = BitPacker.GetBool(data, p); if (!IsRefresh && hasTargetPlayer) { TargetPlayers.Add(BitPacker.GetComponent(data, p, false) as ICharacterInfo); } } return(true); }
private void cbkind_SelectedIndexChanged(object sender, EventArgs e) //动态加载项目列表中的项目 { kindlist.Items.Clear(); int iid = 0; Kinds item1 = cbkind.SelectedItem as Kinds; int isout = routcome.Checked ? 1 : 0; if (item1 != null) { iid = item1.kid; } string sql = string.Format("select * from [Items] where kid={0} and iout={1}", iid, isout); try { conn.Open(); comm.CommandText = sql; dr = comm.ExecuteReader(); ; while (dr.Read()) { int iid1 = (int)dr[0]; string name = dr["itemsname"].ToString().Trim(); kindlist.Items.Add(new items(iid1, isout, name)); } } catch (Exception ex) { MessageBox.Show(ex.Message, "操作数据库出错", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } finally { conn.Close(); } }
public Field(Kinds kind, string id, string prompt, Filter filter) { this.Kind = kind; this.id = id; this.prompt = prompt; this.filter = filter; }
public SLImage(IntPtr images, int i) { this.Kind = (SLImage.Kinds)EaselDLL.GetImageKind(images, i); this.End1 = hasEnd1(this.Kind) ? new Point(EaselDLL.GetImageEnd1X(images, i), EaselDLL.GetImageEnd1Y(images, i)) : new Point(); this.End2 = hasEnd2(this.Kind) ? new Point(EaselDLL.GetImageEnd2X(images, i), EaselDLL.GetImageEnd2Y(images, i)) : new Point(); this.End3 = hasEnd3(this.Kind) ? new Point(EaselDLL.GetImageEnd3X(images, i), EaselDLL.GetImageEnd3Y(images, i)) : new Point(); this.Center = hasCenter(this.Kind) ? new Point(EaselDLL.GetImageCenterX(images, i), EaselDLL.GetImageCenterY(images, i)) : new Point(); this.Radius = hasRadius(this.Kind) ? EaselDLL.GetImageRadius(images, i) : 0; this.Height = hasHeight(this.Kind) ? EaselDLL.GetImageHeight(images, i) : 0; this.Width = hasWidth(this.Kind) ? EaselDLL.GetImageWidth(images, i) : 0; this.Color = hasColor(this.Kind) ? Color.FromArgb(EaselDLL.GetImageR(images, i), EaselDLL.GetImageG(images, i), EaselDLL.GetImageB(images, i)) : Color.Black; this.Message = ""; if (hasMessage(this.Kind)) { EaselDLL.GetImageText(images, i, SLInterface.output); this.Message = SLInterface.output.ToString(); } this.FileLocation = ""; if (hasFileLocation(this.Kind)) { EaselDLL.GetGraphicLocation(images, i, SLInterface.output); this.FileLocation = SLInterface.output.ToString(); } }
public async override Task OnNavigatedToAsync(object parameter, NavigationMode mode, IDictionary <string, object> state) { try { // Fill Genres and Kinds dictionaries GenresDictionary = await SoundCloudHelper.GetGenres(); KindsDictionary = await SoundCloudHelper.GetKinds(); foreach (var g in GenresDictionary) { Genres.Add(g.Value); } foreach (var k in KindsDictionary) { Kinds.Add(k.Value); } // Select first Genre and Kind SelectedGenre = Genres.FirstOrDefault(); SelectedKind = Kinds.FirstOrDefault(); await base.OnNavigatedToAsync(parameter, mode, state); } catch (Exception ex) { Logger.LogError(this, ex.Message); ShowErrorMessage("There was an error during fetching tracks from SoundCloud."); } }
public Ball(float positionX, float positionY, float directionX, float directionY, float speed, float acceleration, Kinds kind) : base(new Vector2(10, 10), new Vector2(directionX, directionY), new Vector2(positionX, positionY)) { Speed = speed; Acceleration = acceleration; Kind = kind; }
public Brick(float x, float y, List <Brick> listReference, Kinds?kind = null) : base(new Vector2(50, 20), default, new Vector2(x, y)) { if (kind.HasValue) { Kind = kind.Value; } else { Kind = GetRandomKind(); } ListReference = listReference; DamageOnHit = FullHP / (1 + (int)Kind); if (Kind == Kinds.Indestructible) { DamageOnHit = 0; } else if (Kind == Kinds.PowerUP) { DamageOnHit = FullHP; } TileLocation = new RawRectangleF(1, 1 + 18 * (int)Kind, 33, 17 + 18 * (int)Kind); }
public ClrtRoot(ClrRoot root, int typeId, int nameId) { ulong raddr = root.Address; ulong obj = root.Object; Address = raddr == 0UL ? 0UL : Utils.SetRooted(raddr); Object = (raddr == 0UL) ? obj : Utils.SetRooted(root.Object); TypeId = typeId; NameId = nameId; DomainId = root.AppDomain != null ? root.AppDomain.Id : Constants.InvalidIndex; OsThreadId = root.Thread != null ? root.Thread.OSThreadId : Constants.InvalidThreadId; ManagedThreadId = root.Thread != null ? root.Thread.ManagedThreadId : Constants.InvalidIndex;; int traits = (int)Convert(root.Kind); if (root.IsInterior) { traits |= (int)Kinds.Interior; } if (root.IsPinned) { traits |= (int)Kinds.Pinned; } if (root.IsPossibleFalsePositive) { traits |= (int)Kinds.PossibleFalsePositive; } RootKind = (Kinds)traits; }
protected override IEnumerable <PreStoreSearchEntity> SearchData() { var oids = OrganizationListVM.GetOrganizationDownHierarchy(VMGlobal.CurrentUser.OrganizationID); var lp = VMGlobal.DistributionQuery.LinqOP; var vips = lp.GetDataContext <VIPCard>(); var prestores = lp.Search <VIPPredepositTrack>(o => oids.Contains(o.OrganizationID)); var organizations = lp.GetDataContext <ViewOrganization>(); var query = from prestore in prestores from vip in vips where prestore.VIPID == vip.ID from organization in organizations where vip.OrganizationID == organization.ID select new PreStoreSearchEntity { ConsumeMoney = prestore.ConsumeMoney, CreateTime = prestore.CreateTime, OccurDate = prestore.CreateTime.Date, FreeMoney = prestore.FreeMoney, Kind = prestore.Kind, OrganizationName = organization.Name, RefrenceBillCode = prestore.RefrenceBillCode, Remark = prestore.Remark, StoreMoney = prestore.StoreMoney, VIPCode = vip.Code, VIPName = vip.CustomerName }; var filtedData = (IQueryable <PreStoreSearchEntity>)query.Where(FilterDescriptors); var result = filtedData.ToList(); foreach (var r in result) { r.KindName = Kinds.Find(o => o.Flag == r.Kind).Name; } return(result); }
/// <summary> /// Generate a Number of Paragraphs /// </summary> /// <param name="Kind"></param> /// <param name="ParagraphsNumber"></param> /// <param name="Language"></param> /// <returns></returns> public static string GenerateParagraphs(Kinds Kind, int ParagraphsNumber, Languages Language = Languages.English) { //Se il numero di paragrafi è minore di 1 torno vuoto if (ParagraphsNumber < 1) { return(""); } int minWordsInParagraph = 70; int maxWordsInParagraph = 110; string resp = String.Empty; for (int i = 0; i < ParagraphsNumber; i++) { if (resp != String.Empty) { resp = resp + Environment.NewLine + Environment.NewLine + WordsHelper.FirstCharToUpper(GenerateText(Kind, random.Next(minWordsInParagraph, maxWordsInParagraph), Language)); } else { //primo passaggio, non metto il separatore resp = resp + WordsHelper.FirstCharToUpper(GenerateText(Kind, random.Next(minWordsInParagraph, maxWordsInParagraph), Language)) + "."; } } return(resp); }
public Struct(Kinds kind, Struct elemType) { this.kind = kind; // set CLR type of Struct instance switch (kind) { case Struct.Kinds.String: sysType = typeof(string); break; case Struct.Kinds.None: sysType = typeof(void); break; case Struct.Kinds.Int: sysType = typeof(int); break; case Struct.Kinds.Char: sysType = typeof(char); break; case Struct.Kinds.Arr: //int //long (del array) sysType = Array.CreateInstance(elemType.sysType, 0).GetType(); //Metadata para int[] this.elemType = elemType; //(struct para int[]).elemType = (struct para el int) break; case Struct.Kinds.Class: // do nothing here, type must first be defined // sysType is set in Code.CreateMetadata before first use break; } this.elemType = elemType; //si int[], hace la asig 2 veces }
public ClrtRoot(ClrRoot root, int typeId, int nameId, int domainId, uint osthreadId, int managedThrdId) { Address = root.Address; Object = root.Object; TypeId = typeId; NameId = nameId; DomainId = domainId; OsThreadId = osthreadId; ManagedThreadId = managedThrdId; int traits = (int)Convert(root.Kind); if (root.IsInterior) { traits |= (int)Kinds.Interior; } if (root.IsPinned) { traits |= (int)Kinds.Pinned; } if (root.IsPossibleFalsePositive) { traits |= (int)Kinds.PossibleFalsePositive; } RootKind = (Kinds)traits; }
public override void Show() { var exePath = AppDomain.CurrentDomain.BaseDirectory;//path to exe file var path1 = Path.Combine(exePath, @"images/" + Kinds.ToString() + " " + Colour.ToString() + ".png"); Pb.ImageLocation = path1; }
private void AssertEqual(Kinds actual, Kinds expected) { if (actual != expected) { throw new Exception($"Found {actual} | Expected {expected}"); } }
public Place(string name, Geopoint position, string description, Kinds kind, string campus) { this.Name = name; this.Position = position; this.Description = description; this.Kind = kind; this.Campus = campus; }
public static Kinds1 ConvertToDto(Kinds k) { return(new Kinds1() { IdKind = k.IdKind, Kind = k.Kind }); }
// special constructor for Cond Items public Item(int relop, Struct type) { this.kind = Kinds.Cond; this.type = type; this.relop = relop; tLabel = Code.il.DefineLabel(); fLabel = Code.il.DefineLabel(); }
public void ShouldAddKindWithIdAndSymbol( [Values(Kinds.Any, Kinds.Ace)] Kinds kindValue, [Values("A", "-", "12345")] string kindSymbol) { var kind = _gameContext.Kinds.Add(new Kind(kindValue, kindSymbol)); Assert.That(kind.Entity.Id, Is.EqualTo((int)kindValue)); Assert.That(kind.Entity.Symbol, Is.EqualTo(kindSymbol)); }
public Field(Kinds kind, string tag, string prompt, Filter filter, int order = 0) { this.Kind = kind; Id = Guid.NewGuid(); this.tag = tag; this.prompt = prompt; this.filter = filter; this.Order = order; }
public ActionResult StworzKind(Kinds kind) { if (ModelState.IsValid) { ObsługaBazyDanych.dodajKind(kind); return(RedirectToAction("ListaKind")); } return(View()); }
/// <summary> /// Record a single timing information item. /// </summary> /// <param name="qKind"></param> /// <param name="sLabel"></param> /// <param name="sCat"></param> /// <param name="dArg1"></param> /// <param name="dArg2"></param> /// <param name="dElapsedMs"></param> /// <returns></returns> public static bool Record(DateTime TaskStart, Kinds qKind, string sLabel, string sCat, string sDependencies, double dArg1, double dArg2, double dElapsedMs, float beforeRam, float afterRam, double ttime) { string fn = MethodBase.GetCurrentMethod().Name; try { TimeThisInfo tti = new TimeThisInfo(); tti.AppName = AppSettings.AppName; tti.AppVersion = AppSettings.AppVersion; tti.TaskStartTime = TaskStart; tti.TaskEndTime = DateTime.Now; tti.Kind = qKind; tti.Label = sLabel; tti.Category = sCat; tti.Dependencies = sDependencies; tti.Arg1 = dArg1; tti.Arg2 = dArg2; tti.ElapsedMs = dElapsedMs; tti.MemoryAtStart = beforeRam; tti.MemoryAtEnd = afterRam; tti.TstampUid = Convert.ToInt64(ttime); Data.Add(tti); //Util.BenchmarkXy(typeof(TimeThis).Name + "." + qKind.ToString(), sLabel, sCat, dArg1, dArg2, dElapsedMs, beforeRam, afterRam ); // Write the record to the persistence file (initializing the file if necessary): lock (m_oPersister) { if (null == m_oDataFile) { string sfile = AppSettings.LocalDir + "TimeThis_Code.txt"; bool exists = File.Exists(sfile); m_oDataFile = new StreamWriter(sfile, true); if (!exists) { string styperec = m_oPersister.SerializeType(typeof(TimeThisInfo)); m_oDataFile.WriteLine(styperec); } } string srec = m_oPersister.SerializeInst(typeof(TimeThisInfo), tti); m_oDataFile.WriteLine(srec); m_oDataFile.Flush(); // this is inefficient! } return(true); } catch (Exception exc) { Util.HandleExc(typeof(TimeThisInfo), fn, exc); return(false); } }
public override bool Execute() { var kindMap = Kinds.ToDictionary( kind => kind.ItemSpec, StringComparer.OrdinalIgnoreCase); AssignedFiles = Files.Select(file => EnsurePackagePath(file, kindMap)).ToArray(); return(!Log.HasLoggedErrors); }
public static Kinds GetKindseById(Kinds kinds) { SqlParameter[] sp = { new SqlParameter("@id", kinds.Id), }; string sql = "select * from tb_kinds where id like @id"; SqlDataReader dr = sqlHelp.ExecuteReader(sql, sp); return(GetKindsByDateReader(dr)); }
private static IQuery Handle(Kinds kind, params IQuery[] querys) { if (querys.Length == 1) { return(querys[0]); } else { return(new QueryCollection(kind, querys)); } }
public ClrtRoot(ClrtRoot root) { Address = root.Address; Object = root.Object; TypeId = root.TypeId; NameId = root.DomainId; RootKind = root.RootKind; DomainId = root.DomainId; OsThreadId = root.OsThreadId; ManagedThreadId = root.ManagedThreadId; }
private static string GetName(Kinds kind) { switch (kind) { case Kinds.Unit: return("Unit"); case Kinds.Integration: return("Integration"); default: throw new NotSupportedException("Unsupported test kind: " + kind); } }
private ClrtRoot(ulong address, ulong @object, int typeId, int nameId, int domainId, uint osthreadId, int managedThrdId, Kinds trait) { // return new ClrtRoot(address, @object, typeId, nameId, domainId, osThreadId, managedThreadId, rootTraits); Address = address; Object = @object; TypeId = typeId; NameId = nameId; DomainId = domainId; OsThreadId = osthreadId; ManagedThreadId = managedThrdId; RootKind = trait; }
private static IFilter Handle(Kinds kind, params IFilter[] filters) { ExceptionHelper.ThrowIfNullOrEmpty(filters, "filters"); if (filters.Length == 1) { return(filters[0]); } else { return(new FilterCollection(kind, filters)); } }
public Struct(Kinds kind, Struct elemType) { this.kind = kind; // set CLR type of Struct instance switch (kind) { case Struct.Kinds.String: sysType=typeof(string);break; case Struct.Kinds.None: sysType = typeof(void); break; case Struct.Kinds.Int: sysType = typeof(int); break; case Struct.Kinds.Char: sysType = typeof(char); break; case Struct.Kinds.Arr: //int //long (del array) sysType = Array.CreateInstance(elemType.sysType, 0).GetType();//Metadata para int[] this.elemType = elemType; //(struct para int[]).elemType = (struct para el int) break; case Struct.Kinds.Class: // do nothing here, type must first be defined // sysType is set in Code.CreateMetadata before first use break; } this.elemType = elemType; //si int[], hace la asig 2 veces }
/* /// <summary> /// Tworzy instancję obiektu /// </summary> public PhpCodeValue() { } Przykłady użycia implement INotifyPropertyChanged implement INotifyPropertyChanged_Passive implement ToString ##PhpValue## ##SourceValue## ##Kind## implement ToString PhpValue=##PhpValue##, SourceValue=##SourceValue##, Kind=##Kind## implement equals PhpValue, SourceValue, Kind implement equals * implement equals *, ~exclude1, ~exclude2 */ #region Constructors /// <summary> /// Tworzy instancję obiektu /// <param name="PhpValue">Value on PHP side</param> /// <param name="Kind"></param> /// </summary> public PhpCodeValue(string PhpValue, Kinds Kind) { this.PhpValue = PhpValue; this.Kind = Kind; }
/// <summary> /// Tworzy instancję obiektu /// <param name="PhpValue">Value on PHP side</param> /// <param name="SourceValue"></param> /// <param name="Kind"></param> /// </summary> public PhpCodeValue(string PhpValue, object SourceValue, Kinds Kind) { this.PhpValue = PhpValue; this.SourceValue = SourceValue; this.Kind = Kind; }
internal MethodBuilder meth; // Method: builder for metadata and CIL #endregion Fields #region Constructors public Symbol(Kinds kind, string name, Struct type) { this.kind = kind; this.name = name; this.type = type; }
/// <summary> /// base constructor /// </summary> public KindQuery(Kinds kind) : base() { this.kinds[0] = kind; }
// special constructor for Const Items public Item(int val) { kind = Kinds.Const; type = Tab.intType; this.val = val; }
// special constructor for Stack Items internal Item(Struct type) { kind = Kinds.Stack; this.type = type; }
/// <summary> /// base constructor /// </summary> public KindQuery(Kinds kind) : base() { this.kindsAsText = kind.ToString(); }
/// <summary> /// base constructor, with initial queryUri /// </summary> /// <param name="queryUri">the query to use</param> /// <param name="kind">the kind of query</param> public KindQuery(string queryUri, Kinds kind) : base(queryUri) { this.kindsAsText = kind.ToString(); }
/// <summary> /// base constructor, with initial queryUri /// </summary> /// <param name="queryUri">the query to use</param> /// <param name="kind">the kind of query</param> public KindQuery(string queryUri, Kinds kind) : base(queryUri) { this.kinds[0] = kind; }
internal Type sysType; // CLR runtime type object #endregion Fields #region Constructors public Struct(Kinds kind) : this(kind, null) { }
public int val; // Const: value #endregion Fields #region Constructors public Item(Symbol sym) { type = sym.type; this.sym = sym; switch (sym.kind) { case Symbol.Kinds.Const: kind = Kinds.Const; val = sym.val; break; case Symbol.Kinds.Arg: kind = Kinds.Arg; adr = sym.adr; break; case Symbol.Kinds.Local: kind = Kinds.Local; adr = sym.adr; break; case Symbol.Kinds.Global: kind = Kinds.Static; break; case Symbol.Kinds.Field: kind = Kinds.Field; break; case Symbol.Kinds.Meth: kind = Kinds.Meth; break; default: Parser.Errors.Error(ErrorStrings.CREATE_ITEM); break; } }
public Member(string annotation, string type, string name, string dslName, Kinds kind = Kinds.Field) { Annotation = annotation; Name = name; Type = type; Kind = kind; DslName = dslName; }