Пример #1
0
        public StoreControl(AmoebaManager amoebaManager, BufferManager bufferManager)
        {
            _amoebaManager = amoebaManager;
            _bufferManager = bufferManager;

            _seedStateCache = new SeedStateCache(_amoebaManager);

            InitializeComponent();

            var storeDownloadControl = new StoreDownloadControl(this, _amoebaManager, _bufferManager);

            storeDownloadControl.Height   = Double.NaN;
            storeDownloadControl.Width    = Double.NaN;
            _storeDownloadTabItem.Content = storeDownloadControl;

            var storeUploadControl = new StoreUploadControl(this, _amoebaManager, _bufferManager);

            storeUploadControl.Height   = Double.NaN;
            storeUploadControl.Width    = Double.NaN;
            _storeUploadTabItem.Content = storeUploadControl;

            var libraryControl = new LibraryControl(this, _amoebaManager, _bufferManager);

            libraryControl.Height   = Double.NaN;
            libraryControl.Width    = Double.NaN;
            _libraryTabItem.Content = libraryControl;
        }
Пример #2
0
        public static void SaveDesktop()
        {
            List <string> restore_settings = new List <string>();

            // Get the remembrances
            List <FrameworkElement> framework_elements = MainWindowServiceDispatcher.Instance.MainWindow.DockingManager.GetAllFrameworkElements();

            foreach (FrameworkElement framework_element in framework_elements)
            {
                {
                    LibraryControl library_control = framework_element as LibraryControl;
                    if (null != library_control)
                    {
                        Logging.Info("Remembering a library control " + library_control.Library.WebLibraryDetail.Id);
                        restore_settings.Add(String.Format("PDF_LIBRARY,{0}", library_control.Library.WebLibraryDetail.Id));
                    }
                }

                {
                    PDFReadingControl pdf_reading_control = framework_element as PDFReadingControl;
                    if (null != pdf_reading_control)
                    {
                        Logging.Info("Remembering a PDF reader " + pdf_reading_control.PDFRendererControlStats.pdf_document.Fingerprint);
                        restore_settings.Add(String.Format("PDF_DOCUMENT,{0},{1}", pdf_reading_control.PDFRendererControlStats.pdf_document.Library.WebLibraryDetail.Id, pdf_reading_control.PDFRendererControlStats.pdf_document.Fingerprint));
                    }
                }
            }


            // Store the remembrances
            File.WriteAllLines(Filename, restore_settings);
        }
Пример #3
0
 private void InitializeGallery()
 {
     this.galleryGridControl.DataSource = Files;
     this.galleryView.PopulateColumns();
     this.galleryView.OptionsImageLoad.AnimationType = LibraryControl.ConvertAnimationType(SettingsStore.Default.ImageAnimationType);
     this.galleryGridControl.Resize     -= galleryControl1_Resize;
     this.galleryGridControl.Resize     += galleryControl1_Resize;
     this.galleryView.ActiveFilterString = "[VisibleOnMap] = true";
     this.galleryView.ColumnSet.ExtraLargeImageColumn = this.galleryView.Columns["ThumbImage"];
     UpdateGalleryImageSize();
 }
Пример #4
0
 public MainForm(DmModel model)
 {
     //DevExpress.XtraSplashScreen.SplashScreenManager.ShowForm(this, typeof(SplashScreenForm));
     StorageManager.Default.DialogsProvider = StorageManagerDialogsProvider.Default;
     Model = model;
     Application.AddMessageFilter(new MessageFilter(this));
     InitializeComponent();
     ActivateControl(tpLibrary, LibraryControl);
     this.quickGalleryView.OptionsImageLoad.AnimationType = LibraryControl.ConvertAnimationType(SettingsStore.Default.ImageAnimationType);
     //DevExpress.XtraSplashScreen.SplashScreenManager.CloseForm();
     this.quickGalleryGridControl.Load += quickGalleryGridControl_Load;
 }
        public LibraryControl OpenLibrary(Library library)
        {
            string window_key = "Library-" + library.WebLibraryDetail.Id;

            LibraryControl existing_control = (LibraryControl)main_window.DockingManager.MakeActive(window_key);

            if (null != existing_control)
            {
                return(existing_control);
            }
            else
            {
                LibraryControl library_control = new LibraryControl(library);
                main_window.DockingManager.AddContent(window_key, library.WebLibraryDetail.Title, Icons.GetAppIcon(Icons.ModuleDocumentLibrary), true, true, library_control);
                return(library_control);
            }
        }
Пример #6
0
        private void ChooseNewLibrary(WebLibraryDetail web_library_detail)
        {
            default_library = web_library_detail;
            library_control = null;
            TextLibraryForCitations.Text = "Click to choose a library.";
            ObjLibraryControlPlaceholderRegion.Children.Clear();

            if (null != web_library_detail)
            {
                TextLibraryForCitations.Text = web_library_detail.Title;

                library_control = new LibraryControl(web_library_detail);
                library_control.ObjToolBarTray.Visibility = Visibility.Collapsed;

                HolderForSearchBox.Children.Clear();
                HolderForSearchBox.Children.Add(library_control.DetachSearchBox());

                ObjLibraryControlPlaceholderRegion.Children.Add(library_control);
            }
        }
Пример #7
0
 private void officeNavigationBar1_SelectedItemChanged(object sender, DevExpress.XtraBars.Navigation.NavigationBarItemEventArgs e)
 {
     if (e.Item == this.niLibrary)
     {
         ActivateControl(this.tpLibrary, LibraryControl);
     }
     else if (e.Item == this.niView)
     {
         ViewerControl.Files = LibraryControl.GetFilesToView();
         ActivateControl(this.tpViewer, ViewerControl);
     }
     if (e.Item == this.niPrint)
     {
         PrintControl.Files = LibraryControl.GetFilesToView();
         ActivateControl(this.tpPrinting, PrintControl);
     }
     if (e.Item == this.niEdit)
     {
         EditingControl.CurrentFile = LibraryControl.CurrentFile;
         ActivateControl(this.tpEditing, EditingControl);
     }
     if (e.Item == this.niWeb)
     {
         WebControl.Files = LibraryControl.GetFilesToView();
         ActivateControl(this.tpWeb, WebControl);
     }
     if (e.Item == this.niMap)
     {
         MapControl.Files = SortFilesByDate(LibraryControl.GetFilesToView());
         ActivateControl(this.tpMap, MapControl);
     }
     if (e.Item == this.niProject)
     {
         ActivateControl(this.tpProjects, ProjectsControl);
     }
     if (e.Item == this.niExport)
     {
         ExportControl.Files = LibraryControl.GetFilesToView();
         ActivateControl(this.tpExport, ExportControl);
     }
 }
Пример #8
0
        public StoreControl(AmoebaManager amoebaManager, BufferManager bufferManager)
        {
            _amoebaManager = amoebaManager;
            _bufferManager = bufferManager;

            InitializeComponent();

            StoreDownloadControl storeDownloadControl = new StoreDownloadControl(this, _amoebaManager, _bufferManager);
            storeDownloadControl.Height = Double.NaN;
            storeDownloadControl.Width = Double.NaN;
            _storeDownloadTabItem.Content = storeDownloadControl;

            StoreUploadControl storeUploadControl = new StoreUploadControl(this, _amoebaManager, _bufferManager);
            storeUploadControl.Height = Double.NaN;
            storeUploadControl.Width = Double.NaN;
            _storeUploadTabItem.Content = storeUploadControl;

            LibraryControl libraryControl = new LibraryControl(this, _amoebaManager, _bufferManager);
            libraryControl.Height = Double.NaN;
            libraryControl.Width = Double.NaN;
            _libraryTabItem.Content = libraryControl;
        }
        public void SearchLibrary(Library library, string query)
        {
            LibraryControl library_control = OpenLibrary(library);

            library_control.SearchLibrary(query);
        }