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


C# IBrowsableCollection类代码示例

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


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

示例1: Changed

		private void Changed (IBrowsableCollection query)
		{
			this.ClearMarks ();
			foreach (IBrowsableItem item in query.Items) {
				MarkDay ((uint)item.Time.Day);
			}
		}
开发者ID:guadalinex-archive,项目名称:guadalinex-v6,代码行数:7,代码来源:SimpleCalendar.cs

示例2: Run

		public void Run (IBrowsableCollection selection)
		{
			this.selection = selection;

			// Calculate the total size
			long total_size = 0;
			string path;
			System.IO.FileInfo file_info;

			foreach (IBrowsableItem item in selection.Items) {
				path = item.DefaultVersionUri.LocalPath;
				if (System.IO.File.Exists (path)) {
					file_info = new System.IO.FileInfo (path);
					total_size += file_info.Length;
				}
			}

			IconView view = new IconView (selection);
			view.DisplayDates = false;
			view.DisplayTags = false;

			Dialog.Modal = false;
			Dialog.TransientFor = null;
			
			size_label.Text = SizeUtil.ToHumanReadable (total_size);

			thumb_scrolledwindow.Add (view);
			Dialog.ShowAll ();

			//LoadHistory ();

			Dialog.Response += HandleResponse;
		}
开发者ID:AminBonyadUni,项目名称:facedetect-f-spot,代码行数:33,代码来源:CDExport.cs

示例3: Run

        public void Run(IBrowsableCollection selection)
        {
            dialog = new FacebookExportDialog (selection);

            if (selection.Items.Length > max_photos_per_album) {
                HigMessageDialog mbox = new HigMessageDialog (dialog,
                        Gtk.DialogFlags.DestroyWithParent | Gtk.DialogFlags.Modal, Gtk.MessageType.Error,
                        Gtk.ButtonsType.Ok, Catalog.GetString ("Too many images to export"),
                        String.Format (Catalog.GetString ("Facebook only permits {0} photographs per album.  Please refine your selection and try again."), max_photos_per_album));
                mbox.Run ();
                mbox.Destroy ();
                return;
            }

            if (dialog.Run () != (int)ResponseType.Ok) {
                dialog.Destroy ();
                return;
            }

            if (dialog.CreateAlbum) {
                string name = dialog.AlbumName;
                if (String.IsNullOrEmpty (name)) {
                    HigMessageDialog mbox = new HigMessageDialog (dialog, Gtk.DialogFlags.DestroyWithParent | Gtk.DialogFlags.Modal,
                            Gtk.MessageType.Error, Gtk.ButtonsType.Ok, Catalog.GetString ("Album must have a name"),
                            Catalog.GetString ("Please name your album or choose an existing album."));
                    mbox.Run ();
                    mbox.Destroy ();
                    return;
                }

                string description = dialog.AlbumDescription;
                string location = dialog.AlbumLocation;

                try {
                    album = dialog.Account.Facebook.CreateAlbum (name, description, location);
                }
                catch (FacebookException fe) {
                    HigMessageDialog mbox = new HigMessageDialog (dialog, Gtk.DialogFlags.DestroyWithParent | Gtk.DialogFlags.Modal,
                            Gtk.MessageType.Error, Gtk.ButtonsType.Ok, Catalog.GetString ("Creating a new album failed"),
                            String.Format (Catalog.GetString ("An error occurred creating a new album.\n\n{0}"), fe.Message));
                    mbox.Run ();
                    mbox.Destroy ();
                    return;
                }
            } else {
                album = dialog.ActiveAlbum;
            }

            if (dialog.Account != null) {
                dialog.Hide ();

                command_thread = new System.Threading.Thread (new System.Threading.ThreadStart (Upload));
                command_thread.Name = Mono.Unix.Catalog.GetString ("Uploading Pictures");

                progress_dialog = new ThreadProgressDialog (command_thread, selection.Items.Length);
                progress_dialog.Start ();
            }

            dialog.Destroy ();
        }
开发者ID:Yetangitu,项目名称:f-spot,代码行数:60,代码来源:FacebookExport.cs

示例4: CDExportDialog

        public CDExportDialog(IBrowsableCollection collection, System.Uri dest)
            : base(Assembly.GetExecutingAssembly (), "CDExport.ui", "cd_export_dialog")
        {
            this.dest = dest;

            // Calculate the total size
            long total_size = 0;
            string path;
            System.IO.FileInfo file_info;

            foreach (IPhoto item in collection.Items) {
                path = item.DefaultVersion.Uri.LocalPath;
                if (System.IO.File.Exists (path)) {
                    file_info = new System.IO.FileInfo (path);
                    total_size += file_info.Length;
                }
            }

            var view = new TrayView (collection);
            view.DisplayDates = false;
            view.DisplayTags = false;
            view.DisplayRatings = false;

            this.Modal = false;
            this.TransientFor = null;

            size_label.Text = Format.SizeForDisplay (total_size);

            thumb_scrolledwindow.Add (view);
            this.ShowAll ();

            previous_frame.Visible = !IsDestEmpty (dest);

            browse_button.Clicked += HandleBrowseExisting;
        }
开发者ID:Yetangitu,项目名称:f-spot,代码行数:35,代码来源:CDExportDialog.cs

示例5: Run

        public void Run(IBrowsableCollection selection)
        {
            dialog = new FacebookExportDialog (selection);

            if (selection.Items.Length > max_photos_per_album) {
                HigMessageDialog mbox = new HigMessageDialog (dialog,
                        Gtk.DialogFlags.DestroyWithParent | Gtk.DialogFlags.Modal, Gtk.MessageType.Error,
                        Gtk.ButtonsType.Ok, Catalog.GetString ("Too many images to export"),
                        String.Format (Catalog.GetString ("Facebook only permits {0} photographs per album.  Please refine your selection and try again."), max_photos_per_album));
                mbox.Run ();
                mbox.Destroy ();
                return;
            }

            if (dialog.Run () != (int)ResponseType.Ok) {
                dialog.Destroy ();
                return;
            }

            if (dialog.Account != null) {
                dialog.Hide ();

                command_thread = new System.Threading.Thread (new System.Threading.ThreadStart (Upload));
                command_thread.Name = Mono.Unix.Catalog.GetString ("Uploading Pictures");

                progress_dialog = new ThreadProgressDialog (command_thread, selection.Items.Length);
                progress_dialog.Start ();
            }

            dialog.Destroy ();
        }
开发者ID:iainlane,项目名称:f-spot,代码行数:31,代码来源:FacebookExport.cs

示例6: SelectionCollection

 public SelectionCollection(IBrowsableCollection collection)
 {
     this.selected_cells = new Dictionary<IPhoto, int> ();
     this.parent = collection;
     this.bit_array = new BitArray (this.parent.Count);
     this.parent.Changed += HandleParentChanged;
     this.parent.ItemsChanged += HandleParentItemsChanged;
 }
开发者ID:GNOME,项目名称:f-spot,代码行数:8,代码来源:SelectionCollection.cs

示例7: OriginalGallery

 public OriginalGallery(IBrowsableCollection selection, string path, string name)
     : base(selection, path, name)
 {
     requests = new ScaleRequest [] { new ScaleRequest ("hq", 0, 0, false),
                      new ScaleRequest ("mq", 800, 600, true),
                      new ScaleRequest ("lq", 640, 480, false, true),
                      new ScaleRequest ("thumbs", 120, 120, false) };
 }
开发者ID:Yetangitu,项目名称:f-spot,代码行数:8,代码来源:OriginalGallery.cs

示例8: BrowsablePointer

		public BrowsablePointer (IBrowsableCollection collection, int index)
		{
			this.collection = collection;
			this.Index = index;
			item = Current;

			collection.Changed += HandleCollectionChanged;
			collection.ItemsChanged += HandleCollectionItemsChanged;
		}
开发者ID:guadalinex-archive,项目名称:guadalinex-v6,代码行数:9,代码来源:BrowsablePointer.cs

示例9: MailImages

		public MailImages (IBrowsableCollection collection)
		{
			message = new MailMessage ();
			message.From = "[email protected]";
			message.To = "[email protected]";
			message.Subject = "test";

			EsmtpMail mail = new EsmtpMail ("smtp.gmail.com", "lewing", "ricedream");
			mail.Send (message)
		}
开发者ID:AminBonyadUni,项目名称:facedetect-f-spot,代码行数:10,代码来源:MailDialog.cs

示例10: RepairDialog

		public RepairDialog (IBrowsableCollection collection) : base ("RepairDialog.ui", "repair_dialog")
		{
			source = collection;
			missing = new PhotoList ();

			FindMissing ();
			TrayView view = new TrayView (missing);
			view_scrolled.Add (view);

			this.ShowAll ();
		}
开发者ID:Yetangitu,项目名称:f-spot,代码行数:11,代码来源:RepairDialog.cs

示例11: BrowsablePointer

        public BrowsablePointer(IBrowsableCollection collection, int index)
        {
            if (collection == null)
                throw new ArgumentNullException ("collection");

            this.collection = collection;
            Index = index;
            item = Current;

            collection.Changed += HandleCollectionChanged;
            collection.ItemsChanged += HandleCollectionItemsChanged;
        }
