示例#1
0
        protected override DetailsPane GetDetails()
        {
            DetailsPane details = new DetailsPane();

            details.AddLabelPair(Catalog.GetString("File:"), Hit.GetFirstProperty("beagle:ExactFilename"));

            string title = Hit.GetFirstProperty("dc:title");

            if (!String.IsNullOrEmpty(title))
            {
                details.AddLabelPair(Catalog.GetString("Title:"), title);
            }

            details.AddLabelPair(Catalog.GetString("Last Edited:"), Utils.NiceLongDate(Timestamp));

            if (Hit ["dc:author"] != null)
            {
                details.AddLabelPair(Catalog.GetString("Author:"), Hit ["dc:author"]);
            }

            details.AddLabelPair(Catalog.GetString("Full Path:"), Hit.Uri.LocalPath);
            details.AddSnippet();

            return(details);
        }
示例#2
0
文件: Engine.cs 项目: Ratstool/Zeds
        protected override void Initialize()
        {
            Textures.LoadTextures(this.Content);

            #region Camera
            Camera           = new Camera(Graphics.GraphicsDevice);
            CameraPosition.X = Graphics.PreferredBackBufferWidth * 1.0f / 2;
            CameraPosition.Y = Graphics.PreferredBackBufferHeight * 1.0f / 2;
            #endregion

            #region Screen Setup
            //ResolutionHandler.resolution = ResolutionHandler.Resolution.Three;

            //ToDo 3 Fix to draw background texture to fill all of the background
            MapSizeX = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width;
            MapSizeY = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height;

            SpriteBatch = new SpriteBatch(GraphicsDevice);

            Window.Title = "Zeds - Alpha " + versionNumber;
            #endregion

            #region Mouse
            IsMouseVisible     = false;
            MouseCoordinates.X = Graphics.PreferredBackBufferWidth * 1.0f / 2;
            MouseCoordinates.Y = Graphics.PreferredBackBufferWidth * 1.0f / 2;
            KeyBindings.PreviousScrollValue = 0;
            #endregion

            //Initial set up
            HQ.HQSetup();
            HumanNames.PopulateNamesLists();

            HumanSpawner.SpawnHumans();
            GrantStartingItems.PopulateItemList();

            #region Terrain
            GrassTufts.CreateGrassTufts();
            Bushes.CreateBushes();
            Trees.CreateTrees();
            Trees.CreateTreeFoliage();
            #endregion

            #region Build Menu
            BuildingPlacementHandler.SelectedStructure = BuildingSelected.None;

            PopulateBuildMenus.PopulateMenuIconList();
            BuildMenuPane.InitialiseBuildMenuLocation();
            BuildMenuPane.IsBuildMenuWindowVisible = true;
            BuildMenuRollOverText.UpdateRollOverTextPosition();
            #endregion

            DetailsPane.CreateDetailsPane(new Vector2((ScreenWidth / 2) - (Textures.DetailsWindowPane.Width / 2), 10), "");

            base.Initialize();

            ZedController.PopulateZedList();

            Grid.SetUpGrid();
        }
示例#3
0
 protected override void AddDetails()
 {
     if (!string.IsNullOrEmpty(this.DetailsUrl))
     {
         DetailsPane detailsPane = new DetailsPane();
         detailsPane.SuppressFrameCache = true;
         detailsPane.CssClass           = "rolePickerDetailsPane";
         detailsPane.ID         = "DetailedContent";
         detailsPane.SourceID   = base.ListView.ID;
         detailsPane.BaseUrl    = this.DetailsUrl;
         detailsPane.FrameTitle = Strings.ViewDetails;
         base.IsMasterDetailed  = true;
         Table table = new Table();
         table.CssClass    = "masterDetailsTable";
         table.BorderWidth = Unit.Pixel(0);
         table.CellPadding = 0;
         table.CellSpacing = 0;
         TableRow  tableRow  = new TableRow();
         TableCell tableCell = new TableCell();
         tableCell.CssClass      = "rolePickerListCell";
         tableCell.VerticalAlign = VerticalAlign.Top;
         tableCell.Controls.Add(base.ListView);
         tableRow.Cells.Add(tableCell);
         TableCell tableCell2 = new TableCell();
         tableCell2.CssClass = "rolePickerDetailsCell";
         tableCell2.Controls.Add(detailsPane);
         tableRow.Cells.Add(tableCell2);
         table.Rows.Add(tableRow);
         base.ContentPanel.Controls.Add(table);
         return;
     }
     base.AddDetails();
 }
