FSpot.RotateOperation.Step C# (CSharp) Method

Step() public method

public Step ( ) : bool
return bool
                public bool Step ()
                {
                    if (done)
                        return false;
        
                    GLib.FileInfo info = GLib.FileFactory.NewForUri (item.DefaultVersion.Uri).QueryInfo ("access::can-write", GLib.FileQueryInfoFlags.None, null);
                    if (!info.GetAttributeBoolean("access::can-write")) {
                        throw new RotateException (Catalog.GetString ("Unable to rotate readonly file"), item.DefaultVersion.Uri, true);
                    }
        
                    Rotate (item.DefaultVersion.Uri, direction);

                    done = true;
                    return !done;
                }
        }

Usage Example

		protected override void OnActivated ()
		{
			try {
				RotateOperation op = new RotateOperation (item.Current, direction);
				
				while (op.Step ());
				
				item.Collection.MarkChanged (item.Index, FullInvalidate.Instance);
			} catch (Exception e) {
				Dialog d = new EditExceptionDialog (null, e, item.Current);
				d.Show ();
				d.Run ();
				d.Destroy ();
			}
			   
		}
All Usage Examples Of FSpot.RotateOperation::Step