开发者ID:Yetangitu,项目名称:f-spot,代码行数:12,代码来源:BrowsablePointer.cs

示例12: Run

		public void Run (IBrowsableCollection p) {
			Console.WriteLine ("Executing ZipExport extension");
			if (p.Count == 0) {
				HigMessageDialog md = new HigMessageDialog (MainWindow.Toplevel.Window, DialogFlags.DestroyWithParent,
							  Gtk.MessageType.Error, ButtonsType.Ok,
							  Catalog.GetString ("No selection available"),
							  Catalog.GetString ("This tool requires an active selection. Please select one or more pictures and try again"));

				md.Run ();
				md.Destroy ();
				return;
			}
			photos = p.Items;
			ShowDialog ();
		}
开发者ID:guadalinex-archive,项目名称:guadalinex-v6,代码行数:15,代码来源:ZipExport.cs

示例13: FolderGallery

        internal FolderGallery(IBrowsableCollection selection, string path, string gallery_name)
        {
            if (null == selection)
                throw new ArgumentNullException ("selection");

            if (0 == selection.Count)
                throw new ArgumentException ("selection can't be empty");

            if (null == path)
                throw new ArgumentNullException ("path");

            if (null == gallery_name)
                throw new ArgumentNullException ("gallery_name");

            Collection = selection;
            GalleryName = gallery_name;
            GalleryPath = Path.Combine (path, GalleryName);
            this.requests = new ScaleRequest [] { ScaleRequest.Default };
        }
开发者ID:GNOME,项目名称:f-spot,代码行数:19,代码来源:FolderGallery.cs

示例14: AdjustTimeDialog

        public AdjustTimeDialog(Db db, IBrowsableCollection collection)
            : base("AdjustTimeDialog.ui", "time_dialog")
        {
            this.db = db;
            this.collection = collection;

            tray = new TrayView (collection);
            tray_scrolled.Add (tray);
            tray.Selection.Changed += HandleSelectionChanged;

            view = new PhotoImageView (collection);
            view_scrolled.Add (view);
            Item = view.Item;
            Item.Changed += HandleItemChanged;
            Item.MoveFirst ();

            //forward_button.Clicked += HandleForwardClicked;
            //back_button.Clicked += HandleBackClicked;
            ok_button.Clicked += HandleOkClicked;
            cancel_button.Clicked += HandleCancelClicked;

            photo_spin.ValueChanged += HandleSpinChanged;
            photo_spin.SetIncrements (1.0, 1.0);
            photo_spin.Adjustment.StepIncrement = 1.0;
            photo_spin.Wrap = true;

            date_edit.TimeChanged += HandleTimeChanged;
            date_edit.DateChanged += HandleTimeChanged;
            Gtk.Entry entry = (Gtk.Entry) date_edit.Children [0];
            entry.Changed += HandleTimeChanged;
            entry = (Gtk.Entry) date_edit.Children [2];
            entry.Changed += HandleTimeChanged;
            offset_entry.Changed += HandleOffsetChanged;
            ShowAll ();
            HandleCollectionChanged (collection);

            spacing_entry.Changed += HandleSpacingChanged;
            spacing_entry.Sensitive = ! difference_check.Active;

            difference_check.Toggled += HandleActionToggled;
        }
开发者ID:iainlane,项目名称:f-spot,代码行数:41,代码来源:AdjustTimeDialog.cs

示例15: PhotoImageView

		public PhotoImageView (IBrowsableCollection query)
		{
			loader = new FSpot.AsyncPixbufLoader ();
			loader.AreaUpdated += HandlePixbufAreaUpdated;
			loader.AreaPrepared += HandlePixbufPrepared;
			loader.Done += HandleDone;

			Accelerometer.OrientationChanged += HandleOrientationChanged;

			HandleRealized (null, null);

			this.SizeAllocated += HandleSizeAllocated;
			this.KeyPressEvent += HandleKeyPressEvent;
			//this.Realized += HandleRealized;
			this.Unrealized += HandleUnrealized;
			this.ScrollEvent += HandleScrollEvent;
			this.item = new BrowsablePointer (query, -1);
			item.Changed += PhotoItemChanged;
			this.Destroyed += HandleDestroyed;
			this.SetTransparentColor (this.Style.BaseColors [(int)Gtk.StateType.Normal]);
		}
开发者ID:AminBonyadUni,项目名称:facedetect-f-spot,代码行数:21,代码来源:PhotoImageView.cs


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