예제 #1
0
 public MapView(DmModel model)
 {
     Model = model;
     InitializeComponent();
     InitializeGeoCodeProvider();
     InitializeGeoLocationControl();
 }
예제 #2
0
        public ImportDataSource(DmModel model, string folderPath, bool includeSubfolders)
        {
            this._rts = new RealTimeSource()
            {
                DataSource = this._files,
            };
            SearchOption         option  = includeSubfolders ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly;
            IEnumerable <string> folders = new List <string> {
                folderPath
            } as IEnumerable <string>;

            folders = folders.Concat(SafeFileEnumerator.EnumerateDirectories(folderPath, "*", option));

            this._worker = new BackgroundWorker();
            this._worker.WorkerSupportsCancellation = true;
            this._worker.DoWork += (sender, args) => {
                var dirs = args.Argument as IEnumerable <string>;
                var w    = sender as BackgroundWorker;
                foreach (var dir in dirs)
                {
                    if ((w.CancellationPending))
                    {
                        args.Cancel = true;
                        break;
                    }
                    var files   = SafeFileEnumerator.EnumerateFiles(dir, "*", SearchOption.TopDirectoryOnly);
                    var dmFiles = model.Helper.AddFileHelper.GetFilesToAdd(files);
                    foreach (var dmfile in dmFiles)
                    {
                        lock (locker) { this._files.Add(dmfile); }
                    }
                }
            };
            this._worker.RunWorkerAsync(folders);
        }
예제 #3
0
        public WebControl(DmModel model)
        {
            this.Model     = model;
            this.Disposed += WebControl_Disposed;
            InitializeComponent();

            webBrowser1.ScriptErrorsSuppressed         = true;
            webBrowser1.IsWebBrowserContextMenuEnabled = false;
        }
 public EditingControl(DmModel model)
 {
     InitializeComponent();
     Model = model;
     InitializePicturePreviewControl();
     InitializeRightPanel();
     InitializeLeftPanel();
     InitializeColorLabelEditor();
     InitializeToolbarsMenu();
 }
예제 #5
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 static object CreateColorLabelsImageCollection(DmModel model)
        {
            ImageCollection coll = new ImageCollection();

            coll.ImageSize = SettingsStore.Default.ColorLabelImageSize;
            coll.Images.Add(new Bitmap(coll.ImageSize.Width, coll.ImageSize.Height));
            foreach (DmColorLabel label in model.GetColorLabels())
            {
                Image img = new Bitmap(coll.ImageSize.Width, coll.ImageSize.Height);
                using (Graphics g = Graphics.FromImage(img)) {
                    g.Clear(label.Color);
                }
                coll.Images.Add(img);
            }
            return(coll);
        }
예제 #7
0
        public WIAImportDataSource(DmModel model, DeviceInfoWrapper deviceInfoWrapper)
        {
            this._tempFolderForThumbs = FolderHelper.CreateTempFolder();
            this._wiaItems.Populate(deviceInfoWrapper);

            foreach (WIAItem item in this._wiaItems)
            {
                FileInfo info = new FileInfo(item.Path);
                if (!model.Helper.AddFileHelper.ShouldProcessFile(info))
                {
                    continue;
                }
                DmFile file = model.Helper.AddFileHelper.CreateFileInfoModel(info);
                this._files.Add(file);
                this._fileNames.Add(file.Path, item);
            }
        }
 public FileSizeHelper(DmModel model) : base(model)
 {
 }
 public AddFileHelper(DmModel model) : base(model)
 {
 }
 public MediaFormatHelper(DmModel model) : base(model)
 {
 }
 public ModelHelperBase(DmModel model) => Model = model;
예제 #12
0
 public AddFilesForm(DmModel model)
 {
     InitializeComponent();
     InitializeFilesGrid();
     this.Model = model;
 }
예제 #13
0
 public ImportDataSource(DmModel model, string folderPath)
     : this(model, folderPath, false)
 {
 }
예제 #14
0
 public ProjectsControl(DmModel model, MainForm mainForm)
     : this()
 {
     Model    = model;
     MainForm = mainForm;
 }