示例#4
0
		protected override DetailsPane GetDetails ()
		{
			DetailsPane details = new DetailsPane ();
				
			details.AddTitleLabel (Title);
			
			string org = Hit.GetFirstProperty ("fixme:Org");
			string title = Hit.GetFirstProperty ("fixme:Title");
			string email = Hit.GetFirstProperty ("fixme:Email");
			string mobile_phone = Hit.GetFirstProperty ("fixme:MobilePhone");
			string work_phone = Hit.GetFirstProperty ("fixme:BusinessPhone");
			string home_phone = Hit.GetFirstProperty ("fixme:HomePhone");
			
			if (org != null && org != "")
				details.AddTextLabel (org);
			if (title != null && title != "")
				details.AddTextLabel (title);

			details.AddNewLine ();

			if (email != null && email != "")
				details.AddLabelPair (Catalog.GetString ("E-Mail:"), email);
			if (mobile_phone != null && mobile_phone != "")
				details.AddLabelPair (Catalog.GetString ("Mobile Phone:"), mobile_phone);
			if (work_phone != null && work_phone != "")
				details.AddLabelPair (Catalog.GetString ("Work Phone:"), work_phone);
			if (home_phone != null && home_phone != "")
				details.AddLabelPair (Catalog.GetString ("Home Phone:"), home_phone);
			
			return details;
		}
示例#5
0
		protected override DetailsPane GetDetails ()
		{
			DetailsPane details = new DetailsPane ();

			details.AddLabelPair (Catalog.GetString ("Title:"), Title);

			if (!String.IsNullOrEmpty (Description))
				details.AddLabelPair (Catalog.GetString ("Description:"), Description);
			
			if (!String.IsNullOrEmpty (Hit.GetFirstProperty ("fixme:starttime"))) {
				Console.WriteLine ("1. " + Hit.GetFirstProperty ("fixme:starttime"));
				string time = Utils.NiceShortTime (Hit.GetFirstProperty ("fixme:starttime"));
				Console.WriteLine ("2. " + time);
				
				if (!String.IsNullOrEmpty (Hit.GetFirstProperty ("fixme:endtime")))
				    time = String.Format ("{0} - {1}", time, Utils.NiceShortTime (Hit.GetFirstProperty ("fixme:endtime")));

				details.AddLabelPair (Catalog.GetString ("Time:"), time);
			}

			if (!String.IsNullOrEmpty (Hit.GetFirstProperty ("fixme:location")))
				details.AddLabelPair (Catalog.GetString ("Location:"), Hit.GetFirstProperty ("fixme:location"));

			string[] attendees = Hit.GetProperties ("fixme:attendee");
			if (attendees != null && attendees.Length > 0)
				details.AddLabelPair (Catalog.GetString ("Attendees:"), String.Join (", ", attendees));

			return details;
		}
示例#6
0
        protected override DetailsPane GetDetails()
        {
            DetailsPane details = new DetailsPane();

            bool sent = (Utils.GetFirstPropertyOfParent(Hit, "fixme:isSent") != null);

            details.AddLabelPair(Catalog.GetString("Subject:"), SubjectLabel.Text);

            string label = sent ? Catalog.GetString("To:") : Catalog.GetString("From:");

            details.AddLabelPair(label, GetAddress(Hit));

            label = sent ? Catalog.GetString("Date Sent:") : Catalog.GetString("Date Received:");
            details.AddLabelPair(label, Utils.NiceLongDate(Timestamp));

            string folder = Hit.GetFirstProperty("fixme:folder");

            if (folder != null)
            {
                details.AddLabelPair(Catalog.GetString("Folder:"), folder);
            }

            details.AddSnippet();

            return(details);
        }
