コード例 #1
0
        public static void Main(string [] args)
        {
            if (args.Length > 0)
            {
                foreach (String arg in args)
                {
                    Console.WriteLine("Exporting {0}", arg);
                    ConfigController         cfgController            = new ConfigController();
                    ExporterController       exporterController       = new ExporterController(cfgController);
                    ExportSettingsController exportSettingsController = new ExportSettingsController(exporterController);

                    String output;
                    Uri    ExecUri     = new Uri(System.Reflection.Assembly.GetEntryAssembly().GetName().CodeBase, UriKind.Absolute);
                    Uri    RelativeUri = new Uri(arg, UriKind.Relative);
                    Uri    MergedUri   = new Uri(ExecUri, RelativeUri);
                    Console.WriteLine(MergedUri);

                    cfgController            = new ConfigController();
                    exporterController       = new ExporterController(cfgController);
                    exportSettingsController = new ExportSettingsController(exporterController);

                    exportSettingsController.LoadSettings(MergedUri, out output);
                    exporterController.Export(out output);
                    Console.WriteLine(output);
                }
            }
            else
            {
                Application.Init();

                new MainClass(args);
            }
        }
コード例 #2
0
        public AddFromResourceFileGUI(ExportSettingsController settings, FilesSelectedCallback callback)
        {
            this.callback = callback;
            this.settings = settings;

            Build();

            nodestore = new NodeStore(typeof(VectorFilePath));

            CellRendererToggle selectToggle = new CellRendererToggle();

            selectToggle.Activatable = true;
            selectToggle.Toggled    += (object o, ToggledArgs args) =>
            {
                VectorFilePath selected = (VectorFilePath)nodestore.GetNode(new TreePath(args.Path));
                //Invert value
                selected.Selected = !selected.Selected;
            };

            EntryList.AppendColumn("Add", selectToggle, "active", 0);
            EntryList.AppendColumn("Name", new Gtk.CellRendererText(), "text", 1);
            EntryList.AppendColumn("Path", new Gtk.CellRendererText(), "text", 2);


            EntryList.NodeStore = nodestore;
        }
コード例 #3
0
 private void initControllers()
 {
     cfgController            = new ConfigController();
     exporterController       = new ExporterController(cfgController);
     exportSettingsController = new ExportSettingsController(exporterController);
 }