Esempio n. 1
0
        public EnfusePluginViewModel(Window window)
        {
            if (!IsInDesignMode)
            {
                window.Closing += window_Closing;
                ServiceProvider.FileTransfered       += ServiceProvider_FileTransfered;
                ServiceProvider.WindowsManager.Event += WindowsManager_Event;
                SetEnabled();
                ResetCommand      = new RelayCommand(SetDefault);
                PreviewCommand    = new RelayCommand(Preview);
                ReloadCommand     = new RelayCommand(Reload);
                GenerateCommand   = new RelayCommand(Generate);
                StopCommand       = new RelayCommand(Stop);
                ConfPluginCommand = new RelayCommand(ConfPlugin);
                RemoveItemCommand = new GalaSoft.MvvmLight.Command.RelayCommand <FileItem>(RemoveItem);
                Output            = new AsyncObservableCollection <string>();
                LoadData();
                _pathtoalign = Path.Combine(Settings.ApplicationFolder, "Tools", "align_image_stack.exe");
                var hugin = @"c:\Program Files (x86)\Hugin\bin\align_image_stack.exe";
                // use hugin installation
                if (File.Exists(hugin))
                {
                    _pathtoalign = hugin;
                    OnProgressChange("Hugin installed using align_image_stack.exe");
                }
                else
                {
                    OnProgressChange("Hugin not installed. Instal x86 version for betteer image align performance");
                }

                _pathtoenfuse = Path.Combine(Settings.ApplicationFolder, "Tools", "x64", "enfuse.exe");
            }
        }
