mirror of
https://github.com/greenshot/greenshot
synced 2025-08-22 22:34:27 -07:00
Renamed INetworkConfiguration to IHttpConfiguration
This commit is contained in:
parent
a65e2292b9
commit
ed90f2eb43
14 changed files with 46 additions and 46 deletions
|
@ -60,7 +60,7 @@ namespace Greenshot.Addon.Box
|
||||||
private readonly IBoxConfiguration _boxConfiguration;
|
private readonly IBoxConfiguration _boxConfiguration;
|
||||||
private readonly IBoxLanguage _boxLanguage;
|
private readonly IBoxLanguage _boxLanguage;
|
||||||
private readonly Func<CancellationTokenSource, Owned<PleaseWaitForm>> _pleaseWaitFormFactory;
|
private readonly Func<CancellationTokenSource, Owned<PleaseWaitForm>> _pleaseWaitFormFactory;
|
||||||
private readonly INetworkConfiguration _networkConfiguration;
|
private readonly IHttpConfiguration _httpConfiguration;
|
||||||
private readonly IResourceProvider _resourceProvider;
|
private readonly IResourceProvider _resourceProvider;
|
||||||
private readonly OAuth2Settings _oauth2Settings;
|
private readonly OAuth2Settings _oauth2Settings;
|
||||||
private static readonly Uri UploadFileUri = new Uri("https://upload.box.com/api/2.0/files/content");
|
private static readonly Uri UploadFileUri = new Uri("https://upload.box.com/api/2.0/files/content");
|
||||||
|
@ -73,14 +73,14 @@ namespace Greenshot.Addon.Box
|
||||||
IBoxConfiguration boxConfiguration,
|
IBoxConfiguration boxConfiguration,
|
||||||
IBoxLanguage boxLanguage,
|
IBoxLanguage boxLanguage,
|
||||||
Func<CancellationTokenSource, Owned<PleaseWaitForm>> pleaseWaitFormFactory,
|
Func<CancellationTokenSource, Owned<PleaseWaitForm>> pleaseWaitFormFactory,
|
||||||
INetworkConfiguration networkConfiguration,
|
IHttpConfiguration httpConfiguration,
|
||||||
IResourceProvider resourceProvider) : base(coreConfiguration, greenshotLanguage)
|
IResourceProvider resourceProvider) : base(coreConfiguration, greenshotLanguage)
|
||||||
{
|
{
|
||||||
_exportNotification = exportNotification;
|
_exportNotification = exportNotification;
|
||||||
_boxConfiguration = boxConfiguration;
|
_boxConfiguration = boxConfiguration;
|
||||||
_boxLanguage = boxLanguage;
|
_boxLanguage = boxLanguage;
|
||||||
_pleaseWaitFormFactory = pleaseWaitFormFactory;
|
_pleaseWaitFormFactory = pleaseWaitFormFactory;
|
||||||
_networkConfiguration = networkConfiguration;
|
_httpConfiguration = httpConfiguration;
|
||||||
_resourceProvider = resourceProvider;
|
_resourceProvider = resourceProvider;
|
||||||
|
|
||||||
_oauth2Settings = new OAuth2Settings
|
_oauth2Settings = new OAuth2Settings
|
||||||
|
@ -187,7 +187,7 @@ namespace Greenshot.Addon.Box
|
||||||
|
|
||||||
var oauthHttpBehaviour = HttpBehaviour.Current.ShallowClone();
|
var oauthHttpBehaviour = HttpBehaviour.Current.ShallowClone();
|
||||||
// Use the network settings
|
// Use the network settings
|
||||||
oauthHttpBehaviour.HttpSettings = _networkConfiguration;
|
oauthHttpBehaviour.HttpSettings = _httpConfiguration;
|
||||||
// Use UploadProgress
|
// Use UploadProgress
|
||||||
if (progress != null)
|
if (progress != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -71,7 +71,7 @@ namespace Greenshot.Addon.Dropbox
|
||||||
public DropboxDestination(
|
public DropboxDestination(
|
||||||
IDropboxConfiguration dropboxPluginConfiguration,
|
IDropboxConfiguration dropboxPluginConfiguration,
|
||||||
IDropboxLanguage dropboxLanguage,
|
IDropboxLanguage dropboxLanguage,
|
||||||
INetworkConfiguration networkConfiguration,
|
IHttpConfiguration httpConfiguration,
|
||||||
IResourceProvider resourceProvider,
|
IResourceProvider resourceProvider,
|
||||||
ICoreConfiguration coreConfiguration,
|
ICoreConfiguration coreConfiguration,
|
||||||
IGreenshotLanguage greenshotLanguage,
|
IGreenshotLanguage greenshotLanguage,
|
||||||
|
@ -108,7 +108,7 @@ namespace Greenshot.Addon.Dropbox
|
||||||
|
|
||||||
_oAuthHttpBehaviour = httpBehaviour;
|
_oAuthHttpBehaviour = httpBehaviour;
|
||||||
// Use the default network settings
|
// Use the default network settings
|
||||||
httpBehaviour.HttpSettings = networkConfiguration;
|
httpBehaviour.HttpSettings = httpConfiguration;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override Bitmap DisplayIcon
|
public override Bitmap DisplayIcon
|
||||||
|
|
|
@ -83,7 +83,7 @@ namespace Greenshot.Addon.Flickr
|
||||||
public FlickrDestination(
|
public FlickrDestination(
|
||||||
IFlickrConfiguration flickrConfiguration,
|
IFlickrConfiguration flickrConfiguration,
|
||||||
IFlickrLanguage flickrLanguage,
|
IFlickrLanguage flickrLanguage,
|
||||||
INetworkConfiguration networkConfiguration,
|
IHttpConfiguration httpConfiguration,
|
||||||
IResourceProvider resourceProvider,
|
IResourceProvider resourceProvider,
|
||||||
ICoreConfiguration coreConfiguration,
|
ICoreConfiguration coreConfiguration,
|
||||||
IGreenshotLanguage greenshotLanguage,
|
IGreenshotLanguage greenshotLanguage,
|
||||||
|
@ -123,7 +123,7 @@ namespace Greenshot.Addon.Flickr
|
||||||
_oAuthHttpBehaviour = OAuth1HttpBehaviourFactory.Create(_oAuthSettings);
|
_oAuthHttpBehaviour = OAuth1HttpBehaviourFactory.Create(_oAuthSettings);
|
||||||
_oAuthHttpBehaviour.ValidateResponseContentType = false;
|
_oAuthHttpBehaviour.ValidateResponseContentType = false;
|
||||||
// Use the default network settings
|
// Use the default network settings
|
||||||
_oAuthHttpBehaviour.HttpSettings = networkConfiguration;
|
_oAuthHttpBehaviour.HttpSettings = httpConfiguration;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string Description => _flickrLanguage.UploadMenuItem;
|
public override string Description => _flickrLanguage.UploadMenuItem;
|
||||||
|
|
|
@ -57,7 +57,7 @@ namespace Greenshot.Addon.GooglePhotos
|
||||||
private static readonly LogSource Log = new LogSource();
|
private static readonly LogSource Log = new LogSource();
|
||||||
private readonly IGooglePhotosConfiguration _googlePhotosConfiguration;
|
private readonly IGooglePhotosConfiguration _googlePhotosConfiguration;
|
||||||
private readonly IGooglePhotosLanguage _googlePhotosLanguage;
|
private readonly IGooglePhotosLanguage _googlePhotosLanguage;
|
||||||
private readonly INetworkConfiguration _networkConfiguration;
|
private readonly IHttpConfiguration _httpConfiguration;
|
||||||
private readonly IResourceProvider _resourceProvider;
|
private readonly IResourceProvider _resourceProvider;
|
||||||
private readonly ExportNotification _exportNotification;
|
private readonly ExportNotification _exportNotification;
|
||||||
private readonly Func<CancellationTokenSource, Owned<PleaseWaitForm>> _pleaseWaitFormFactory;
|
private readonly Func<CancellationTokenSource, Owned<PleaseWaitForm>> _pleaseWaitFormFactory;
|
||||||
|
@ -66,7 +66,7 @@ namespace Greenshot.Addon.GooglePhotos
|
||||||
public GooglePhotosDestination(
|
public GooglePhotosDestination(
|
||||||
IGooglePhotosConfiguration googlePhotosConfiguration,
|
IGooglePhotosConfiguration googlePhotosConfiguration,
|
||||||
IGooglePhotosLanguage googlePhotosLanguage,
|
IGooglePhotosLanguage googlePhotosLanguage,
|
||||||
INetworkConfiguration networkConfiguration,
|
IHttpConfiguration httpConfiguration,
|
||||||
IResourceProvider resourceProvider,
|
IResourceProvider resourceProvider,
|
||||||
ICoreConfiguration coreConfiguration,
|
ICoreConfiguration coreConfiguration,
|
||||||
IGreenshotLanguage greenshotLanguage,
|
IGreenshotLanguage greenshotLanguage,
|
||||||
|
@ -76,7 +76,7 @@ namespace Greenshot.Addon.GooglePhotos
|
||||||
{
|
{
|
||||||
_googlePhotosConfiguration = googlePhotosConfiguration;
|
_googlePhotosConfiguration = googlePhotosConfiguration;
|
||||||
_googlePhotosLanguage = googlePhotosLanguage;
|
_googlePhotosLanguage = googlePhotosLanguage;
|
||||||
_networkConfiguration = networkConfiguration;
|
_httpConfiguration = httpConfiguration;
|
||||||
_resourceProvider = resourceProvider;
|
_resourceProvider = resourceProvider;
|
||||||
_exportNotification = exportNotification;
|
_exportNotification = exportNotification;
|
||||||
_pleaseWaitFormFactory = pleaseWaitFormFactory;
|
_pleaseWaitFormFactory = pleaseWaitFormFactory;
|
||||||
|
@ -178,7 +178,7 @@ namespace Greenshot.Addon.GooglePhotos
|
||||||
string filename = surface.GenerateFilename(CoreConfiguration, _googlePhotosConfiguration);
|
string filename = surface.GenerateFilename(CoreConfiguration, _googlePhotosConfiguration);
|
||||||
|
|
||||||
var oAuthHttpBehaviour = HttpBehaviour.Current.ShallowClone();
|
var oAuthHttpBehaviour = HttpBehaviour.Current.ShallowClone();
|
||||||
oAuthHttpBehaviour.HttpSettings = _networkConfiguration;
|
oAuthHttpBehaviour.HttpSettings = _httpConfiguration;
|
||||||
// Use UploadProgress
|
// Use UploadProgress
|
||||||
if (progress != null)
|
if (progress != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -61,7 +61,7 @@ namespace Greenshot.Addon.Imgur
|
||||||
public ImgurApi(
|
public ImgurApi(
|
||||||
IImgurConfiguration imgurConfiguration,
|
IImgurConfiguration imgurConfiguration,
|
||||||
ICoreConfiguration coreConfiguration,
|
ICoreConfiguration coreConfiguration,
|
||||||
INetworkConfiguration networkConfiguration)
|
IHttpConfiguration httpConfiguration)
|
||||||
{
|
{
|
||||||
_imgurConfiguration = imgurConfiguration;
|
_imgurConfiguration = imgurConfiguration;
|
||||||
_coreConfiguration = coreConfiguration;
|
_coreConfiguration = coreConfiguration;
|
||||||
|
@ -88,7 +88,7 @@ namespace Greenshot.Addon.Imgur
|
||||||
|
|
||||||
Behaviour = new HttpBehaviour
|
Behaviour = new HttpBehaviour
|
||||||
{
|
{
|
||||||
HttpSettings = networkConfiguration,
|
HttpSettings = httpConfiguration,
|
||||||
JsonSerializer = new JsonNetJsonSerializer(),
|
JsonSerializer = new JsonNetJsonSerializer(),
|
||||||
OnHttpClientCreated = httpClient =>
|
OnHttpClientCreated = httpClient =>
|
||||||
{
|
{
|
||||||
|
|
|
@ -66,13 +66,13 @@ namespace Greenshot.Addon.Jira
|
||||||
IJiraConfiguration jiraConfiguration,
|
IJiraConfiguration jiraConfiguration,
|
||||||
JiraMonitor jiraMonitor,
|
JiraMonitor jiraMonitor,
|
||||||
ICoreConfiguration coreConfiguration,
|
ICoreConfiguration coreConfiguration,
|
||||||
INetworkConfiguration networkConfiguration)
|
IHttpConfiguration httpConfiguration)
|
||||||
{
|
{
|
||||||
jiraConfiguration.Url = jiraConfiguration.Url.Replace(DefaultPostfix, "");
|
jiraConfiguration.Url = jiraConfiguration.Url.Replace(DefaultPostfix, "");
|
||||||
_jiraConfiguration = jiraConfiguration;
|
_jiraConfiguration = jiraConfiguration;
|
||||||
_jiraMonitor = jiraMonitor;
|
_jiraMonitor = jiraMonitor;
|
||||||
_coreConfiguration = coreConfiguration;
|
_coreConfiguration = coreConfiguration;
|
||||||
_jiraClient = JiraClient.Create(new Uri(jiraConfiguration.Url), networkConfiguration);
|
_jiraClient = JiraClient.Create(new Uri(jiraConfiguration.Url), httpConfiguration);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Bitmap FavIcon { get; private set; }
|
public Bitmap FavIcon { get; private set; }
|
||||||
|
|
|
@ -74,7 +74,7 @@ namespace Greenshot.Addon.OneDrive
|
||||||
public OneDriveDestination(
|
public OneDriveDestination(
|
||||||
IOneDriveConfiguration oneDriveConfiguration,
|
IOneDriveConfiguration oneDriveConfiguration,
|
||||||
IOneDriveLanguage oneDriveLanguage,
|
IOneDriveLanguage oneDriveLanguage,
|
||||||
INetworkConfiguration networkConfiguration,
|
IHttpConfiguration httpConfiguration,
|
||||||
IResourceProvider resourceProvider,
|
IResourceProvider resourceProvider,
|
||||||
Func<CancellationTokenSource, Owned<PleaseWaitForm>> pleaseWaitFormFactory,
|
Func<CancellationTokenSource, Owned<PleaseWaitForm>> pleaseWaitFormFactory,
|
||||||
ICoreConfiguration coreConfiguration,
|
ICoreConfiguration coreConfiguration,
|
||||||
|
@ -109,7 +109,7 @@ namespace Greenshot.Addon.OneDrive
|
||||||
};
|
};
|
||||||
_oneDriveHttpBehaviour = new HttpBehaviour
|
_oneDriveHttpBehaviour = new HttpBehaviour
|
||||||
{
|
{
|
||||||
HttpSettings = networkConfiguration,
|
HttpSettings = httpConfiguration,
|
||||||
JsonSerializer = new JsonNetJsonSerializer()
|
JsonSerializer = new JsonNetJsonSerializer()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ namespace Greenshot.Addon.Photobucket
|
||||||
private readonly string _albumPath;
|
private readonly string _albumPath;
|
||||||
private readonly IPhotobucketConfiguration _photobucketConfiguration;
|
private readonly IPhotobucketConfiguration _photobucketConfiguration;
|
||||||
private readonly IPhotobucketLanguage _photobucketLanguage;
|
private readonly IPhotobucketLanguage _photobucketLanguage;
|
||||||
private readonly INetworkConfiguration _networkConfiguration;
|
private readonly IHttpConfiguration _httpConfiguration;
|
||||||
private readonly IResourceProvider _resourceProvider;
|
private readonly IResourceProvider _resourceProvider;
|
||||||
private readonly ExportNotification _exportNotification;
|
private readonly ExportNotification _exportNotification;
|
||||||
private readonly OAuth1Settings _oAuthSettings;
|
private readonly OAuth1Settings _oAuthSettings;
|
||||||
|
@ -69,7 +69,7 @@ namespace Greenshot.Addon.Photobucket
|
||||||
public PhotobucketDestination(
|
public PhotobucketDestination(
|
||||||
IPhotobucketConfiguration photobucketConfiguration,
|
IPhotobucketConfiguration photobucketConfiguration,
|
||||||
IPhotobucketLanguage photobucketLanguage,
|
IPhotobucketLanguage photobucketLanguage,
|
||||||
INetworkConfiguration networkConfiguration,
|
IHttpConfiguration httpConfiguration,
|
||||||
IResourceProvider resourceProvider,
|
IResourceProvider resourceProvider,
|
||||||
ICoreConfiguration coreConfiguration,
|
ICoreConfiguration coreConfiguration,
|
||||||
IGreenshotLanguage greenshotLanguage,
|
IGreenshotLanguage greenshotLanguage,
|
||||||
|
@ -78,7 +78,7 @@ namespace Greenshot.Addon.Photobucket
|
||||||
{
|
{
|
||||||
_photobucketConfiguration = photobucketConfiguration;
|
_photobucketConfiguration = photobucketConfiguration;
|
||||||
_photobucketLanguage = photobucketLanguage;
|
_photobucketLanguage = photobucketLanguage;
|
||||||
_networkConfiguration = networkConfiguration;
|
_httpConfiguration = httpConfiguration;
|
||||||
_resourceProvider = resourceProvider;
|
_resourceProvider = resourceProvider;
|
||||||
_exportNotification = exportNotification;
|
_exportNotification = exportNotification;
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ namespace Greenshot.Addon.Photobucket
|
||||||
CheckVerifier = false
|
CheckVerifier = false
|
||||||
};
|
};
|
||||||
var oAuthHttpBehaviour = OAuth1HttpBehaviourFactory.Create(_oAuthSettings);
|
var oAuthHttpBehaviour = OAuth1HttpBehaviourFactory.Create(_oAuthSettings);
|
||||||
oAuthHttpBehaviour.HttpSettings = networkConfiguration;
|
oAuthHttpBehaviour.HttpSettings = httpConfiguration;
|
||||||
// Store the leftover values
|
// Store the leftover values
|
||||||
oAuthHttpBehaviour.OnAccessTokenValues = values =>
|
oAuthHttpBehaviour.OnAccessTokenValues = values =>
|
||||||
{
|
{
|
||||||
|
@ -144,12 +144,12 @@ namespace Greenshot.Addon.Photobucket
|
||||||
protected PhotobucketDestination(
|
protected PhotobucketDestination(
|
||||||
IPhotobucketConfiguration photobucketConfiguration,
|
IPhotobucketConfiguration photobucketConfiguration,
|
||||||
IPhotobucketLanguage photobucketLanguage,
|
IPhotobucketLanguage photobucketLanguage,
|
||||||
INetworkConfiguration networkConfiguration,
|
IHttpConfiguration httpConfiguration,
|
||||||
IResourceProvider resourceProvider,
|
IResourceProvider resourceProvider,
|
||||||
string albumPath,
|
string albumPath,
|
||||||
ICoreConfiguration coreConfiguration,
|
ICoreConfiguration coreConfiguration,
|
||||||
IGreenshotLanguage greenshotLanguage,
|
IGreenshotLanguage greenshotLanguage,
|
||||||
ExportNotification exportNotification) : this(photobucketConfiguration, photobucketLanguage, networkConfiguration, resourceProvider, coreConfiguration, greenshotLanguage, exportNotification)
|
ExportNotification exportNotification) : this(photobucketConfiguration, photobucketLanguage, httpConfiguration, resourceProvider, coreConfiguration, greenshotLanguage, exportNotification)
|
||||||
{
|
{
|
||||||
_photobucketConfiguration = photobucketConfiguration;
|
_photobucketConfiguration = photobucketConfiguration;
|
||||||
_albumPath = albumPath;
|
_albumPath = albumPath;
|
||||||
|
@ -204,7 +204,7 @@ namespace Greenshot.Addon.Photobucket
|
||||||
yield return new PhotobucketDestination(
|
yield return new PhotobucketDestination(
|
||||||
_photobucketConfiguration,
|
_photobucketConfiguration,
|
||||||
_photobucketLanguage,
|
_photobucketLanguage,
|
||||||
_networkConfiguration,
|
_httpConfiguration,
|
||||||
_resourceProvider,
|
_resourceProvider,
|
||||||
album,
|
album,
|
||||||
CoreConfiguration,
|
CoreConfiguration,
|
||||||
|
|
|
@ -51,14 +51,14 @@ namespace Greenshot.Addon.Tfs
|
||||||
public TfsClient(
|
public TfsClient(
|
||||||
ICoreConfiguration coreConfiguration,
|
ICoreConfiguration coreConfiguration,
|
||||||
ITfsConfiguration tfsConfiguration,
|
ITfsConfiguration tfsConfiguration,
|
||||||
INetworkConfiguration networkConfiguration)
|
IHttpConfiguration httpConfiguration)
|
||||||
{
|
{
|
||||||
_coreConfiguration = coreConfiguration;
|
_coreConfiguration = coreConfiguration;
|
||||||
_tfsConfiguration = tfsConfiguration;
|
_tfsConfiguration = tfsConfiguration;
|
||||||
|
|
||||||
_tfsHttpBehaviour = new HttpBehaviour
|
_tfsHttpBehaviour = new HttpBehaviour
|
||||||
{
|
{
|
||||||
HttpSettings = networkConfiguration,
|
HttpSettings = httpConfiguration,
|
||||||
JsonSerializer = new JsonNetJsonSerializer()
|
JsonSerializer = new JsonNetJsonSerializer()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -54,8 +54,8 @@ namespace Greenshot.Addons
|
||||||
.SingleInstance();
|
.SingleInstance();
|
||||||
|
|
||||||
builder
|
builder
|
||||||
.Register(context => IniConfig.Current.Get<INetworkConfiguration>())
|
.Register(context => IniConfig.Current.Get<IHttpConfiguration>())
|
||||||
.As<INetworkConfiguration>()
|
.As<IHttpConfiguration>()
|
||||||
.SingleInstance();
|
.SingleInstance();
|
||||||
|
|
||||||
builder
|
builder
|
||||||
|
|
|
@ -37,7 +37,7 @@ namespace Greenshot.Addons.Core
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[IniSection("Network")]
|
[IniSection("Network")]
|
||||||
[Description("Greenshot network configuration")]
|
[Description("Greenshot network configuration")]
|
||||||
public interface INetworkConfiguration : IIniSection, IHttpSettings, INotifyPropertyChanged, IWriteProtectProperties, IDefaultValue, ITransactionalProperties
|
public interface IHttpConfiguration : IIniSection, IHttpSettings, INotifyPropertyChanged, IWriteProtectProperties, IDefaultValue, ITransactionalProperties
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -223,7 +223,7 @@
|
||||||
<Compile Include="Core\ExplorerHelper.cs" />
|
<Compile Include="Core\ExplorerHelper.cs" />
|
||||||
<Compile Include="Core\Enums\OutputFormats.cs" />
|
<Compile Include="Core\Enums\OutputFormats.cs" />
|
||||||
<Compile Include="Core\Enums\WindowCaptureModes.cs" />
|
<Compile Include="Core\Enums\WindowCaptureModes.cs" />
|
||||||
<Compile Include="Core\INetworkConfiguration.cs" />
|
<Compile Include="Core\IHttpConfiguration.cs" />
|
||||||
<Compile Include="Core\IDestinationFileConfiguration.cs" />
|
<Compile Include="Core\IDestinationFileConfiguration.cs" />
|
||||||
<Compile Include="Core\ImageOutput.cs" />
|
<Compile Include="Core\ImageOutput.cs" />
|
||||||
<Compile Include="Core\InteropWindowExtensions.cs" />
|
<Compile Include="Core\InteropWindowExtensions.cs" />
|
||||||
|
|
|
@ -38,16 +38,16 @@ namespace Greenshot.Ui.Configuration.ViewModels
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private CompositeDisposable _disposables;
|
private CompositeDisposable _disposables;
|
||||||
|
|
||||||
public INetworkConfiguration NetworkConfiguration { get; }
|
public IHttpConfiguration HttpConfiguration { get; }
|
||||||
|
|
||||||
public IGreenshotLanguage GreenshotLanguage { get; }
|
public IGreenshotLanguage GreenshotLanguage { get; }
|
||||||
|
|
||||||
public NetworkConfigViewModel(
|
public NetworkConfigViewModel(
|
||||||
INetworkConfiguration networkConfiguration,
|
IHttpConfiguration httpConfiguration,
|
||||||
IGreenshotLanguage greenshotLanguage
|
IGreenshotLanguage greenshotLanguage
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
NetworkConfiguration = networkConfiguration;
|
HttpConfiguration = httpConfiguration;
|
||||||
GreenshotLanguage = greenshotLanguage;
|
GreenshotLanguage = greenshotLanguage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ namespace Greenshot.Ui.Configuration.ViewModels
|
||||||
_disposables?.Dispose();
|
_disposables?.Dispose();
|
||||||
|
|
||||||
// Make sure Commit/Rollback is called on the IUiConfiguration
|
// Make sure Commit/Rollback is called on the IUiConfiguration
|
||||||
config.Register(NetworkConfiguration);
|
config.Register(HttpConfiguration);
|
||||||
|
|
||||||
this.VisibleOnPermissions("Expert");
|
this.VisibleOnPermissions("Expert");
|
||||||
|
|
||||||
|
|
|
@ -8,19 +8,19 @@
|
||||||
d:DataContext="{d:DesignInstance viewModels:NetworkConfigViewModel,IsDesignTimeCreatable=False}"
|
d:DataContext="{d:DesignInstance viewModels:NetworkConfigViewModel,IsDesignTimeCreatable=False}"
|
||||||
>
|
>
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<CheckBox Content="Allow auto redirect" IsChecked="{Binding NetworkConfiguration.AllowAutoRedirect}" />
|
<CheckBox Content="Allow auto redirect" IsChecked="{Binding HttpConfiguration.AllowAutoRedirect}" />
|
||||||
<CheckBox Content="Allow pipelining" IsChecked="{Binding NetworkConfiguration.AllowPipelining}" />
|
<CheckBox Content="Allow pipelining" IsChecked="{Binding HttpConfiguration.AllowPipelining}" />
|
||||||
<CheckBox Content="Ignore SSL certificate errors" IsChecked="{Binding NetworkConfiguration.IgnoreSslCertificateErrors}" />
|
<CheckBox Content="Ignore SSL certificate errors" IsChecked="{Binding HttpConfiguration.IgnoreSslCertificateErrors}" />
|
||||||
<CheckBox Content="Pre authenticate" IsChecked="{Binding NetworkConfiguration.PreAuthenticate}" />
|
<CheckBox Content="Pre authenticate" IsChecked="{Binding HttpConfiguration.PreAuthenticate}" />
|
||||||
<CheckBox Content="Expect 100 continue" IsChecked="{Binding NetworkConfiguration.Expect100Continue}" />
|
<CheckBox Content="Expect 100 continue" IsChecked="{Binding HttpConfiguration.Expect100Continue}" />
|
||||||
<CheckBox Content="Use cookies" IsChecked="{Binding NetworkConfiguration.UseCookies}" />
|
<CheckBox Content="Use cookies" IsChecked="{Binding HttpConfiguration.UseCookies}" />
|
||||||
<CheckBox Content="Use default credentials" IsChecked="{Binding NetworkConfiguration.UseDefaultCredentials}" />
|
<CheckBox Content="Use default credentials" IsChecked="{Binding HttpConfiguration.UseDefaultCredentials}" />
|
||||||
<CheckBox Content="Use default proxy" IsChecked="{Binding NetworkConfiguration.UseDefaultProxy}" />
|
<CheckBox Content="Use default proxy" IsChecked="{Binding HttpConfiguration.UseDefaultProxy}" />
|
||||||
<CheckBox Content="Use proxy" IsChecked="{Binding NetworkConfiguration.UseProxy}" />
|
<CheckBox Content="Use proxy" IsChecked="{Binding HttpConfiguration.UseProxy}" />
|
||||||
<CheckBox Content="Use default credentials for proxy" IsChecked="{Binding NetworkConfiguration.UseDefaultCredentialsForProxy}" />
|
<CheckBox Content="Use default credentials for proxy" IsChecked="{Binding HttpConfiguration.UseDefaultCredentialsForProxy}" />
|
||||||
<DockPanel LastChildFill="True">
|
<DockPanel LastChildFill="True">
|
||||||
<Label Content="DefaultUseAgent" Width="100" />
|
<Label Content="DefaultUseAgent" Width="100" />
|
||||||
<TextBox Text="{Binding NetworkConfiguration.DefaultUserAgent}"></TextBox>
|
<TextBox Text="{Binding HttpConfiguration.DefaultUserAgent}"></TextBox>
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue