Ejemplo n.º 1
0
        private static void PrintHelp(NDesk.Options.OptionSet options)
        {
            Logger.WriteLine("{0} Utility, Version: {1}", Tiled2Unity.Info.GetLibraryName(), Tiled2Unity.Info.GetVersion());
            Logger.WriteLine("Usage: {0} [OPTIONS]+ TMXPATH [UNITYDIR]", Tiled2Unity.Info.GetLibraryName());
            Logger.WriteLine("Example: {0} -s=0.01 MyTiledMap.tmx ../../MyUnityProjectFolder/Assets/Tiled2Unity", Tiled2Unity.Info.GetLibraryName());
            Logger.WriteLine("");
            Logger.WriteLine("Options:");

            TextWriter writer = new StringWriter();
            options.WriteOptionDescriptions(writer);
            Logger.WriteLine(writer.ToString());

            Logger.WriteLine("Prefab object properties (set in TMX file for map or Tile/Object layer properties)");
            Logger.WriteLine("  unity:sortingLayerName");
            Logger.WriteLine("  unity:sortingOrder");
            Logger.WriteLine("  unity:layer");
            Logger.WriteLine("  unity:tag");
            Logger.WriteLine("  unity:scale");
            Logger.WriteLine("  unity:isTrigger");
            Logger.WriteLine("  unity:convex");
            Logger.WriteLine("  unity:ignore (value = [false|true|collision|visual])");
            Logger.WriteLine("  unity:resource (value = [false|true])");
            Logger.WriteLine("  unity:resourcePath");
            Logger.WriteLine("  (Other properties are exported for custom scripting in your Unity project)");
            Logger.WriteLine("Support Tiled Map Editor on Patreon: https://www.patreon.com/bjorn");
            Logger.WriteLine("Make a donation for Tiled2Unity: http://www.seanba.com/donate");
        }
        public static Type DefineHandler(ModuleBuilder modB, NDesk.DBus.Introspection.Signal declSignal)
        {
            string dlgName = declSignal.Name + "Handler";
            TypeBuilder handlerB = modB.DefineType (dlgName, TypeAttributes.Public | TypeAttributes.Class | TypeAttributes.Sealed | TypeAttributes.AnsiClass | TypeAttributes.AutoClass, typeof (System.MulticastDelegate));
            const MethodAttributes mattr = MethodAttributes.Public | MethodAttributes.HideBySig | MethodAttributes.Virtual | MethodAttributes.NewSlot;

            ConstructorBuilder constructorBuilder = handlerB.DefineConstructor (MethodAttributes.RTSpecialName | MethodAttributes.HideBySig | MethodAttributes.Public, CallingConventions.Standard, new Type[] { typeof (object), typeof (System.IntPtr) });
            constructorBuilder.SetImplementationFlags (MethodImplAttributes.Runtime | MethodImplAttributes.Managed);

            //MethodBuilder invokeB = handlerB.DefineMethod ("Invoke", mattr, typeof (void), Type.EmptyTypes);
            MethodBuilder invokeB = DefineSignal (handlerB, "Invoke", mattr, declSignal.Arguments, true);

            invokeB.SetImplementationFlags (MethodImplAttributes.Runtime | MethodImplAttributes.Managed);
            return handlerB.CreateType ();
        }
 private void OnDownloaderStateChanged (NDesk.DBus.ObjectPath path, TorrentState from, TorrentState to)
 {
     if (downloader.GetState () == TorrentState.Seeding) {
         SetProgress (100);
         SetStatus (TaskStatus.Succeeded);
         OnTaskCompleted (null, false);
     }
 }
Ejemplo n.º 4
0
 static void ShowHelp(NDesk.Options.OptionSet oset)
 {
     Console.WriteLine ("Usage: CLAutoThumbnailer [OPTIONS] videofilename.ext |");
     Console.WriteLine ("                                   -d directory      |");
     Console.WriteLine ("                                   commandfile.txt");
     Console.WriteLine ("Generates thumbnail pages for videos.");
     Console.WriteLine ("See http://rm2.github.com/CLAutoThumbnailer/ for detailed documentation.");
     Console.WriteLine ();
     Console.WriteLine ("Options:");
     oset.WriteOptionDescriptions (Console.Out);
 }
Ejemplo n.º 5
0
 /// <summary>
 ///     Shows information about the program to the user.
 /// </summary>
 /// <param name="options">The options.</param>
 private static void ShowHelp(NDesk.Options.OptionSet options)
 {
     Console.WriteLine();
     Console.WriteLine("Usage: weatherscraper [OPTIONS]");
     Console.WriteLine();
     Console.WriteLine("Options:");
     options.WriteOptionDescriptions(Console.Out);
 }
Ejemplo n.º 6
0
 public static void ShowHelp(NDesk.Options.OptionSet p)
 {
     Console.WriteLine ("Usage: "+Constants.myname+" [OPTIONS]");
     Console.WriteLine ("Options:");
     p.WriteOptionDescriptions (Console.Out);
 }