Esempio n. 2
0
        public MainMenuViewModel()
        {
            SendCommand         = new GalaSoft.MvvmLight.Command.RelayCommand <string>(Send);
            SettingsCommand     = new RelayCommand(EditSettings);
            ThumbSizeCommand    = new GalaSoft.MvvmLight.Command.RelayCommand <int>(ThumbSize);
            SetLayoutCommand    = new GalaSoft.MvvmLight.Command.RelayCommand <string>(SetLayout);
            SelectAllCommand    = new RelayCommand(delegate { ServiceProvider.Settings.DefaultSession.SelectAll(); });
            SelectNoneCommand   = new RelayCommand(delegate { ServiceProvider.Settings.DefaultSession.SelectNone(); });
            SelectLiked         = new RelayCommand(delegate { ServiceProvider.Settings.DefaultSession.SelectLiked(); });
            SelectUnLiked       = new RelayCommand(delegate { ServiceProvider.Settings.DefaultSession.SelectUnLiked(); });
            SelectInvertCommand = new RelayCommand(delegate { ServiceProvider.Settings.DefaultSession.SelectInver(); });
            SelectSeries        =
                new RelayCommand(delegate
            {
                try
                {
                    ServiceProvider.Settings.DefaultSession.SelectSameSeries(
                        ServiceProvider.Settings.SelectedBitmap.FileItem.Series);
                }
                catch (Exception ex)
                {
                    Log.Error("SelectSeries", ex);
                }
            });
            NewSessionCommand     = new RelayCommand(NewSession);
            EditSessionCommand    = new RelayCommand(EditSession);
            DelSessionCommand     = new RelayCommand(DelSession);
            RefreshSessionCommand = new RelayCommand(RefreshSession);
            ShowSessionCommand    = new RelayCommand(ShowSession);
            RefreshCommand        = new RelayCommand(Refresh);
            CameraPropertyCommand =
                new RelayCommand(
                    () => ServiceProvider.WindowsManager.ExecuteCommand(WindowsCmdConsts.CameraPropertyWnd_Show,
                                                                        ServiceProvider.DeviceManager.SelectedCameraDevice));
            UseAsMasterCommand = new RelayCommand(UseAsMaster);

            ToggleFocusCommand    = new RelayCommand(() => ShowFocusPoints = !ShowFocusPoints);
            FlipPreviewCommand    = new RelayCommand(() => FlipPreview = !FlipPreview);
            EnhancedThumbsCommand = new RelayCommand(() => EnhancedThumbs = !EnhancedThumbs);
            ShowThumbInfoCommand  = new RelayCommand(() => ShowThumbInfo = !ShowThumbInfo);

            HomePageCommand      = new RelayCommand(() => PhotoUtils.Run("http://www.digicamcontrol.com/", ""));
            CheckUpdateCommand   = new RelayCommand(() => NewVersionWnd.CheckForUpdate(true));
            ForumCommand         = new RelayCommand(() => PhotoUtils.Run("http://digicamcontrol.com/phpbb/index.php", ""));
            SendLogFileCommand   = new RelayCommand(() => new ErrorReportWnd("Log file").ShowDialog());
            ShowChangeLogCommand = new RelayCommand(NewVersionWnd.ShowChangeLog);
            AboutCommand         = new RelayCommand(() => new AboutWnd().ShowDialog());
            ManualPageCommand    = new RelayCommand(() => HelpProvider.Run(HelpSections.MainMenu));

            ExecuteExportPluginCommand = new GalaSoft.MvvmLight.Command.RelayCommand <IExportPlugin>(ExecuteExportPlugin);
            ExecuteToolPluginCommand   = new GalaSoft.MvvmLight.Command.RelayCommand <IToolPlugin>(ExecuteToolPlugin);
            if (ServiceProvider.DeviceManager != null)
            {
                ServiceProvider.DeviceManager.CameraConnected    += DeviceManager_CameraConnected;
                ServiceProvider.DeviceManager.CameraDisconnected += DeviceManager_CameraConnected;
                ServiceProvider.DeviceManager.CameraSelected     += DeviceManager_CameraSelected;
            }
            ExportSessionCommand = new RelayCommand(ExportSession);
            ImportSessionCommand = new RelayCommand(ImportSession);
        }
        public MainMenuViewModel()
        {
            SendCommand = new GalaSoft.MvvmLight.Command.RelayCommand<string>(Send);
            SettingsCommand = new RelayCommand(EditSettings);
            ThumbSizeCommand = new GalaSoft.MvvmLight.Command.RelayCommand<int>(ThumbSize);
            SetLayoutCommand = new GalaSoft.MvvmLight.Command.RelayCommand<string>(SetLayout);
            SelectAllCommand =new RelayCommand(delegate { ServiceProvider.Settings.DefaultSession.SelectAll(); });
            SelectNoneCommand =new RelayCommand(delegate { ServiceProvider.Settings.DefaultSession.SelectNone(); });
            SelectLiked = new RelayCommand(delegate { ServiceProvider.Settings.DefaultSession.SelectLiked(); });
            SelectUnLiked =new RelayCommand(delegate { ServiceProvider.Settings.DefaultSession.SelectUnLiked(); });
            SelectInvertCommand =new RelayCommand(delegate { ServiceProvider.Settings.DefaultSession.SelectInver(); });
            SelectSeries =
                new RelayCommand(delegate
                {
                    try
                    {
                        ServiceProvider.Settings.DefaultSession.SelectSameSeries(
                            ServiceProvider.Settings.SelectedBitmap.FileItem.Series);
                    }
                    catch (Exception ex)
                    {
                        Log.Error("SelectSeries", ex);
                    }
                });
            NewSessionCommand = new RelayCommand(NewSession);
            EditSessionCommand = new RelayCommand(EditSession);
            DelSessionCommand=new RelayCommand(DelSession);
            RefreshSessionCommand = new RelayCommand(RefreshSession);
            ShowSessionCommand = new RelayCommand(ShowSession);
            RefreshCommand = new RelayCommand(Refresh);
            CameraPropertyCommand =
                new RelayCommand(
                    () => ServiceProvider.WindowsManager.ExecuteCommand(WindowsCmdConsts.CameraPropertyWnd_Show,
                        ServiceProvider.DeviceManager.SelectedCameraDevice));
            UseAsMasterCommand = new RelayCommand(UseAsMaster);

            ToggleFocusCommand = new RelayCommand(() => ShowFocusPoints = !ShowFocusPoints);
            FlipPreviewCommand = new RelayCommand(() => FlipPreview = !FlipPreview);
            EnhancedThumbsCommand = new RelayCommand(() => EnhancedThumbs = !EnhancedThumbs);
            ShowThumbInfoCommand = new RelayCommand(() => ShowThumbInfo = !ShowThumbInfo);

            HomePageCommand = new RelayCommand(() => PhotoUtils.Run("http://www.digicamcontrol.com/", ""));
            CheckUpdateCommand = new RelayCommand(() => NewVersionWnd.CheckForUpdate(true));
            ForumCommand = new RelayCommand(() => PhotoUtils.Run("http://www.digicamcontrol.com/forum/", ""));
            SendLogFileCommand = new RelayCommand(() => new ErrorReportWnd("Log file").ShowDialog());
            ShowChangeLogCommand = new RelayCommand(NewVersionWnd.ShowChangeLog);
            AboutCommand = new RelayCommand(() => new AboutWnd().ShowDialog());
            ManualPageCommand = new RelayCommand(() => HelpProvider.Run(HelpSections.MainMenu));

            ExecuteExportPluginCommand = new GalaSoft.MvvmLight.Command.RelayCommand<IExportPlugin>(ExecuteExportPlugin);
            ExecuteToolPluginCommand = new GalaSoft.MvvmLight.Command.RelayCommand<IToolPlugin>(ExecuteToolPlugin);
            if (ServiceProvider.DeviceManager != null)
            {
                ServiceProvider.DeviceManager.CameraConnected += DeviceManager_CameraConnected;
                ServiceProvider.DeviceManager.CameraDisconnected += DeviceManager_CameraConnected;
                ServiceProvider.DeviceManager.CameraSelected += DeviceManager_CameraSelected;
            }
            ExportSessionCommand = new RelayCommand(ExportSession);
            ImportSessionCommand = new RelayCommand(ImportSession);
        }
 public AutoExportPluginEditViewModel(AutoExportPluginConfig config)
 {
     Config = config;
     AddTransforPluginCommand = new GalaSoft.MvvmLight.Command.RelayCommand<string>(AddTransforPlugin);
     RemoveTransforPluginCommand =
         new GalaSoft.MvvmLight.Command.RelayCommand<TransformPluginItem>(RemoveTransforPlugin);
     PreviewCommand = new RelayCommand(Preview);
 }
Esempio n. 5
0
 public TransformPluginEditViewModel(AutoExportPluginConfig config)
 {
     Config = config;
     AddTransforPluginCommand    = new GalaSoft.MvvmLight.Command.RelayCommand <string>(AddTransforPlugin);
     RemoveTransforPluginCommand =
         new GalaSoft.MvvmLight.Command.RelayCommand <TransformPluginItem>(RemoveTransforPlugin);
     PreviewCommand = new RelayCommand(Preview);
 }
Esempio n. 6
0
 public void InitCommands()
 {
     RemoveItemCommand         = new GalaSoft.MvvmLight.Command.RelayCommand <FileItem>(RemoveItem);
     ReloadCommand             = new RelayCommand(Reload);
     SetSingleFolderCommand    = new RelayCommand(SetSingleFolder);
     SetStacksFolderCommand    = new RelayCommand(SetStacksFolder);
     SetSubStacksFolderCommand = new RelayCommand(SetSubStacksFolder);
 }
 public AutoExportPluginEditViewModel(AutoExportPluginConfig config)
 {
     Config = config;
     AddTransforPluginCommand    = new GalaSoft.MvvmLight.Command.RelayCommand <string>(AddTransforPlugin);
     RemoveTransforPluginCommand =
         new GalaSoft.MvvmLight.Command.RelayCommand <TransformPluginItem>(RemoveTransforPlugin);
     PreviewCommand         = new RelayCommand(Preview);
     ApplyCommand           = new RelayCommand(Apply);
     RemoveConditionCommand = new GalaSoft.MvvmLight.Command.RelayCommand <PluginCondition>(RemoveCondition);
     AddConditionCommand    = new RelayCommand(AddCondition);
     CheckConditionCommand  = new RelayCommand(CheckCondition);
     GetValueCommand        = new GalaSoft.MvvmLight.Command.RelayCommand <PluginCondition>(GetValue);
 }
 public AutoExportPluginEditViewModel(AutoExportPluginConfig config)
 {
     Config = config;
     AddTransforPluginCommand = new GalaSoft.MvvmLight.Command.RelayCommand<string>(AddTransforPlugin);
     RemoveTransforPluginCommand =
         new GalaSoft.MvvmLight.Command.RelayCommand<TransformPluginItem>(RemoveTransforPlugin);
     PreviewCommand = new RelayCommand(Preview);
     ApplyCommand = new RelayCommand(Apply);
     RemoveConditionCommand = new GalaSoft.MvvmLight.Command.RelayCommand<PluginCondition>(RemoveCondition);
     AddConditionCommand = new RelayCommand(AddCondition);
     CheckConditionCommand = new RelayCommand(CheckCondition);
     GetValueCommand = new GalaSoft.MvvmLight.Command.RelayCommand<PluginCondition>(GetValue);
 }
