• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Entry类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: GetApplicableMembers

        /// <summary>
        ///   Collects a list of usable routed events from the specified target game object.
        /// </summary>
        /// <param name="target">Game object to get all usable routes events of.</param>
        /// <returns>Usable routed events from the specified target game object.</returns>
        protected override List<Entry> GetApplicableMembers(GameObject target)
        {
            MonoBehaviour[] components = target.GetComponents<MonoBehaviour>();

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

            foreach (MonoBehaviour monoBehaviour in components)
            {
                if (monoBehaviour == null)
                {
                    continue;
                }

                FieldInfo[] fields = monoBehaviour.GetType().GetFields(BindingFlags.Instance | BindingFlags.Public);

                foreach (FieldInfo info in fields)
                {
                    if (info.FieldType != typeof(ViewEvent))
                    {
                        continue;
                    }

                    Entry entry = new Entry { Target = monoBehaviour, MemberName = info.Name };
                    list.Add(entry);
                }
            }
            return list;
        }
开发者ID:jixiang111,项目名称:slash-framework,代码行数:33,代码来源:ViewEventDelegateDrawer.cs


示例17: Execute

 public void Execute()
 {
     if (_count == 0)
     {
         return;
     }
     Entry head;
     lock (this)
     {
         head = this._head;
         this._head = null;
     }
     for (; head != null; )
     {
         try
         {
             head.update.Action();
         }
         catch (System.Exception)
         {
         }
         head = head.next;
     }
     _count = 0;
 }
开发者ID:darragh-murphy,项目名称:LGame,代码行数:25,代码来源:CallQueue.cs


示例18: Init

        protected override void Init()
        {
            var label = new Label { Text = "Label" };
            var entry = new Entry { AutomationId = "entry" };
            var grid = new Grid();

            grid.Children.Add(label, 0, 0);
            grid.Children.Add(entry, 1, 0);
            var tableView = new TableView
            {
                Root = new TableRoot
                {
                    new TableSection
                    {
                        new ViewCell
                        {
                            View = grid
                        }
                    }
                }
            };

            Content = new StackLayout
            {
                Children = { tableView }
            };
        }
开发者ID:Costo,项目名称:Xamarin.Forms,代码行数:27,代码来源:Bugzilla36559.cs


示例19: Store

 public void Store(Entry entry)
 {
     lock (_cache)
     {
         _cache[entry.Key] = entry;
     }
 }
开发者ID:dtabuenc,项目名称:spark,代码行数:7,代码来源:CompiledViewHolder.cs


示例20: LoginPage

        public LoginPage(ILoginManager ilm)
        {
            var button = new Button { Text = "Login" };
            button.Clicked += (sender, e) => {
                if (String.IsNullOrEmpty(username.Text) || String.IsNullOrEmpty(password.Text))
                {
                    DisplayAlert("Validation Error", "Username and Password are required", "Re-try");
                } else {
                    // REMEMBER LOGIN STATUS!

                    App.Current.Properties["IsLoggedIn"] = true;
                    ilm.ShowMainPage();
                }
            };

            username = new Entry { Text = "" };
            password = new Entry { Text = "" };
            Content = new StackLayout {
                Padding = new Thickness (10, 40, 10, 10),
                Children = {
                    new Label { Text = "Login", FontSize = Device.GetNamedSize(NamedSize.Large, typeof(Label)) },
                    new Label { Text = "Username" },
                    username,
                    new Label { Text = "Password" },
                    password,
                    button
                }
            };
        }
开发者ID:henrytranvan,项目名称:HSFFinance,代码行数:29,代码来源:LoginPage.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# EntryType类代码示例发布时间:2022-05-24
下一篇:
C# EntityTypeConfiguration类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap