Ejemplo n.º 1
0
        public static void Test()
        {
            LibraryFilterControl l      = new LibraryFilterControl();
            ControlHostingWindow window = new ControlHostingWindow("Library index", l);

            window.Show();
        }
Ejemplo n.º 2
0
        // ------------------------------------------------------------------------------------------------------------------------------------------------------

        public static void Test()
        {
            DocumentPickerControl dpc = new DocumentPickerControl();
            ControlHostingWindow  w   = new ControlHostingWindow("Document picker", dpc);

            w.Show();
        }
Ejemplo n.º 3
0
        public static void Test()
        {
            CrossLibrarySearchControl control = new CrossLibrarySearchControl();
            ControlHostingWindow      w       = new ControlHostingWindow("Cross library search", control);

            w.Show();
        }
        public static void Test()
        {
            LocalisationEditingControl lec = new LocalisationEditingControl();
            ControlHostingWindow       chw = new ControlHostingWindow("Localisation", lec);

            chw.Show();
        }
        public static void Test()
        {
            CSLEditorControl     lec = new CSLEditorControl();
            ControlHostingWindow chw = new ControlHostingWindow("CSL Editor", lec);

            chw.Show();
        }
Ejemplo n.º 6
0
        public Test()
        {
            dock_panel = new DockPanel();

            check_box            = new CheckBox();
            check_box.Checked   += check_box_Checked;
            check_box.Unchecked += check_box_Unchecked;
            DockPanel.SetDock(check_box, Dock.Top);
            dock_panel.Children.Add(check_box);

            Button button = new Button();

            button.Content = "YOOHOOO";
            button.Click  += button_Click;
            DockPanel.SetDock(check_box, Dock.Bottom);
            dock_panel.Children.Add(button);

            text_block      = new TextBlock();
            text_block.Text = "HELLOOOOOOO";
            dock_panel.Children.Add(text_block);


            WizardDPs.SetPointOfInterest(text_block, "TB");
            WizardDPs.SetPointOfInterest(check_box, "Wizard:1:CheckBox");
            WizardDPs.SetPointOfInterest(button, "Wizard:1:Button");

            ControlHostingWindow chw = new ControlHostingWindow("Test", dock_panel);

            PointOfInterestLocator poi_locator = new PointOfInterestLocator();

            Player player = new Player(poi_locator, TestWizard.GetRoute());

            chw.Show();
        }
        public static void Test()
        {
            DocumentConversionControl dcc = new DocumentConversionControl();
            ControlHostingWindow      w   = new ControlHostingWindow("PDF Convert", dcc);

            w.Show();
        }
        public Player(PointOfInterestLocator poi_locator, Route route)
        {
            InitializeComponent();

            this.Background = ThemeColours.Background_Brush_Blue_VeryDark;

            this.poi_locator = poi_locator;
            this.route       = route;

            this.CmdNext.Background = Brushes.LightGreen;
            this.CmdNext.Click     += CmdNext_Click;

            dispatcher_timer          = new DispatcherTimer();
            dispatcher_timer.Interval = new TimeSpan(0, 0, 0, 0, 250);
            dispatcher_timer.Tick    += dispatcher_timer_Tick;

            opacity_animation = new DoubleAnimation(0.5, 1, new Duration(new TimeSpan(0, 0, 0, 0, 1000)));
            opacity_animation.RepeatBehavior    = RepeatBehavior.Forever;
            opacity_animation.AutoReverse       = true;
            opacity_animation.AccelerationRatio = 0.1;

            ControlHostingWindow window = new ControlHostingWindow(route.Title, this);

            window.BorderThickness       = new Thickness(0);
            window.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            window.WindowStyle           = WindowStyle.ToolWindow;
            window.Topmost = true;
            window.Show();
        }
Ejemplo n.º 9
0
        public static void Test()
        {
            Library              library = Library.GuestInstance;
            LibraryControl       lic     = new LibraryControl(library);
            ControlHostingWindow window  = new ControlHostingWindow("Library control", lic);

            window.Show();
        }
Ejemplo n.º 10
0
        public static void TestPDFRendererControl()
        {
            Library              library              = Library.GuestInstance;
            PDFDocument          pdf_document         = library.PDFDocuments[1];
            PDFRendererControl   pdf_renderer_control = new PDFRendererControl(pdf_document, true);
            ControlHostingWindow window = new ControlHostingWindow("PDF Renderer Control", pdf_renderer_control);

            window.Show();
        }
        public static void Test()
        {
            InCiteControl        icc = new InCiteControl();
            ControlHostingWindow w   = new ControlHostingWindow("InCite", icc);

            w.Width  = 1024;
            w.Height = 800;
            w.Show();
        }
Ejemplo n.º 12
0
        void button_Click(object sender, RoutedEventArgs e)
        {
            TextBlock tb = new TextBlock();

            tb.Text = "Super";
            ControlHostingWindow window = new ControlHostingWindow("New window", tb);

            WizardDPs.SetPointOfInterest(window, "Wizard:1:TargetWindow");
            window.Show();
        }
        private static void OnShowTagOptionsComplete(Library library, List <PDFDocument> pdf_documents, AnnotationReportOptions annotation_report_options)
        {
            var annotation_report           = BuildReport(library, pdf_documents, annotation_report_options);
            FlowDocumentScrollViewer viewer = new FlowDocumentScrollViewer();

            viewer.Document = annotation_report.flow_document;
            ControlHostingWindow window = new ControlHostingWindow("Annotations", viewer);

            window.Show();
        }
        public static void Test()
        {
            BibTeXEditorControl bec = new BibTeXEditorControl();

            ControlHostingWindow window = new ControlHostingWindow("BibTeX editor", bec);

            window.Width  = 500;
            window.Height = 300;
            window.Show();
        }
        // -----------------------------

        public static void TestHarness()
        {
            Library            library = Library.GuestInstance;
            TagExplorerControl tec     = new TagExplorerControl();

            tec.Library = library;

            ControlHostingWindow w = new ControlHostingWindow("Tags", tec);

            w.Show();
        }
Ejemplo n.º 16
0
        public static void Test()
        {
            TestData td = new TestData();
            AugmentedBindable <TestData> bindable = new AugmentedBindable <TestData>(td);

            TestControl tc = new TestControl();

            tc.DataContext = bindable;
            ControlHostingWindow w = new ControlHostingWindow("Tag editor", tc);

            w.Show();
        }
 void CmdNext_Click(object sender, RoutedEventArgs e)
 {
     if (null == route.CurrentStep)
     {
         ControlHostingWindow.CloseHostedControl(this);
     }
     else
     {
         this.route.StepNext();
         ApplyCurrentStep();
     }
 }
        public static void Test()
        {
            Library library = Library.GuestInstance;
            Thread.Sleep(1000);

            ExpeditionControl ec = new ExpeditionControl();
            ec.ChooseNewLibrary(library.WebLibraryDetail);

            ControlHostingWindow w = new ControlHostingWindow("Expedition", ec);
            w.Width = 800;
            w.Height= 600;
            w.Show();
        }
Ejemplo n.º 19
0
        public static void Test()
        {
            WebBrowserHostControl wbc = new WebBrowserHostControl();
            ControlHostingWindow  chw = new ControlHostingWindow("Web browser", wbc);

            chw.Show();

            WBC = wbc;
            Thread thread = new Thread(ThreadEntry);

            thread.Start();
            thread.IsBackground = true;
        }
        public static void Test()
        {
            SpeedReadControl     src    = new SpeedReadControl();
            ControlHostingWindow window = new ControlHostingWindow("SpeedRead!", src);

            window.Width  = 640;
            window.Height = 480;
            window.Show();

            string text = File.ReadAllText(@"c:\temp\alice-en1.txt");

            src.UseText(text);
        }
Ejemplo n.º 21
0
        public static void Test()
        {
            Library              library      = Library.GuestInstance;
            PDFDocument          pdf_document = library.PDFDocuments[1];
            List <TagCloudEntry> entries      = BuildTagCloud(library, pdf_document);

            TagCloudRendererControl tcrc = new TagCloudRendererControl();

            tcrc.Entries = entries;

            ControlHostingWindow window = new ControlHostingWindow("Tag cloud", tcrc);

            window.Show();
        }
 public void OpenNewWindow(string header, BitmapImage icon, bool can_close, bool can_floating, FrameworkElement content)
 {
     if (null != main_window)
     {
         main_window.DockingManager.AddContent(null, header, icon, can_close, can_floating, content);
     }
     else
     {
         Logging.Debug("MainWindow is not present, so spawning independent window");
         ControlHostingWindow window = new ControlHostingWindow(header, content);
         window.Title = header;
         window.Show();
     }
 }
