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


C# Gnome类代码示例

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


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

示例1: VolumeSource

		public VolumeSource (Gnome.Vfs.Volume vol)
		{
			this.Volume = vol;
			this.Name = vol.DisplayName;

			try {
				mount_point = new Uri (vol.ActivationUri).LocalPath;
			} catch (System.Exception e) {
				System.Console.WriteLine (e);
			}

			uri = mount_point;
			
                        if (this.Icon == null)
				this.Icon = PixbufUtils.LoadThemeIcon (vol.Icon, 32);
			
			if (this.IsIPodPhoto)
				this.Icon = PixbufUtils.LoadThemeIcon ("gnome-dev-ipod", 32);

			if (this.Icon == null && this.IsCamera)
				this.Icon = PixbufUtils.LoadThemeIcon ("gnome-dev-media-cf", 32);

			try {
				if (this.Icon == null)
					this.Icon = new Gdk.Pixbuf (vol.Icon);
			} catch (System.Exception e) {
				System.Console.WriteLine (e.ToString ());
			}
		}
开发者ID:AminBonyadUni,项目名称:facedetect-f-spot,代码行数:29,代码来源:ImportCommand.cs

示例2: LookupIcon

		public string LookupIcon(string icon_name, int size, Gnome.IconData icon_data, out int base_size) {
			IntPtr native_icon_name = GLib.Marshaller.StringToPtrGStrdup (icon_name);
			IntPtr raw_ret = gnome_icon_theme_lookup_icon(Handle, native_icon_name, size, ref icon_data, out base_size);
			GLib.Marshaller.Free (native_icon_name);
			string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
			return ret;
		}
开发者ID:directhex,项目名称:xamarin-gnome-sharp2,代码行数:7,代码来源:IconTheme.cs

示例3: MyPrint

 void MyPrint(Gnome.PrintContext gpc)
 {
     gpc.BeginPage ("demo");
     gpc.MoveTo (1, 700);
     gpc.Show (tv.Buffer.Text);
     gpc.ShowPage ();
 }
开发者ID:mono,项目名称:gnome-desktop-sharp,代码行数:7,代码来源:PrintSample.cs

示例4: RemoveBlockMutation

        public RemoveBlockMutation(Coordinate Location, Gnome Gnome)
        {
            this.MutationTimeFrame = MutationTimeFrame.BeforeUpdatingConnectivity;

            this.Location = Location;
            this.Gnome = Gnome;
        }
开发者ID:Blecki,项目名称:GnomeColony,代码行数:7,代码来源:RemoveBlockMutation.cs

示例5: PickupResourceMutation

        public PickupResourceMutation(Coordinate Location, String Resource, Gnome Gnome)
        {
            this.MutationTimeFrame = MutationTimeFrame.BeforeUpdatingConnectivity;

            this.Location = Location;
            this.Resource = Resource;
            this.Gnome = Gnome;
        }
开发者ID:Blecki,项目名称:GnomeColony,代码行数:8,代码来源:PickupResourceMutation.cs

示例6: UniqueName

		//FIXME: rewrite this as a Filter
	        public static Gnome.Vfs.Uri UniqueName (Gnome.Vfs.Uri path, string shortname)
	        {
	                int i = 1;
			Gnome.Vfs.Uri target = path.Clone();
	                Gnome.Vfs.Uri dest = target.AppendFileName(shortname);
	
	                while (dest.Exists) {
	                        string numbered_name = System.String.Format ("{0}-{1}{2}",
	                                                              System.IO.Path.GetFileNameWithoutExtension (shortname),
	                                                              i++,
	                                                              System.IO.Path.GetExtension (shortname));
	
	                	dest = target.AppendFileName(numbered_name);
	                }
	
	                return dest;
	        }
开发者ID:AminBonyadUni,项目名称:facedetect-f-spot,代码行数:18,代码来源:CDExport.cs

示例7: ApplyDamageSprite

    // Swaps out the sprite for this part based on what kind of damage was received
    public void ApplyDamageSprite(Gnome.DamageType damageType)
    {
        Sprite spriteToUse = null;

        switch (damageType) {

        case Gnome.DamageType.Burning:
            spriteToUse = burnedSprite;

            break;

        case Gnome.DamageType.Slicing:
            spriteToUse = detachedSprite;

            break;
        }

        if (spriteToUse != null) {
            GetComponent<SpriteRenderer>().sprite = spriteToUse;
        }
    }
开发者ID:thesecretlab,项目名称:MobileGameDevWithUnity1stEd,代码行数:22,代码来源:BodyPart.cs

示例8: Add

        public IResponseFormatter Add()
        {
            var skillDefinitions = GnomanEmpire.Instance.GetSkillDefs();
            var faction = GnomanEmpire.Instance.World.AIDirector.PlayerFaction;
            var entryPosition = faction.FindRegionEntryPosition();

            var gnomadRaceClassDefs = faction.FactionDef.Squads.SelectMany(squad => squad.Classes.Where(squadClass => squadClass.Name == "Gnomad")).ToList();
            Int32 defCount = gnomadRaceClassDefs.Count;
            Int32 raceClassDefIndex = GnomanEmpire.Instance.Rand.Next(defCount);
            var raceClassDef = gnomadRaceClassDefs[raceClassDefIndex];
            var gnomad = new Character(entryPosition, raceClassDef, faction.ID);
            gnomad.SetBehavior(BehaviorType.PlayerCharacter);

            Dictionary<String, Int32> orderedProfessions = GetBestProfessions(gnomad);
            var bestProfession = orderedProfessions.OrderByDescending(obj => obj.Value).First().Key;
            SetProfession(gnomad, bestProfession);

            GnomanEmpire.Instance.EntityManager.SpawnEntityImmediate(gnomad);
            GnomanEmpire.Instance.World.NotificationManager.AddNotification(String.Format("The Gnomad {0} has arrived and been assigned as a {1}", gnomad.Name(), bestProfession));

            Gnome gnome = new Gnome(gnomad, skillDefinitions);
            return JsonResponse(gnome);
        }
