mirror of
https://github.com/greenshot/greenshot
synced 2025-08-26 16:16:06 -07:00
Small improvements of the file configuration and some others.
This commit is contained in:
parent
f4e7f19ef6
commit
0aa4aa2d0e
4 changed files with 25 additions and 13 deletions
|
@ -169,7 +169,7 @@ namespace Greenshot.Addon.Confluence
|
|||
{
|
||||
// TODO: Create content
|
||||
new PleaseWaitForm().ShowAndWait(Description, _confluenceLanguage.CommunicationWait,
|
||||
() => _confluenceClient.Attachment.AttachAsync(""+page.Id, surfaceToUpload, filename, null, "image/" + _confluenceConfiguration.UploadFormat.ToString().ToLower())
|
||||
() => _confluenceClient.Attachment.AttachAsync(page.Id, surfaceToUpload, filename, null, "image/" + _confluenceConfiguration.UploadFormat.ToString().ToLower())
|
||||
);
|
||||
Log.Debug().WriteLine("Uploaded to Confluence.");
|
||||
if (!_confluenceConfiguration.CopyWikiMarkupForImageToClipboard)
|
||||
|
|
|
@ -77,6 +77,7 @@ namespace Greenshot.Addons.ViewModels
|
|||
_destinationFileConfiguration = value;
|
||||
NotifyOfPropertyChange(nameof(DestinationFileConfigurationVisiblity));
|
||||
NotifyOfPropertyChange(nameof(AreGlobalSettingsEnabled));
|
||||
NotifyOfPropertyChange(nameof(OwnSettingsVisibility));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -86,9 +87,19 @@ namespace Greenshot.Addons.ViewModels
|
|||
public bool AreGlobalSettingsEnabled => DestinationFileConfiguration == null;
|
||||
|
||||
/// <summary>
|
||||
/// If there is a DestinationFileConfiguration, the configuration is shown
|
||||
/// If there is a DestinationFileConfiguration, the checkbox is shown
|
||||
/// </summary>
|
||||
public Visibility DestinationFileConfigurationVisiblity => DestinationFileConfiguration == null ? Visibility.Collapsed : Visibility.Visible;
|
||||
public Visibility OwnSettingsVisibility => DestinationFileConfiguration != null? Visibility.Visible : Visibility.Collapsed;
|
||||
|
||||
/// <summary>
|
||||
/// If there is a DestinationFileConfiguration and use own settings is set the configuration is shown
|
||||
/// </summary>
|
||||
public Visibility DestinationFileConfigurationVisiblity => DestinationFileConfiguration != null && _useOwnSettings ? Visibility.Visible : Visibility.Collapsed;
|
||||
|
||||
/// <summary>
|
||||
/// If there is a DestinationFileConfiguration, the global configuration is not shown
|
||||
/// </summary>
|
||||
public Visibility GlobalFileConfigurationVisiblity => AreGlobalSettingsEnabled || !_useOwnSettings ? Visibility.Visible : Visibility.Collapsed;
|
||||
|
||||
/// <summary>
|
||||
/// The globally selected format
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
d:DataContext="{d:DesignInstance viewModels:FileConfigPartViewModel,IsDesignTimeCreatable=False}"
|
||||
>
|
||||
<StackPanel>
|
||||
<StackPanel Visibility="{Binding DestinationFileConfigurationVisiblity}">
|
||||
<StackPanel Visibility="{Binding OwnSettingsVisibility}">
|
||||
<CheckBox Content="Use destination settings" IsChecked="{Binding UseOwnSettings}" />
|
||||
</StackPanel>
|
||||
<StackPanel Visibility="{Binding DestinationFileConfigurationVisiblity}" IsEnabled="{Binding UseOwnSettings}">
|
||||
|
@ -21,8 +21,7 @@
|
|||
<Slider Maximum="100" Value="{Binding DestinationFileConfiguration.OutputFileJpegQuality}"/>
|
||||
</DockPanel>
|
||||
</StackPanel>
|
||||
<Separator Visibility="{Binding DestinationFileConfigurationVisiblity}"/>
|
||||
<StackPanel IsEnabled="{Binding AreGlobalSettingsEnabled}">
|
||||
<StackPanel IsEnabled="{Binding AreGlobalSettingsEnabled}" Visibility="{Binding GlobalFileConfigurationVisiblity}">
|
||||
<DockPanel LastChildFill="True">
|
||||
<Label Content="{Binding GreenshotLanguage.SettingsPrimaryimageformat}" Width="100" />
|
||||
<ComboBox SelectedValue="{Binding SelectedFormat}" ItemsSource="{Binding Formats}" SelectedValuePath="Key" DisplayMemberPath="Value" />
|
||||
|
|
|
@ -86,13 +86,15 @@ namespace GreenshotOCRCommand
|
|||
{
|
||||
foreach (var word in ToEnumerable(layout.Words))
|
||||
{
|
||||
if (word.Rects != null)
|
||||
{
|
||||
foreach (var rect in ToEnumerable(word.Rects))
|
||||
{
|
||||
Debug.WriteLine($"Rect {rect.Left},{rect.Top},{rect.Right},{rect.Bottom} - Word {word.Text} : Confidence: {word.RecognitionConfidence}");
|
||||
}
|
||||
}
|
||||
if (word.Rects == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach (var rect in ToEnumerable(word.Rects))
|
||||
{
|
||||
Debug.WriteLine($"Rect {rect.Left},{rect.Top},{rect.Right},{rect.Bottom} - Word {word.Text} : Confidence: {word.RecognitionConfidence}");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue