当前位置: 首页>>代码示例>>C#>>正文


C# Entry类代码示例

本文整理汇总了C#中Entry的典型用法代码示例。如果您正苦于以下问题:C# Entry类的具体用法?C# Entry怎么用?C# Entry使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Entry类属于命名空间,在下文中一共展示了Entry类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Load

 public static BARFile Load(string filename)
 {
     if (!File.Exists(filename)) return null;
     var file = File.OpenRead(filename);
     var bar = new BARFile() {
         stream = file,
         SourceFilename = filename,
     };
     var reader = new BinaryReader(file);
     reader.Read(bar.Id = new byte[8], 0, 8);
     int unknown = reader.ReadInt32();
     int entryC = reader.ReadInt32();
     bar.DirectorySize = reader.ReadInt32();
     bar.DirectoryOffset = reader.ReadInt32();
     int unknown2 = reader.ReadInt32();
     file.Seek(bar.DirectoryOffset, SeekOrigin.Begin);
     int[] offsets = new int[entryC];
     for (int o = 0; o < offsets.Length; ++o) offsets[o] = reader.ReadInt32();
     for (int e = 0; e < entryC; ++e) {
         Entry entry = new Entry();
         entry.Offset = reader.ReadInt32();
         entry.Size = reader.ReadInt32();
         entry.Size2 = reader.ReadInt32();
         byte b0 = reader.ReadByte(),
             b1 = reader.ReadByte(),
             b2 = reader.ReadByte(),
             b3 = reader.ReadByte();
         if (b3 != 0) file.Position += 4;
         for (var c = reader.ReadChar(); c != '\0'; c = reader.ReadChar()) {
             entry.Name += c;
         }
         bar.entries.Add(entry);
     }
     return bar;
 }
开发者ID:Weesals,项目名称:ModHQ,代码行数:35,代码来源:BARFile.cs

示例2: CreateControls

		void CreateControls()
		{
			_picker = new DatePicker { Format = "D" };

			_manExpense = new Entry { Placeholder = "Exemple : 0,00", Keyboard = Keyboard.Numeric };
			_manExpense.TextChanged += numberEntry_TextChanged;
			_womanExpense = new Entry { Placeholder = "Exemple : 0,00", Keyboard = Keyboard.Numeric };
			_womanExpense.TextChanged += numberEntry_TextChanged;
			_details = new Editor { BackgroundColor = AppColors.Gray.MultiplyAlpha(0.15d), HeightRequest = 150 };

			Content = new StackLayout
				{ 
					Padding = new Thickness(20),
					Spacing = 10,
					Children =
						{
							new Label { Text = "Date" },
							_picker,
							new Label { Text = "Man expense" },
							_manExpense,
							new Label { Text = "Woman expense" },
							_womanExpense,
							new Label { Text = "Informations" },
							_details
						}
					};
		}
开发者ID:Benesss,项目名称:ExpenseForms,代码行数:27,代码来源:AddPage.cs

示例3: Login

        public Login()
        {
            Entry usuario = new Entry { Placeholder = "Usuario" };
            Entry clave = new Entry { Placeholder = "Clave", IsPassword = true };

            Button boton = new Button {
                Text = "Login",
                TextColor = Color.White,
                BackgroundColor = Color.FromHex ("77D065")
            };

            boton.Clicked += (sender, e) => {

            };

            //Stacklayout permite apilar los controles verticalmente
            StackLayout stackLayout = new StackLayout
            {
                Spacing = 20,
                Padding = 50,
                VerticalOptions = LayoutOptions.Center,
                Children =
                {
                    usuario,
                    clave,
                    boton
                }
            };

            //Como esta clase hereda de ContentPage, podemos usar estas propiedades directamente
            this.Content = stackLayout;
            this.Padding = new Thickness (5, Device.OnPlatform (20, 5, 5), 5, 5);
        }
开发者ID:narno67,项目名称:Xamarin,代码行数:33,代码来源:Login.cs

示例4: RequiredFieldTriggerPage

		public RequiredFieldTriggerPage ()
		{
			var l = new Label {
				Text = "Entry requires length>0 before button is enabled",
			};
			l.FontSize = Device.GetNamedSize (NamedSize.Small, l); 

			var e = new Entry { Placeholder = "enter name" };

			var b = new Button { Text = "Save",

				HorizontalOptions = LayoutOptions.Center
			};
			b.FontSize = Device.GetNamedSize (NamedSize.Large ,b);

			var dt = new DataTrigger (typeof(Button));
			dt.Binding = new Binding ("Text.Length", BindingMode.Default, source: e);
			dt.Value = 0;
			dt.Setters.Add (new Setter { Property = Button.IsEnabledProperty, Value = false });
			b.Triggers.Add (dt);

			Content = new StackLayout { 
				Padding = new Thickness(0,20,0,0),
				Children = {
					l,
					e,
					b
				}
			};
		}
开发者ID:ChandrakanthBCK,项目名称:xamarin-forms-samples,代码行数:30,代码来源:RequiredFieldTriggerPage.cs

示例5: GetMethods

	/// <summary>
	/// Collect a list of usable delegates from the specified target game object.
	/// The delegates must be of type "void Delegate()".
	/// </summary>

	static List<Entry> GetMethods (GameObject target)
	{
		MonoBehaviour[] comps = target.GetComponents<MonoBehaviour>();

		List<Entry> list = new List<Entry>();

		for (int i = 0, imax = comps.Length; i < imax; ++i)
		{
			MonoBehaviour mb = comps[i];
			if (mb == null) continue;

			MethodInfo[] methods = mb.GetType().GetMethods(BindingFlags.Instance | BindingFlags.Public);

			for (int b = 0; b < methods.Length; ++b)
			{
				MethodInfo mi = methods[b];

				if (mi.GetParameters().Length == 0 && mi.ReturnType == typeof(void))
				{
					if (mi.Name != "StopAllCoroutines" && mi.Name != "CancelInvoke")
					{
						Entry ent = new Entry();
						ent.target = mb;
						ent.method = mi;
						list.Add(ent);
					}
				}
			}
		}
		return list;
	}
开发者ID:CryptArc,项目名称:UnitySlots,代码行数:36,代码来源:EventDelegateEditor.cs

示例6: UpdateEntryWithResult

        public async Task UpdateEntryWithResult()
        {
            var key = new Entry() { { "ProductID", 1 } };
            var product = await _client.UpdateEntryAsync("Products", key, new Entry() { { "ProductName", "Chai" }, { "UnitPrice", 123m } }, true);

            Assert.Equal(123m, product["UnitPrice"]);
        }
开发者ID:rexwhitten,项目名称:Simple.OData.Client,代码行数:7,代码来源:ClientReadWriteTests.cs

示例7: Foo

        private void Foo()
        {

            Page p = new Page
            {
                //BackgroundColor = "white",
            };

            var l = new Label
            {
                Font = Font.SystemFontOfSize(NamedSize.Micro),
            };

            var e = new Entry()
            {

                Keyboard = Keyboard.Numeric,
                VerticalOptions = LayoutOptions.FillAndExpand,
            };


            var c = new ContentView()
            {
                Padding = new Thickness(5),
            };

            var sl = new StackLayout
            {
                Padding = new Thickness(5),
            };
        }
开发者ID:adbk,项目名称:spikes,代码行数:31,代码来源:Spike.cs

示例8: MonitorLoop

        static void MonitorLoop()
        {
            var timer = new Stopwatch ();
            timer.Start ();

            var process = Process.GetCurrentProcess();

            Entry last = new Entry { realTime = timer.Elapsed, cpuTime = process.TotalProcessorTime };

            while (true)
            {
                Thread.Sleep (1000);

                var now = new Entry { realTime = timer.Elapsed, cpuTime = process.TotalProcessorTime };

                LoadLastSecond = (now.cpuTime - last.cpuTime).TotalMilliseconds * 100.0 / (now.realTime - last.realTime).TotalMilliseconds;
                last = now;

                if (loads.Count == 60)
                {
                    var minuteAgo = loads.Dequeue ();
                    LoadLastMinute = (now.cpuTime - minuteAgo.cpuTime).TotalMilliseconds * 100.0 / (now.realTime - minuteAgo.realTime).TotalMilliseconds;
                }

                loads.Enqueue (now);
            }
        }
开发者ID:jason14747,项目名称:Terraria-s-Dedicated-Server-Mod,代码行数:27,代码来源:LoadMonitor.cs

示例9: IgniteSessionStateItemCollection

        /// <summary>
        /// Initializes a new instance of the <see cref="IgniteSessionStateItemCollection"/> class.
        /// </summary>
        /// <param name="reader">The binary reader.</param>
        internal IgniteSessionStateItemCollection(IBinaryRawReader reader)
        {
            Debug.Assert(reader != null);

            var count = reader.ReadInt();

            _dict = new Dictionary<string, int>(count);
            _list = new List<Entry>(count);

            for (var i = 0; i < count; i++)
            {
                var key = reader.ReadString();

                var valBytes = reader.ReadByteArray();

                if (valBytes != null)
                {
                    var entry = new Entry(key, true, valBytes);

                    _dict[key] = _list.Count;

                    _list.Add(entry);
                }
                else
                    AddRemovedKey(key);
            }
        }
开发者ID:juanavelez,项目名称:ignite,代码行数:31,代码来源:IgniteSessionStateItemCollection.cs

示例10: DeleteBookmark

		public bool DeleteBookmark (Entry entry)
		{
			var result = bookmarks.Remove (entry);
			if (result)
				FireChangedEvent (entry, BookmarkEventType.Deleted);
			return result;
		}
开发者ID:charles-cai,项目名称:monomac,代码行数:7,代码来源:BookmarkManager.cs

示例11: EsqueciMinhaSenhaPage

		public EsqueciMinhaSenhaPage()
		{
			var lblTexto = new Label
			{
				Style = Estilos._estiloFonteCategorias,
				YAlign = TextAlignment.Center,
				Text = AppResources.TextoEsqueciMinhaSenha
			};

			var entEmail = new Entry
			{
				Keyboard = Keyboard.Email
			};

			var btnEnviar = new Button
			{
				Text = AppResources.TextoResetarSenha,
				Style = Estilos._estiloPadraoButton,
				HorizontalOptions = LayoutOptions.Center
			};

			var mainLayout = new StackLayout
			{
				VerticalOptions = LayoutOptions.FillAndExpand,
				Orientation = StackOrientation.Horizontal,
				Padding = new Thickness(0, 20, 0, 0),
				Spacing = 10,
				Children = { lblTexto, entEmail, btnEnviar }
			};

			this.Content = mainLayout;
		}
开发者ID:jbravobr,项目名称:Mais-XamForms,代码行数:32,代码来源:EsqueciMinhaSenhaPage.cs

示例12: OnGroupAtlases

    public void OnGroupAtlases(BuildTarget target, PackerJob job, int[] textureImporterInstanceIDs)
    {
        List<Entry> entries = new List<Entry>();

        foreach (int instanceID in textureImporterInstanceIDs)
        {
            TextureImporter ti = EditorUtility.InstanceIDToObject(instanceID) as TextureImporter;

            //TextureImportInstructions ins = new TextureImportInstructions();
            //ti.ReadTextureImportInstructions(ins, target);

            TextureImporterSettings tis = new TextureImporterSettings();
            ti.ReadTextureSettings(tis);

            Sprite[] sprites = AssetDatabase.LoadAllAssetRepresentationsAtPath(ti.assetPath).Select(x => x as Sprite).Where(x => x != null).ToArray();
            foreach (Sprite sprite in sprites)
            {
                //在这里设置每个图集的参数
                Entry entry = new Entry();
                entry.sprite = sprite;
                entry.settings.format = (TextureFormat)Enum.Parse(typeof(TextureFormat), ParseTextuerFormat(ti.spritePackingTag).ToString());
                entry.settings.filterMode = FilterMode.Bilinear;
                entry.settings.colorSpace = ColorSpace.Linear;
                entry.settings.compressionQuality = (int)TextureCompressionQuality.Normal;
                entry.settings.filterMode = Enum.IsDefined(typeof(FilterMode), ti.filterMode) ? ti.filterMode : FilterMode.Bilinear;
                entry.settings.maxWidth = ParseTextureWidth(ti.spritePackingTag);
                entry.settings.maxHeight = ParseTextureHeight(ti.spritePackingTag);
                entry.atlasName = ParseAtlasName(ti.spritePackingTag);
                entry.packingMode = GetPackingMode(ti.spritePackingTag, tis.spriteMeshType);

                entries.Add(entry);
            }
            Resources.UnloadAsset(ti);
        }

        var atlasGroups =
            from e in entries
            group e by e.atlasName;
        foreach (var atlasGroup in atlasGroups)
        {
            int page = 0;
            // Then split those groups into smaller groups based on texture settings
            var settingsGroups =
                from t in atlasGroup
                group t by t.settings;
            foreach (var settingsGroup in settingsGroups)
            {
                string atlasName = atlasGroup.Key;
                if (settingsGroups.Count() > 1)
                    atlasName += string.Format(" (Group {0})", page);

                job.AddAtlas(atlasName, settingsGroup.Key);
                foreach (Entry entry in settingsGroup)
                {
                    job.AssignToAtlas(atlasName, entry.sprite, entry.packingMode, SpritePackingRotation.None);
                }
                ++page;
            }
        }
    }
开发者ID:l980305284,项目名称:UGUIPlugin,代码行数:60,代码来源:PackerPolicyByLiuJing.cs

示例13: AddPhone

    static string AddPhone(string name, IList<string> phones)
    {
        string result;

#if DEBUG
        //Console.WriteLine("Adding {0} - {1}", name, string.Join(", ", phones.Select(Phone.Parse)));
#endif

        if (byName.ContainsKey(name))
        {
            result = "Phone entry merged";
        }

        else
        {
            result = "Phone entry created";

            var entry = new Entry(name);

            byName.Add(name, entry);
        }

        foreach (var phone in phones)
        {
            var phoneParsed = Phone.Parse(phone);

            var entry = byName[name];

            entry.AddPhone(phoneParsed);
            byPhone[phoneParsed].Add(entry);
        }

        return result;
    }
开发者ID:dgrigorov,项目名称:TelerikAcademy-1,代码行数:34,代码来源:Program.cs

示例14: RegisterPage

        public RegisterPage()
        {
            var emailET = new Entry { Placeholder = "Email" };
            var passwordET = new Entry { Placeholder = "Password", IsPassword = true };
            /*
            var phoneET = new Entry { Placeholder =  "Phone *" };
            var languageET = new Entry { Placeholder =  "Language" };
            var currencyET = new Entry { Placeholder =  "Currency"};
            var nameET= new Entry { Placeholder =  "Name" };
            var surnameET= new Entry { Placeholder = "Surname" };
            var refET = new Entry { Placeholder =  "Referal code"};
            */
            var confirmBtn = new Button { Text = "CONFIRM" };
            confirmBtn.Clicked += async (object sender, EventArgs e) =>
            {
                if (emailET.Text.Length > 0 && passwordET.Text.Length > 0)
                {
                    bool registred = await Api.getInstanse().login(emailET.Text, passwordET.Text);
                    if (registred)
                    {
                        await Navigation.PushAsync(new MainPage());
                    }
                }

            };

            Content = new StackLayout {
                Children = {
                    emailET,
                    passwordET,
                    confirmBtn
                }
            };
        }
开发者ID:kor-ka,项目名称:xamarin_omdb,代码行数:34,代码来源:RegisterPage.cs

示例15: HelloWorld

   public HelloWorld() 
     {      
	win = new Window();
	win.Title = "Hello World";
	win.Name = "EWL_WINDOW";
	win.Class = "EWLWindow";
	win.SizeRequest(200, 100);
	win.DeleteEvent += winDelete;
	
	win.Show();
	
	lbl = new Entry();
	//lbl.SetFont("/usr/share/fonts/ttf/western/Adeventure.ttf", 12);
	//lbl.SetColor(255, 0 , 0 , 255);
	//lbl.Style = "soft_shadow";
	//lbl.SizeRequest(win.Width, win.Height);
	//lbl.Disable();
	lbl.ChangedEvent += new EwlEventHandler(txtChanged);
	lbl.Text = "Enlightenment";
	
	Console.WriteLine(lbl.Text);
	Console.WriteLine(lbl.Text);
	
	lbl.TabOrderPush();
	
	win.Append(lbl);
	
	lbl.Show();
	
     }
开发者ID:emtees,项目名称:old-code,代码行数:30,代码来源:ewl_sharp_test.cs


注:本文中的Entry类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。