Ejemplo n.º 23
0
        public static void Test()
        {
            Library l = Library.GuestInstance;

            Thread.Sleep(1000);

            BrainstormControl bc = new BrainstormControl();

            //SampleSceneGenerator.CreateSampleScene_Coordinates(bc.ObjSceneRenderingControlScrollWrapper.ObjSceneRenderingControl);
            //SampleSceneGenerator.CreateSampleScene_Spiral(bc.ObjSceneRenderingControlScrollWrapper.ObjSceneRenderingControl);
            bc.SceneRenderingControl.OpenFromDisk(@"C:\temp\untitled.brain");
            ControlHostingWindow window = new ControlHostingWindow("SceneRenderer", bc);

            window.Show();
        }
        public static void Test()
        {
            Library            library       = Library.GuestInstance;
            List <PDFDocument> pdf_documents = library.PDFDocuments;

            {
                var annotation_report           = BuildReport(library, pdf_documents, null);
                FlowDocumentScrollViewer viewer = new FlowDocumentScrollViewer();
                viewer.Document = annotation_report.flow_document;
                ControlHostingWindow window = new ControlHostingWindow("Annotations", viewer);
                window.Show();

                Thread.Sleep(1000);
            }
        }
        public static void TestPDFRendererControl()
        {
            Library            library       = Library.GuestInstance;
            List <PDFDocument> pdf_documents = library.PDFDocuments;

            if (0 < pdf_documents.Count)
            {
                PDFDocument       pdf_document        = pdf_documents[0];
                PDFRenderer       pdf_renderer        = new PDFRenderer(pdf_document.DocumentPath, null, null);
                PDFAnnotationList pdf_annotation_list = pdf_document.Annotations;

                PDFRendererControl   control = new PDFRendererControl(pdf_document, true);
                ControlHostingWindow window  = new ControlHostingWindow("PDFRenderer", control);
                window.Show();
            }
        }
        public static void TestHarness()
        {
            Library library = Library.GuestInstance;

            while (!library.LibraryIsLoaded)
            {
                Thread.Sleep(1000);
            }
            LibraryCatalogControl lcc = new LibraryCatalogControl();

            lcc.Library = library;


            ControlHostingWindow window = new ControlHostingWindow("Fast library control", lcc);

            window.Show();
        }
Ejemplo n.º 27
0
        public static void TestPDFReadingControl()
        {
            Library library = Library.GuestInstance;

            Thread.Sleep(1000);

            while (!library.LibraryIsLoaded)
            {
                Logging.Info("Waiting for library");
                Thread.Sleep(100);
            }

            PDFDocument          pdf_document        = library.PDFDocuments[0];
            PDFReadingControl    pdf_reading_control = new PDFReadingControl(pdf_document);
            ControlHostingWindow window = new ControlHostingWindow("PDF Reading Control", pdf_reading_control);

            window.Show();
        }
Ejemplo n.º 28
0
        public static void TestHarness_TEXT_RENDER_ONE(string PDF_FILENAME, int PAGE)
        {
            SolidColorBrush BRUSH_EDGE       = new SolidColorBrush(Colors.Red);
            SolidColorBrush BRUSH_BACKGROUND = new SolidColorBrush(ColorTools.MakeTransparentColor(Colors.GreenYellow, 64));

            // Load the image graphic
            MemoryStream ms           = RenderPDFPage(PDF_FILENAME, PAGE, 150, null, ProcessPriorityClass.Normal);
            BitmapSource bitmap_image = BitmapImageTools.LoadFromBytes(ms.ToArray());
            Image        image        = new Image();

            image.Source  = bitmap_image;
            image.Stretch = Stretch.Fill;

            // Load the image text
            Canvas           canvas      = new Canvas();
            List <TextChunk> text_chunks = GetEmbeddedText(PDF_FILENAME, "" + PAGE, null, ProcessPriorityClass.Normal);
            List <Rectangle> rectangles  = new List <Rectangle>();

            foreach (TextChunk text_chunk in text_chunks)
            {
                Rectangle rectangle = new Rectangle();
                rectangle.Stroke = BRUSH_EDGE;
                rectangle.Fill   = BRUSH_BACKGROUND;
                rectangle.Tag    = text_chunk;
                rectangles.Add(rectangle);
                canvas.Children.Add(rectangle);
            }

            RectanglesManager rm = new RectanglesManager(rectangles, canvas);

            Grid grid = new Grid();

            grid.Children.Add(image);
            grid.Children.Add(canvas);

            ControlHostingWindow window = new ControlHostingWindow("PDF", grid);

            window.Show();
        }