예제 #1
0
    public MainWindow(ExportSettingsController exportSettingsController, ExporterController exporterController, ConfigController configController) : base(Gtk.WindowType.Toplevel)
    {
        this.exporterController       = exporterController;
        this.exportSettingsController = exportSettingsController;
        this.configController         = configController;

        Build();

        UpdateUI();

        _initNodeStore();
        _initDragAndDrop();
        _initToolsColumn();

        GlobalOptionsEntry.Buffer.Changed += (sender, e) => exportSettingsController.SetGlobalOptions(GlobalOptionsEntry.Buffer.Text);

        //Autoscroll console
        ConsoleText.SizeAllocated += (o, args) =>
        {
            ConsoleScrollbox.Vadjustment.Value = ConsoleScrollbox.Vadjustment.Upper - ConsoleScrollbox.Vadjustment.PageSize;
        };

        ExportMenuButton.Activated += (sender, e) => {
            String output;
            exporterController.Export(selectedFile, out output);
            WriteLine(output);
        };

        ExportAllAction.Activated += OnExport;
    }
예제 #2
0
        public ExporterControllerTests()
        {
            client             = A.Fake <IMediator>();
            auditService       = A.Fake <IAuditService>();
            exporterController = new ExporterController(client, new AddAddressBookEntryMap(), auditService);

            A.CallTo(() => auditService.AddAuditEntry(client, notificationId, "user", NotificationAuditType.Added, NotificationAuditScreenType.Exporter));
        }
 public ExporterControllerTests()
 {
     client = A.Fake<IMediator>();
     exporterController = new ExporterController(client, new AddAddressBookEntryMap());
 }