开发者ID:Rychard,项目名称:GnomeServer,代码行数:23,代码来源:GnomeController.cs

示例9: OnServerInformationPagePrepared

 private void OnServerInformationPagePrepared(object o, Gnome.PreparedArgs args)
 {
     this.Title = Util.GS("iFolder Account Assistant - (1 of 3)");
        UpdateServerInformationPageSensitivity(null, null);
        DomainInformation[] domains = domainController.GetDomains();
        if (domains != null && domains.Length > 0)
        {
     MakeDefaultLabel.Visible = true;
     DefaultServerCheckButton.Visible = true;
        }
        else
        {
     DefaultServerCheckButton.Active = true;
     MakeDefaultLabel.Visible = false;
     DefaultServerCheckButton.Visible = false;
        }
        ServerNameEntry.GrabFocus();
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:18,代码来源:AddAccountWizard.cs

示例10: MoveURIs

 public static void MoveURIs(Gnome.Vfs.Uri[] sources, Gnome.Vfs.Uri[] targets)
 {
     XferURIs (sources, targets, true);
 }
开发者ID:kig,项目名称:filezoo,代码行数:4,代码来源:helpers.cs

示例11: CopyURIs

 public static void CopyURIs(Gnome.Vfs.Uri[] sources, Gnome.Vfs.Uri[] targets)
 {
     XferURIs (sources, targets, false);
 }
开发者ID:kig,项目名称:filezoo,代码行数:4,代码来源:helpers.cs

示例12: ConsoleXferProgressCallback

 /** BLOCKING */
 public static int ConsoleXferProgressCallback(Gnome.Vfs.XferProgressInfo info)
 {
     switch (info.Status) {
       case Gnome.Vfs.XferProgressStatus.Vfserror:
     LogError("{0}: {1} in {2} -> {3}", info.Status, info.VfsStatus, info.SourceName, info.TargetName);
     return (int)Gnome.Vfs.XferErrorAction.Abort;
       case Gnome.Vfs.XferProgressStatus.Overwrite:
     LogError("{0}: {1} in {2} -> {3}", info.Status, info.VfsStatus, info.SourceName, info.TargetName);
     return (int)Gnome.Vfs.XferOverwriteAction.Abort;
       default:
     //         LogError("{0} / {1} {2} -> {3}", info.BytesCopied, info.BytesTotal, info.SourceName, info.TargetName);
     return 1;
     }
 }
开发者ID:kig,项目名称:filezoo,代码行数:15,代码来源:helpers.cs

示例13: OnImportKeyPagePrepared

 private void OnImportKeyPagePrepared(object o, Gnome.PreparedArgs args)
 {
     this.importDomain.Text = this.selectedDomainName+"-"+this.selectedDomainIP;
     ImportUpdateSensitivity();
     KeyRecoveryDruid.SetButtonsSensitive(true,false , true, true);
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:6,代码来源:KeyRecoveryWizard.cs

示例14: Item_Event

		void Item_Event (object obj, Gnome.CanvasEventArgs args) {
			EventButton ev = new EventButton (args.Event.Handle);
			CanvasRE item = (CanvasRE) obj;

			switch (ev.Type) {
			case EventType.ButtonPress:
				if (ev.Button == 1) {
					remember_x = ev.X;
					remember_y = ev.Y;
					args.RetVal = true;
					return;
				} else if (ev.Button == 3) {
					item.Destroy ();
					args.RetVal = true;
					return;
				}
				break;
			case EventType.TwoButtonPress:
				ChangeItemColor (item);
				args.RetVal = true;
				return;
			case EventType.MotionNotify:
				Gdk.ModifierType state = (Gdk.ModifierType) ev.State;
				if ((state & Gdk.ModifierType.Button1Mask) != 0) {
					double new_x = ev.X, new_y = ev.Y;
					item.Move (new_x - remember_x, new_y - remember_y);
					remember_x = new_x;
					remember_y = new_y;
					args.RetVal = true;
					return;
				}
				break;
			case EventType.EnterNotify:
				item.WidthUnits = 3.0;
				args.RetVal = true;
				return;
			case EventType.LeaveNotify:
				item.WidthUnits = 1.0;
				args.RetVal = true;
				return;
			}

			args.RetVal = false;
			return;
		}
开发者ID:directhex,项目名称:xamarin-gnome-sharp2,代码行数:45,代码来源:CanvasExample.cs

示例15: HandleMsg

		private void HandleMsg (Gnome.Vfs.ModuleCallback cb)
		{
			Gnome.Vfs.ModuleCallbackStatusMessage msg = cb as Gnome.Vfs.ModuleCallbackStatusMessage;
			System.Console.WriteLine ("{0}", msg.Message);
		}
开发者ID:AminBonyadUni,项目名称:facedetect-f-spot,代码行数:5,代码来源:FolderExport.cs


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