示例#7
0
		protected override DetailsPane GetDetails ()
		{
			DetailsPane details = new DetailsPane ();

			details.AddTitleLabel (Title);
			details.AddLabelPair (Catalog.GetString ("Last Edited:"), Utils.NiceLongDate (Hit.DirectoryInfo.LastWriteTimeUtc));
			details.AddLabelPair (Catalog.GetString ("Full Path:"), Hit.Uri.LocalPath);
			details.AddTextLabel (Description);

			return details;
		}
示例#8
0
        protected override DetailsPane GetDetails()
        {
            DetailsPane details = new DetailsPane();

            details.AddLabelPair(Catalog.GetString("Title:"), Hit ["dc:title"]);
            details.AddLabelPair(Catalog.GetString("Site:"), Hit ["dc:identifier"]);
            details.AddLabelPair(Catalog.GetString("Date Viewed:"), Utils.NiceLongDate(Timestamp));
            details.AddSnippet();

            return(details);
        }
示例#9
0
        protected override DetailsPane GetDetails()
        {
            DetailsPane details = new DetailsPane();

            details.AddTitleLabel(Title);
            details.AddLabelPair(Catalog.GetString("Last Edited:"), Utils.NiceLongDate(Hit.DirectoryInfo.LastWriteTimeUtc));
            details.AddLabelPair(Catalog.GetString("Full Path:"), Hit.Uri.LocalPath);
            details.AddTextLabel(Description);

            return(details);
        }
示例#10
0
        protected override DetailsPane GetDetails()
        {
            DetailsPane details = new DetailsPane();

            details.AddLabelPair(Catalog.GetString("Title:"), Title);
            details.AddLabelPair(Catalog.GetString("URL:"), Hit.Uri.ToString());
            details.AddLabelPair(Catalog.GetString("Accessed:"), Utils.NiceLongDate(Timestamp));
            details.AddSnippet();

            return(details);
        }
示例#11
0
		protected override DetailsPane GetDetails ()
		{
			DetailsPane details = new DetailsPane ();

			details.AddLabelPair (Catalog.GetString ("Title:"), Hit ["dc:title"]);
			details.AddLabelPair (Catalog.GetString ("Site:"), Hit ["dc:identifier"]);
			details.AddLabelPair (Catalog.GetString ("Date Viewed:"), Utils.NiceLongDate (Timestamp));
			details.AddSnippet ();

			return details;
		}
示例#12
0
		protected override DetailsPane GetDetails ()
		{
			DetailsPane details = new DetailsPane ();

			details.AddLabelPair (Catalog.GetString ("Title:"), Title);
			details.AddLabelPair (Catalog.GetString ("URL:"), Hit.Uri.ToString ());
			details.AddLabelPair (Catalog.GetString ("Accessed:"), Utils.NiceLongDate (Timestamp));
			details.AddSnippet ();

			return details;
		}
示例#13
0
        protected override DetailsPane GetDetails()
        {
            DetailsPane details = new DetailsPane();

            details.AddTitleLabel(Title);
            details.AddTextLabel(Description);
            details.AddNewLine();

            details.AddLabelPair(Catalog.GetString("Modified:"), Utils.NiceVeryLongDate(Hit.FileInfo.LastWriteTime));
            details.AddLabelPair(Catalog.GetString("Full Path:"), Hit.Uri.LocalPath);

            return(details);
        }
示例#14
0
		protected override DetailsPane GetDetails ()
		{
			DetailsPane details = new DetailsPane ();

			details.AddTitleLabel (Title);
			details.AddTextLabel (Description);
			details.AddNewLine ();

			details.AddLabelPair (Catalog.GetString ("Modified:"), Utils.NiceVeryLongDate (Hit.FileInfo.LastWriteTime));
			details.AddLabelPair (Catalog.GetString ("Full Path:"), Hit.Uri.LocalPath);

			return details;
		}
示例#15
0
		protected override DetailsPane GetDetails ()
		{
			DetailsPane details = new DetailsPane ();

			details.AddLabelPair (Catalog.GetString ("Title:"), Title);

			if (!String.IsNullOrEmpty (Description))
				details.AddLabelPair (Catalog.GetString ("Description:"), Description);
			
			if (!String.IsNullOrEmpty (Hit.GetFirstProperty ("fixme:starttime")))
				details.AddLabelPair (Catalog.GetString ("Date:"), Utils.NiceShortDate (Hit.GetFirstProperty ("fixme:starttime")));
			
			return details;
		}
示例#16
0
		protected override DetailsPane GetDetails ()
		{
			DetailsPane details = new DetailsPane ();

			details.AddLabelPair (Catalog.GetString ("Title:"), Title);
			details.AddLabelPair (Catalog.GetString ("Last Edited:"), Utils.NiceLongDate (Timestamp));
			
			if(! String.IsNullOrEmpty (Hit.GetFirstProperty ("note:tag"))) {
				string tags = String.Join (", ", Hit.GetProperties ("note:tag"));
				details.AddLabelPair (Catalog.GetString ("Tags:"), tags);
			}
			
			details.AddSnippet ();

			return details;
		}
示例#17
0
        protected override DetailsPane GetDetails()
        {
            DetailsPane details = new DetailsPane();

            details.AddLabelPair(Catalog.GetString("Title:"), Title);
            details.AddLabelPair(Catalog.GetString("Last Edited:"), Utils.NiceLongDate(Timestamp));

            if (!String.IsNullOrEmpty(Hit.GetFirstProperty("note:tag")))
            {
                string tags = String.Join(", ", Hit.GetProperties("note:tag"));
                details.AddLabelPair(Catalog.GetString("Tags:"), tags);
            }

            details.AddSnippet();

            return(details);
        }
示例#18
0
        protected override DetailsPane GetDetails()
        {
            DetailsPane details = new DetailsPane();

            details.AddLabelPair(Catalog.GetString("Title:"), Title);

            if (!String.IsNullOrEmpty(Description))
            {
                details.AddLabelPair(Catalog.GetString("Description:"), Description);
            }

            if (!String.IsNullOrEmpty(Hit.GetFirstProperty("fixme:starttime")))
            {
                details.AddLabelPair(Catalog.GetString("Date:"), Utils.NiceShortDate(Hit.GetFirstProperty("fixme:starttime")));
            }

            return(details);
        }
示例#19
0
        protected override DetailsPane GetDetails()
        {
            DetailsPane details = new DetailsPane();

            details.AddTitleLabel(Title);

            string org          = Hit.GetFirstProperty("fixme:Org");
            string title        = Hit.GetFirstProperty("fixme:Title");
            string email        = Hit.GetFirstProperty("fixme:Email");
            string mobile_phone = Hit.GetFirstProperty("fixme:MobilePhone");
            string work_phone   = Hit.GetFirstProperty("fixme:BusinessPhone");
            string home_phone   = Hit.GetFirstProperty("fixme:HomePhone");

            if (org != null && org != "")
            {
                details.AddTextLabel(org);
            }
            if (title != null && title != "")
            {
                details.AddTextLabel(title);
            }

            details.AddNewLine();

            if (email != null && email != "")
            {
                details.AddLabelPair(Catalog.GetString("E-Mail:"), email);
            }
            if (mobile_phone != null && mobile_phone != "")
            {
                details.AddLabelPair(Catalog.GetString("Mobile Phone:"), mobile_phone);
            }
            if (work_phone != null && work_phone != "")
            {
                details.AddLabelPair(Catalog.GetString("Work Phone:"), work_phone);
            }
            if (home_phone != null && home_phone != "")
            {
                details.AddLabelPair(Catalog.GetString("Home Phone:"), home_phone);
            }

            return(details);
        }
示例#20
0
		protected override DetailsPane GetDetails ()
		{
			DetailsPane details = new DetailsPane ();

			details.AddLabelPair (Catalog.GetString ("File:"), Hit.GetFirstProperty ("beagle:ExactFilename"));

			string title = Hit.GetFirstProperty ("dc:title");
			if (! String.IsNullOrEmpty (title))
				details.AddLabelPair (Catalog.GetString ("Title:"), title);

			details.AddLabelPair (Catalog.GetString ("Inside File:"), Hit.Uri.LocalPath);

			if (Hit ["dc:author"] != null)
				details.AddLabelPair (Catalog.GetString ("Author:"), Hit ["dc:author"]);

			details.AddSnippet ();

			return details;
		}
示例#21
0
        protected override DetailsPane GetDetails()
        {
            DetailsPane details = new DetailsPane();

            // FIXME: The icon needs a nice frame as in the spec (?)

            details.AddTitleLabel(Title);
            details.AddTextLabel(Description);
            details.AddNewLine();

            string[] tags = Hit.GetProperties("dc:subject");
            if (tags != null && tags.Length > 0)
            {
                details.AddLabelPair(Catalog.GetString("Tags:"), String.Join(", ", tags));
            }

            details.AddLabelPair(Catalog.GetString("Modified:"), Utils.NiceVeryLongDate(Hit.FileInfo.LastWriteTime));
            details.AddLabelPair(Catalog.GetString("Full Path:"), Hit.Uri.LocalPath);

            // Get comments from the image.  FIXME: These should be unified into a single field.
            string comment = Hit.GetFirstProperty("png:comment");

            if (String.IsNullOrEmpty(comment))
            {
                comment = Hit.GetFirstProperty("jfif:Comment");
            }

            if (!String.IsNullOrEmpty(comment))
            {
                details.AddLabelPair(Catalog.GetString("Comment:"), comment);
                //details.AddNewLine ();
                //details.AddTextLabel (comment);
            }

            if (Hit ["fspot:Description"] != null && Hit ["fspot:Description"] != "")
            {
                details.AddNewLine();
                details.AddTextLabel(Hit ["fspot:Description"]);
            }

            return(details);
        }
示例#22
0
        protected override DetailsPane GetDetails()
        {
            DetailsPane details = new DetailsPane();

            details.Icon.Pixbuf = LoadBuddyIcon();
            details.AddLabelPair(Catalog.GetString("Name:"), FromLabel.Text);
            details.AddLabelPair(Catalog.GetString("Date Received:"), Utils.NiceLongDate(Timestamp));
#if ENABLE_GALAGO
            string status = GetBuddyStatus();
            if (status != null && status != "")
            {
                details.AddLabelPair(Catalog.GetString("Status:"), GetBuddyStatus());
            }
#endif
            details.AddSnippet();

            GotSnippet += SetSubject;

            return(details);
        }
示例#23
0
        protected override DetailsPane GetDetails()
        {
            DetailsPane details = new DetailsPane();

            details.AddLabelPair(Catalog.GetString("Title:"), Title);

            if (!String.IsNullOrEmpty(Description))
            {
                details.AddLabelPair(Catalog.GetString("Description:"), Description);
            }

            if (!String.IsNullOrEmpty(Hit.GetFirstProperty("fixme:starttime")))
            {
                Console.WriteLine("1. " + Hit.GetFirstProperty("fixme:starttime"));
                string time = Utils.NiceShortTime(Hit.GetFirstProperty("fixme:starttime"));
                Console.WriteLine("2. " + time);

                if (!String.IsNullOrEmpty(Hit.GetFirstProperty("fixme:endtime")))
                {
                    time = String.Format("{0} - {1}", time, Utils.NiceShortTime(Hit.GetFirstProperty("fixme:endtime")));
                }

                details.AddLabelPair(Catalog.GetString("Time:"), time);
            }

            if (!String.IsNullOrEmpty(Hit.GetFirstProperty("fixme:location")))
            {
                details.AddLabelPair(Catalog.GetString("Location:"), Hit.GetFirstProperty("fixme:location"));
            }

            string[] attendees = Hit.GetProperties("fixme:attendee");
            if (attendees != null && attendees.Length > 0)
            {
                details.AddLabelPair(Catalog.GetString("Attendees:"), String.Join(", ", attendees));
            }

            return(details);
        }
示例#24
0
		protected override DetailsPane GetDetails ()
		{
			DetailsPane details = new DetailsPane ();

			// FIXME: The icon needs a nice frame as in the spec (?)

			details.AddTitleLabel (Title);
			details.AddTextLabel (Description);
			details.AddNewLine ();

			string[] tags = Hit.GetProperties ("dc:subject");
			if (tags != null && tags.Length > 0)
				details.AddLabelPair (Catalog.GetString ("Tags:"), String.Join (", ", tags));

			details.AddLabelPair (Catalog.GetString ("Modified:"), Utils.NiceVeryLongDate (Hit.FileInfo.LastWriteTime));
			details.AddLabelPair (Catalog.GetString ("Full Path:"), Hit.Uri.LocalPath);

			// Get comments from the image.  FIXME: These should be unified into a single field.
			string comment = Hit.GetFirstProperty ("png:comment");

			if (String.IsNullOrEmpty (comment))
				comment = Hit.GetFirstProperty ("jfif:Comment");

			if (! String.IsNullOrEmpty (comment)) {
				details.AddLabelPair (Catalog.GetString ("Comment:"), comment);
				//details.AddNewLine ();
				//details.AddTextLabel (comment);
			}

			if (Hit ["fspot:Description"] != null && Hit ["fspot:Description"] != "") {
				details.AddNewLine ();
				details.AddTextLabel (Hit ["fspot:Description"]);
			}

			return details;
		}
示例#25
0
		protected override DetailsPane GetDetails ()
		{
			DetailsPane details = new DetailsPane ();

			bool sent = (Utils.GetFirstPropertyOfParent (Hit, "fixme:isSent") != null);

			details.AddLabelPair (Catalog.GetString ("Subject:"), SubjectLabel.Text);

			string label = sent ? Catalog.GetString ("To:") : Catalog.GetString ("From:");
			details.AddLabelPair (label, GetAddress (Hit));

			label = sent ? Catalog.GetString ("Date Sent:") : Catalog.GetString ("Date Received:");
			details.AddLabelPair (label, Utils.NiceLongDate (Timestamp));

			string folder = Hit.GetFirstProperty ("fixme:folder");

			if (folder != null)
				details.AddLabelPair (Catalog.GetString ("Folder:"), folder);
			
			details.AddSnippet ();
			
			return details;
		}
示例#26
0
		protected override DetailsPane GetDetails ()
		{
			DetailsPane details = new DetailsPane ();

			details.Icon.Pixbuf = LoadBuddyIcon ();			
			details.AddLabelPair (Catalog.GetString ("Name:"), FromLabel.Text);
			details.AddLabelPair (Catalog.GetString ("Date Received:"), Utils.NiceLongDate (Timestamp));
#if ENABLE_GALAGO
			string status = GetBuddyStatus();
			if (status != null && status != "")
				details.AddLabelPair (Catalog.GetString ("Status:"), GetBuddyStatus());
#endif		
			details.AddSnippet ();
			
			GotSnippet += SetSubject;

			return details;
		}