Esempio n. 9
0
 public void InitCommands()
 {
     RemoveItemCommand = new GalaSoft.MvvmLight.Command.RelayCommand <FileItem>(RemoveItem);
     ReloadCommand     = new RelayCommand(Reload);
 }
Esempio n. 10
0
 public void InitCommands()
 {
     RemoveItemCommand = new GalaSoft.MvvmLight.Command.RelayCommand<FileItem>(RemoveItem);
     ReloadCommand=new RelayCommand(Reload);
 }
 public void InitCommands()
 {
     RemoveItemCommand = new GalaSoft.MvvmLight.Command.RelayCommand<FileItem>(RemoveItem);
     ReloadCommand = new RelayCommand(Reload);
     SetSingleFolderCommand = new RelayCommand(SetSingleFolder);
     SetStacksFolderCommand = new RelayCommand(SetStacksFolder);
     SetSubStacksFolderCommand = new RelayCommand(SetSubStacksFolder);
 }
Esempio n. 12
0
        public MainMenuViewModel()
        {
            if (IsInDesignMode)
            {
                return;
            }

            SendCommand            = new GalaSoft.MvvmLight.Command.RelayCommand <string>(Send);
            SettingsCommand        = new RelayCommand(EditSettings);
            ThumbSizeCommand       = new GalaSoft.MvvmLight.Command.RelayCommand <string>(ThumbSize);
            SetLayoutCommand       = new GalaSoft.MvvmLight.Command.RelayCommand <string>(SetLayout);
            SelectNoneCommand      = new RelayCommand(delegate { ServiceProvider.Settings.DefaultSession.SelectNone(); });
            SelectLiked            = new RelayCommand(delegate { ServiceProvider.Settings.DefaultSession.SelectLiked(); });
            SelectUnLiked          = new RelayCommand(delegate { ServiceProvider.Settings.DefaultSession.SelectUnLiked(); });
            OpenInLightroomCommand =
                new RelayCommand(() => ServiceProvider.Settings.DefaultSession.OpenInLightroom(), () => ServiceProvider.Settings.DefaultSession.IsAvailable("Lightroom"));

            OpenInPhotoshopCommand =
                new RelayCommand(OpenInPhotoshop, () => ServiceProvider.Settings.DefaultSession.IsAvailable("Photoshop"));
            LightroomIsInstalled = ServiceProvider.Settings.DefaultSession.IsAvailable("Lightroom");
            PhotoshopIsInstalled = ServiceProvider.Settings.DefaultSession.IsAvailable("Photoshop");
            SelectInvertCommand  = new RelayCommand(delegate { ServiceProvider.Settings.DefaultSession.SelectInver(); });
            SelectSeries         =
                new RelayCommand(delegate
            {
                try
                {
                    ServiceProvider.Settings.DefaultSession.SelectSameSeries(
                        ServiceProvider.Settings.SelectedBitmap.FileItem.Series);
                }
                catch (Exception ex)
                {
                    Log.Error("SelectSeries", ex);
                }
            });
            NewSessionCommand     = new RelayCommand(NewSession);
            EditSessionCommand    = new RelayCommand(EditSession);
            DelSessionCommand     = new RelayCommand(DelSession);
            RefreshSessionCommand = new RelayCommand(RefreshSession);
            ShowSessionCommand    = new RelayCommand(ShowSession);
            RefreshCommand        = new RelayCommand(Refresh);
            CameraPropertyCommand =
                new RelayCommand(
                    () => ServiceProvider.WindowsManager.ExecuteCommand(WindowsCmdConsts.CameraPropertyWnd_Show,
                                                                        ServiceProvider.DeviceManager.SelectedCameraDevice));
            UseAsMasterCommand = new RelayCommand(UseAsMaster);

            ToggleFocusCommand = new RelayCommand(() => ShowFocusPoints = !ShowFocusPoints);
            FlipPreviewCommand = new RelayCommand(() => FlipPreview = !FlipPreview);
            HomePageCommand    =
                new RelayCommand(
                    () => PhotoUtils.Run(string.IsNullOrEmpty(Branding.HomePageUrl)
                        ? "https://us.orangemonkie.com/"
                        : Branding.HomePageUrl, ""));

            CheckUpdateCommand   = new RelayCommand(() => NewVersionWnd.CheckForUpdate(true));
            ForumCommand         = new RelayCommand(() => PhotoUtils.Run("https://us.orangemonkie.com/blog", ""));
            SendLogFileCommand   = new RelayCommand(() => new ErrorReportWnd("Log file").ShowDialog());
            ShowChangeLogCommand = new RelayCommand(NewVersionWnd.ShowChangeLog);
            AboutCommand         = new RelayCommand(() => new AboutWnd().ShowDialog());
            ManualPageCommand    = new RelayCommand(() => HelpProvider.Run(HelpSections.MainMenu));

            ExecuteExportPluginCommand = new GalaSoft.MvvmLight.Command.RelayCommand <IExportPlugin>(ExecuteExportPlugin);
            ExecuteToolPluginCommand   = new GalaSoft.MvvmLight.Command.RelayCommand <IToolPlugin>(ExecuteToolPlugin);
            if (ServiceProvider.DeviceManager != null)
            {
                ServiceProvider.DeviceManager.CameraConnected    += DeviceManager_CameraConnected;
                ServiceProvider.DeviceManager.CameraDisconnected += DeviceManager_CameraConnected;
                ServiceProvider.DeviceManager.CameraSelected     += DeviceManager_CameraSelected;
            }
            ExportSessionCommand     = new RelayCommand(ExportSession);
            ImportSessionCommand     = new RelayCommand(ImportSession);
            CopyNameClipboardCommand =
                new RelayCommand(
                    delegate
            {
                try
                {
                    Clipboard.SetText(ServiceProvider.Settings.SelectedBitmap.FileItem.FileName);
                }
                catch (Exception exception)
                {
                    Log.Error("Copy to Clipboard fail ", exception);
                    StaticHelper.Instance.SystemMessage = "Copy to Clipboard fail";
                }
            });
        }
        public EnfusePluginViewModel(Window window)
        {
            if (!IsInDesignMode)
            {
                window.Closing += window_Closing;
                ServiceProvider.FileTransfered += ServiceProvider_FileTransfered;
                ServiceProvider.WindowsManager.Event += WindowsManager_Event;
                SetEnabled();
                ResetCommand = new RelayCommand(SetDefault);
                PreviewCommand = new RelayCommand(Preview);
                ReloadCommand = new RelayCommand(Reload);
                GenerateCommand=new RelayCommand(Generate);
                StopCommand=new RelayCommand(Stop);
                ConfPluginCommand = new RelayCommand(ConfPlugin);
                RemoveItemCommand = new GalaSoft.MvvmLight.Command.RelayCommand<FileItem>(RemoveItem);
                Output = new AsyncObservableCollection<string>();
                LoadData();
                _pathtoalign = Path.Combine(Settings.ApplicationFolder, "Tools", "align_image_stack.exe");
                var hugin = @"c:\Program Files (x86)\Hugin\bin\align_image_stack.exe";
                // use hugin installation 
                if (File.Exists(hugin))
                {
                    _pathtoalign = hugin;
                    OnProgressChange("Hugin installed using align_image_stack.exe");
                }
                else
                {
                    OnProgressChange("Hugin not installed. Instal x86 version for betteer image align performance");
                }

                _pathtoenfuse = Path.Combine(Settings.ApplicationFolder, "Tools", "x64", "enfuse.exe");
            }
        }