mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 17:56:51 +13:00
Rename more controls
This commit is contained in:
parent
c4b1ffabc6
commit
530aad7f05
7 changed files with 1610 additions and 1189 deletions
|
@ -45,7 +45,7 @@ private void InitializeComponent()
|
||||||
this.tbOpusBitrate = new System.Windows.Forms.TrackBar();
|
this.tbOpusBitrate = new System.Windows.Forms.TrackBar();
|
||||||
this.nudGIFBayerScale = new System.Windows.Forms.NumericUpDown();
|
this.nudGIFBayerScale = new System.Windows.Forms.NumericUpDown();
|
||||||
this.lblCodec = new System.Windows.Forms.Label();
|
this.lblCodec = new System.Windows.Forms.Label();
|
||||||
this.cboVideoCodec = new System.Windows.Forms.ComboBox();
|
this.cbVideoCodec = new System.Windows.Forms.ComboBox();
|
||||||
this.lblx264Preset = new System.Windows.Forms.Label();
|
this.lblx264Preset = new System.Windows.Forms.Label();
|
||||||
this.lblXvidQscale = new System.Windows.Forms.Label();
|
this.lblXvidQscale = new System.Windows.Forms.Label();
|
||||||
this.gbFFmpegExe = new System.Windows.Forms.GroupBox();
|
this.gbFFmpegExe = new System.Windows.Forms.GroupBox();
|
||||||
|
@ -94,11 +94,11 @@ private void InitializeComponent()
|
||||||
this.lblVorbisQuality = new System.Windows.Forms.Label();
|
this.lblVorbisQuality = new System.Windows.Forms.Label();
|
||||||
this.tpMP3 = new System.Windows.Forms.TabPage();
|
this.tpMP3 = new System.Windows.Forms.TabPage();
|
||||||
this.lblMP3Quality = new System.Windows.Forms.Label();
|
this.lblMP3Quality = new System.Windows.Forms.Label();
|
||||||
this.cboVideoSource = new System.Windows.Forms.ComboBox();
|
this.cbVideoSource = new System.Windows.Forms.ComboBox();
|
||||||
this.lblVideoSource = new System.Windows.Forms.Label();
|
this.lblVideoSource = new System.Windows.Forms.Label();
|
||||||
this.cboAudioSource = new System.Windows.Forms.ComboBox();
|
this.cbAudioSource = new System.Windows.Forms.ComboBox();
|
||||||
this.lblAudioSource = new System.Windows.Forms.Label();
|
this.lblAudioSource = new System.Windows.Forms.Label();
|
||||||
this.cboAudioCodec = new System.Windows.Forms.ComboBox();
|
this.cbAudioCodec = new System.Windows.Forms.ComboBox();
|
||||||
this.lblAudioCodec = new System.Windows.Forms.Label();
|
this.lblAudioCodec = new System.Windows.Forms.Label();
|
||||||
this.gbSource = new System.Windows.Forms.GroupBox();
|
this.gbSource = new System.Windows.Forms.GroupBox();
|
||||||
this.btnHelperDevicesHelp = new System.Windows.Forms.Button();
|
this.btnHelperDevicesHelp = new System.Windows.Forms.Button();
|
||||||
|
@ -307,13 +307,13 @@ private void InitializeComponent()
|
||||||
resources.ApplyResources(this.lblCodec, "lblCodec");
|
resources.ApplyResources(this.lblCodec, "lblCodec");
|
||||||
this.lblCodec.Name = "lblCodec";
|
this.lblCodec.Name = "lblCodec";
|
||||||
//
|
//
|
||||||
// cboVideoCodec
|
// cbVideoCodec
|
||||||
//
|
//
|
||||||
this.cboVideoCodec.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
this.cbVideoCodec.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
this.cboVideoCodec.FormattingEnabled = true;
|
this.cbVideoCodec.FormattingEnabled = true;
|
||||||
resources.ApplyResources(this.cboVideoCodec, "cboVideoCodec");
|
resources.ApplyResources(this.cbVideoCodec, "cbVideoCodec");
|
||||||
this.cboVideoCodec.Name = "cboVideoCodec";
|
this.cbVideoCodec.Name = "cbVideoCodec";
|
||||||
this.cboVideoCodec.SelectedIndexChanged += new System.EventHandler(this.cboVideoCodec_SelectedIndexChanged);
|
this.cbVideoCodec.SelectedIndexChanged += new System.EventHandler(this.cbVideoCodec_SelectedIndexChanged);
|
||||||
//
|
//
|
||||||
// lblx264Preset
|
// lblx264Preset
|
||||||
//
|
//
|
||||||
|
@ -706,39 +706,39 @@ private void InitializeComponent()
|
||||||
resources.ApplyResources(this.lblMP3Quality, "lblMP3Quality");
|
resources.ApplyResources(this.lblMP3Quality, "lblMP3Quality");
|
||||||
this.lblMP3Quality.Name = "lblMP3Quality";
|
this.lblMP3Quality.Name = "lblMP3Quality";
|
||||||
//
|
//
|
||||||
// cboVideoSource
|
// cbVideoSource
|
||||||
//
|
//
|
||||||
this.cboVideoSource.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
this.cbVideoSource.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
this.cboVideoSource.FormattingEnabled = true;
|
this.cbVideoSource.FormattingEnabled = true;
|
||||||
resources.ApplyResources(this.cboVideoSource, "cboVideoSource");
|
resources.ApplyResources(this.cbVideoSource, "cbVideoSource");
|
||||||
this.cboVideoSource.Name = "cboVideoSource";
|
this.cbVideoSource.Name = "cbVideoSource";
|
||||||
this.cboVideoSource.SelectedIndexChanged += new System.EventHandler(this.cboVideoSource_SelectedIndexChanged);
|
this.cbVideoSource.SelectedIndexChanged += new System.EventHandler(this.cbVideoSource_SelectedIndexChanged);
|
||||||
//
|
//
|
||||||
// lblVideoSource
|
// lblVideoSource
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.lblVideoSource, "lblVideoSource");
|
resources.ApplyResources(this.lblVideoSource, "lblVideoSource");
|
||||||
this.lblVideoSource.Name = "lblVideoSource";
|
this.lblVideoSource.Name = "lblVideoSource";
|
||||||
//
|
//
|
||||||
// cboAudioSource
|
// cbAudioSource
|
||||||
//
|
//
|
||||||
this.cboAudioSource.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
this.cbAudioSource.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
this.cboAudioSource.FormattingEnabled = true;
|
this.cbAudioSource.FormattingEnabled = true;
|
||||||
resources.ApplyResources(this.cboAudioSource, "cboAudioSource");
|
resources.ApplyResources(this.cbAudioSource, "cbAudioSource");
|
||||||
this.cboAudioSource.Name = "cboAudioSource";
|
this.cbAudioSource.Name = "cbAudioSource";
|
||||||
this.cboAudioSource.SelectedIndexChanged += new System.EventHandler(this.cboAudioSource_SelectedIndexChanged);
|
this.cbAudioSource.SelectedIndexChanged += new System.EventHandler(this.cbAudioSource_SelectedIndexChanged);
|
||||||
//
|
//
|
||||||
// lblAudioSource
|
// lblAudioSource
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.lblAudioSource, "lblAudioSource");
|
resources.ApplyResources(this.lblAudioSource, "lblAudioSource");
|
||||||
this.lblAudioSource.Name = "lblAudioSource";
|
this.lblAudioSource.Name = "lblAudioSource";
|
||||||
//
|
//
|
||||||
// cboAudioCodec
|
// cbAudioCodec
|
||||||
//
|
//
|
||||||
this.cboAudioCodec.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
this.cbAudioCodec.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
this.cboAudioCodec.FormattingEnabled = true;
|
this.cbAudioCodec.FormattingEnabled = true;
|
||||||
resources.ApplyResources(this.cboAudioCodec, "cboAudioCodec");
|
resources.ApplyResources(this.cbAudioCodec, "cbAudioCodec");
|
||||||
this.cboAudioCodec.Name = "cboAudioCodec";
|
this.cbAudioCodec.Name = "cbAudioCodec";
|
||||||
this.cboAudioCodec.SelectedIndexChanged += new System.EventHandler(this.cboAudioCodec_SelectedIndexChanged);
|
this.cbAudioCodec.SelectedIndexChanged += new System.EventHandler(this.cbAudioCodec_SelectedIndexChanged);
|
||||||
//
|
//
|
||||||
// lblAudioCodec
|
// lblAudioCodec
|
||||||
//
|
//
|
||||||
|
@ -750,9 +750,9 @@ private void InitializeComponent()
|
||||||
this.gbSource.Controls.Add(this.btnHelperDevicesHelp);
|
this.gbSource.Controls.Add(this.btnHelperDevicesHelp);
|
||||||
this.gbSource.Controls.Add(this.lblHelperDevices);
|
this.gbSource.Controls.Add(this.lblHelperDevices);
|
||||||
this.gbSource.Controls.Add(this.btnInstallHelperDevices);
|
this.gbSource.Controls.Add(this.btnInstallHelperDevices);
|
||||||
this.gbSource.Controls.Add(this.cboVideoSource);
|
this.gbSource.Controls.Add(this.cbVideoSource);
|
||||||
this.gbSource.Controls.Add(this.lblVideoSource);
|
this.gbSource.Controls.Add(this.lblVideoSource);
|
||||||
this.gbSource.Controls.Add(this.cboAudioSource);
|
this.gbSource.Controls.Add(this.cbAudioSource);
|
||||||
this.gbSource.Controls.Add(this.lblAudioSource);
|
this.gbSource.Controls.Add(this.lblAudioSource);
|
||||||
this.gbSource.Controls.Add(this.btnRefreshSources);
|
this.gbSource.Controls.Add(this.btnRefreshSources);
|
||||||
resources.ApplyResources(this.gbSource, "gbSource");
|
resources.ApplyResources(this.gbSource, "gbSource");
|
||||||
|
@ -788,9 +788,9 @@ private void InitializeComponent()
|
||||||
// gbCodecs
|
// gbCodecs
|
||||||
//
|
//
|
||||||
this.gbCodecs.Controls.Add(this.pbAudioCodecWarning);
|
this.gbCodecs.Controls.Add(this.pbAudioCodecWarning);
|
||||||
this.gbCodecs.Controls.Add(this.cboAudioCodec);
|
this.gbCodecs.Controls.Add(this.cbAudioCodec);
|
||||||
this.gbCodecs.Controls.Add(this.lblAudioCodec);
|
this.gbCodecs.Controls.Add(this.lblAudioCodec);
|
||||||
this.gbCodecs.Controls.Add(this.cboVideoCodec);
|
this.gbCodecs.Controls.Add(this.cbVideoCodec);
|
||||||
this.gbCodecs.Controls.Add(this.lblCodec);
|
this.gbCodecs.Controls.Add(this.lblCodec);
|
||||||
this.gbCodecs.Controls.Add(this.tcFFmpegAudioCodecs);
|
this.gbCodecs.Controls.Add(this.tcFFmpegAudioCodecs);
|
||||||
this.gbCodecs.Controls.Add(this.tcFFmpegVideoCodecs);
|
this.gbCodecs.Controls.Add(this.tcFFmpegVideoCodecs);
|
||||||
|
@ -885,7 +885,7 @@ private void InitializeComponent()
|
||||||
private System.Windows.Forms.NumericUpDown nudx264CRF;
|
private System.Windows.Forms.NumericUpDown nudx264CRF;
|
||||||
private System.Windows.Forms.ToolTip ttHelpTip;
|
private System.Windows.Forms.ToolTip ttHelpTip;
|
||||||
private System.Windows.Forms.Label lblCodec;
|
private System.Windows.Forms.Label lblCodec;
|
||||||
private System.Windows.Forms.ComboBox cboVideoCodec;
|
private System.Windows.Forms.ComboBox cbVideoCodec;
|
||||||
private System.Windows.Forms.ComboBox cbx264Preset;
|
private System.Windows.Forms.ComboBox cbx264Preset;
|
||||||
private System.Windows.Forms.Label lblx264Preset;
|
private System.Windows.Forms.Label lblx264Preset;
|
||||||
private System.Windows.Forms.NumericUpDown nudXvidQscale;
|
private System.Windows.Forms.NumericUpDown nudXvidQscale;
|
||||||
|
@ -907,11 +907,11 @@ private void InitializeComponent()
|
||||||
private System.Windows.Forms.TabControl tcFFmpegAudioCodecs;
|
private System.Windows.Forms.TabControl tcFFmpegAudioCodecs;
|
||||||
private System.Windows.Forms.TabPage tpVorbis;
|
private System.Windows.Forms.TabPage tpVorbis;
|
||||||
private System.Windows.Forms.TabPage tpMP3;
|
private System.Windows.Forms.TabPage tpMP3;
|
||||||
private System.Windows.Forms.ComboBox cboVideoSource;
|
private System.Windows.Forms.ComboBox cbVideoSource;
|
||||||
private System.Windows.Forms.Label lblVideoSource;
|
private System.Windows.Forms.Label lblVideoSource;
|
||||||
private System.Windows.Forms.ComboBox cboAudioSource;
|
private System.Windows.Forms.ComboBox cbAudioSource;
|
||||||
private System.Windows.Forms.Label lblAudioSource;
|
private System.Windows.Forms.Label lblAudioSource;
|
||||||
private System.Windows.Forms.ComboBox cboAudioCodec;
|
private System.Windows.Forms.ComboBox cbAudioCodec;
|
||||||
private System.Windows.Forms.Label lblAudioCodec;
|
private System.Windows.Forms.Label lblAudioCodec;
|
||||||
private System.Windows.Forms.GroupBox gbSource;
|
private System.Windows.Forms.GroupBox gbSource;
|
||||||
private System.Windows.Forms.GroupBox gbCodecs;
|
private System.Windows.Forms.GroupBox gbCodecs;
|
||||||
|
|
|
@ -51,8 +51,8 @@ public FFmpegOptionsForm(ScreencastOptions options)
|
||||||
ShareXResources.ApplyTheme(this);
|
ShareXResources.ApplyTheme(this);
|
||||||
|
|
||||||
eiFFmpeg.ObjectType = typeof(FFmpegOptions);
|
eiFFmpeg.ObjectType = typeof(FFmpegOptions);
|
||||||
cboVideoCodec.Items.AddRange(Helpers.GetEnumDescriptions<FFmpegVideoCodec>());
|
cbVideoCodec.Items.AddRange(Helpers.GetEnumDescriptions<FFmpegVideoCodec>());
|
||||||
cboAudioCodec.Items.AddRange(Helpers.GetEnumDescriptions<FFmpegAudioCodec>());
|
cbAudioCodec.Items.AddRange(Helpers.GetEnumDescriptions<FFmpegAudioCodec>());
|
||||||
cbx264Preset.Items.AddRange(Helpers.GetEnumDescriptions<FFmpegPreset>());
|
cbx264Preset.Items.AddRange(Helpers.GetEnumDescriptions<FFmpegPreset>());
|
||||||
cbGIFStatsMode.Items.AddRange(Helpers.GetEnumDescriptions<FFmpegPaletteGenStatsMode>());
|
cbGIFStatsMode.Items.AddRange(Helpers.GetEnumDescriptions<FFmpegPaletteGenStatsMode>());
|
||||||
cbNVENCPreset.Items.AddRange(Helpers.GetEnums<FFmpegNVENCPreset>().Select(x => $"{x} ({x.GetDescription()})").ToArray());
|
cbNVENCPreset.Items.AddRange(Helpers.GetEnums<FFmpegNVENCPreset>().Select(x => $"{x} ({x.GetDescription()})").ToArray());
|
||||||
|
@ -86,8 +86,8 @@ private async Task SettingsLoad()
|
||||||
lblHelperDevices.Visible = false;
|
lblHelperDevices.Visible = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
cboVideoCodec.SelectedIndex = (int)Options.FFmpeg.VideoCodec;
|
cbVideoCodec.SelectedIndex = (int)Options.FFmpeg.VideoCodec;
|
||||||
cboAudioCodec.SelectedIndex = (int)Options.FFmpeg.AudioCodec;
|
cbAudioCodec.SelectedIndex = (int)Options.FFmpeg.AudioCodec;
|
||||||
|
|
||||||
tbUserArgs.Text = Options.FFmpeg.UserArgs;
|
tbUserArgs.Text = Options.FFmpeg.UserArgs;
|
||||||
|
|
||||||
|
@ -161,39 +161,39 @@ await Task.Run(() =>
|
||||||
|
|
||||||
if (!IsDisposed)
|
if (!IsDisposed)
|
||||||
{
|
{
|
||||||
cboVideoSource.Items.Clear();
|
cbVideoSource.Items.Clear();
|
||||||
cboVideoSource.Items.Add(FFmpegCLIManager.SourceNone);
|
cbVideoSource.Items.Add(FFmpegCLIManager.SourceNone);
|
||||||
cboVideoSource.Items.Add(FFmpegCLIManager.SourceGDIGrab);
|
cbVideoSource.Items.Add(FFmpegCLIManager.SourceGDIGrab);
|
||||||
cboAudioSource.Items.Clear();
|
cbAudioSource.Items.Clear();
|
||||||
cboAudioSource.Items.Add(FFmpegCLIManager.SourceNone);
|
cbAudioSource.Items.Add(FFmpegCLIManager.SourceNone);
|
||||||
|
|
||||||
if (devices != null)
|
if (devices != null)
|
||||||
{
|
{
|
||||||
cboVideoSource.Items.AddRange(devices.VideoDevices.ToArray());
|
cbVideoSource.Items.AddRange(devices.VideoDevices.ToArray());
|
||||||
cboAudioSource.Items.AddRange(devices.AudioDevices.ToArray());
|
cbAudioSource.Items.AddRange(devices.AudioDevices.ToArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selectDevices && cboVideoSource.Items.Contains(FFmpegCLIManager.SourceVideoDevice))
|
if (selectDevices && cbVideoSource.Items.Contains(FFmpegCLIManager.SourceVideoDevice))
|
||||||
{
|
{
|
||||||
Options.FFmpeg.VideoSource = FFmpegCLIManager.SourceVideoDevice;
|
Options.FFmpeg.VideoSource = FFmpegCLIManager.SourceVideoDevice;
|
||||||
}
|
}
|
||||||
else if (!cboVideoSource.Items.Contains(Options.FFmpeg.VideoSource))
|
else if (!cbVideoSource.Items.Contains(Options.FFmpeg.VideoSource))
|
||||||
{
|
{
|
||||||
Options.FFmpeg.VideoSource = FFmpegCLIManager.SourceGDIGrab;
|
Options.FFmpeg.VideoSource = FFmpegCLIManager.SourceGDIGrab;
|
||||||
}
|
}
|
||||||
|
|
||||||
cboVideoSource.Text = Options.FFmpeg.VideoSource;
|
cbVideoSource.Text = Options.FFmpeg.VideoSource;
|
||||||
|
|
||||||
if (selectDevices && cboAudioSource.Items.Contains(FFmpegCLIManager.SourceAudioDevice))
|
if (selectDevices && cbAudioSource.Items.Contains(FFmpegCLIManager.SourceAudioDevice))
|
||||||
{
|
{
|
||||||
Options.FFmpeg.AudioSource = FFmpegCLIManager.SourceAudioDevice;
|
Options.FFmpeg.AudioSource = FFmpegCLIManager.SourceAudioDevice;
|
||||||
}
|
}
|
||||||
else if (!cboAudioSource.Items.Contains(Options.FFmpeg.AudioSource))
|
else if (!cbAudioSource.Items.Contains(Options.FFmpeg.AudioSource))
|
||||||
{
|
{
|
||||||
Options.FFmpeg.AudioSource = FFmpegCLIManager.SourceNone;
|
Options.FFmpeg.AudioSource = FFmpegCLIManager.SourceNone;
|
||||||
}
|
}
|
||||||
|
|
||||||
cboAudioSource.Text = Options.FFmpeg.AudioSource;
|
cbAudioSource.Text = Options.FFmpeg.AudioSource;
|
||||||
|
|
||||||
btnRefreshSources.Enabled = true;
|
btnRefreshSources.Enabled = true;
|
||||||
}
|
}
|
||||||
|
@ -209,11 +209,11 @@ private void UpdateUI()
|
||||||
lblOpusQuality.Text = string.Format(Resources.FFmpegOptionsForm_UpdateUI_Bitrate___0_k, Options.FFmpeg.Opus_bitrate);
|
lblOpusQuality.Text = string.Format(Resources.FFmpegOptionsForm_UpdateUI_Bitrate___0_k, Options.FFmpeg.Opus_bitrate);
|
||||||
|
|
||||||
bool isValidAudioCodec = true;
|
bool isValidAudioCodec = true;
|
||||||
FFmpegVideoCodec videoCodec = (FFmpegVideoCodec)cboVideoCodec.SelectedIndex;
|
FFmpegVideoCodec videoCodec = (FFmpegVideoCodec)cbVideoCodec.SelectedIndex;
|
||||||
|
|
||||||
if (videoCodec == FFmpegVideoCodec.libvpx)
|
if (videoCodec == FFmpegVideoCodec.libvpx)
|
||||||
{
|
{
|
||||||
FFmpegAudioCodec audioCodec = (FFmpegAudioCodec)cboAudioCodec.SelectedIndex;
|
FFmpegAudioCodec audioCodec = (FFmpegAudioCodec)cbAudioCodec.SelectedIndex;
|
||||||
|
|
||||||
if (audioCodec != FFmpegAudioCodec.libvorbis && audioCodec != FFmpegAudioCodec.libopus)
|
if (audioCodec != FFmpegAudioCodec.libvorbis && audioCodec != FFmpegAudioCodec.libopus)
|
||||||
{
|
{
|
||||||
|
@ -287,15 +287,15 @@ private async void btnRefreshSources_Click(object sender, EventArgs e)
|
||||||
await RefreshSourcesAsync();
|
await RefreshSourcesAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void cboVideoSource_SelectedIndexChanged(object sender, EventArgs e)
|
private void cbVideoSource_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Options.FFmpeg.VideoSource = cboVideoSource.Text;
|
Options.FFmpeg.VideoSource = cbVideoSource.Text;
|
||||||
UpdateUI();
|
UpdateUI();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void cboAudioSource_SelectedIndexChanged(object sender, EventArgs e)
|
private void cbAudioSource_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Options.FFmpeg.AudioSource = cboAudioSource.Text;
|
Options.FFmpeg.AudioSource = cbAudioSource.Text;
|
||||||
UpdateUI();
|
UpdateUI();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -342,11 +342,11 @@ private void btnHelperDevicesHelp_Click(object sender, EventArgs e)
|
||||||
URLHelpers.OpenURL("https://github.com/rdp/screen-capture-recorder-to-video-windows-free");
|
URLHelpers.OpenURL("https://github.com/rdp/screen-capture-recorder-to-video-windows-free");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void cboVideoCodec_SelectedIndexChanged(object sender, EventArgs e)
|
private void cbVideoCodec_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Options.FFmpeg.VideoCodec = (FFmpegVideoCodec)cboVideoCodec.SelectedIndex;
|
Options.FFmpeg.VideoCodec = (FFmpegVideoCodec)cbVideoCodec.SelectedIndex;
|
||||||
|
|
||||||
if (cboVideoCodec.SelectedIndex >= 0)
|
if (cbVideoCodec.SelectedIndex >= 0)
|
||||||
{
|
{
|
||||||
switch (Options.FFmpeg.VideoCodec)
|
switch (Options.FFmpeg.VideoCodec)
|
||||||
{
|
{
|
||||||
|
@ -383,11 +383,11 @@ private void cboVideoCodec_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
UpdateUI();
|
UpdateUI();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void cboAudioCodec_SelectedIndexChanged(object sender, EventArgs e)
|
private void cbAudioCodec_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Options.FFmpeg.AudioCodec = (FFmpegAudioCodec)cboAudioCodec.SelectedIndex;
|
Options.FFmpeg.AudioCodec = (FFmpegAudioCodec)cbAudioCodec.SelectedIndex;
|
||||||
|
|
||||||
if (cboAudioCodec.SelectedIndex >= 0)
|
if (cbAudioCodec.SelectedIndex >= 0)
|
||||||
{
|
{
|
||||||
switch (Options.FFmpeg.AudioCodec)
|
switch (Options.FFmpeg.AudioCodec)
|
||||||
{
|
{
|
||||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -212,12 +212,12 @@ private void LoadImageUploaderSettings()
|
||||||
lblPhotobucketParentAlbumPath.Text = Resources.UploadersConfigForm_LoadSettings_Parent_album_path_e_g_ + " " +
|
lblPhotobucketParentAlbumPath.Text = Resources.UploadersConfigForm_LoadSettings_Parent_album_path_e_g_ + " " +
|
||||||
Config.PhotobucketAccountInfo.AlbumID + "/Personal/" + DateTime.Now.Year;
|
Config.PhotobucketAccountInfo.AlbumID + "/Personal/" + DateTime.Now.Year;
|
||||||
|
|
||||||
cboPhotobucketAlbumPaths.Items.Clear();
|
cbPhotobucketAlbumPaths.Items.Clear();
|
||||||
|
|
||||||
if (Config.PhotobucketAccountInfo.AlbumList.Count > 0)
|
if (Config.PhotobucketAccountInfo.AlbumList.Count > 0)
|
||||||
{
|
{
|
||||||
cboPhotobucketAlbumPaths.Items.AddRange(Config.PhotobucketAccountInfo.AlbumList.ToArray());
|
cbPhotobucketAlbumPaths.Items.AddRange(Config.PhotobucketAccountInfo.AlbumList.ToArray());
|
||||||
cboPhotobucketAlbumPaths.SelectedIndex = Config.PhotobucketAccountInfo.ActiveAlbumID.
|
cbPhotobucketAlbumPaths.SelectedIndex = Config.PhotobucketAccountInfo.ActiveAlbumID.
|
||||||
BetweenOrDefault(0, Config.PhotobucketAccountInfo.AlbumList.Count - 1);
|
BetweenOrDefault(0, Config.PhotobucketAccountInfo.AlbumList.Count - 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -522,15 +522,15 @@ private void LoadFileUploaderSettings()
|
||||||
|
|
||||||
if (Config.PushbulletSettings.DeviceList.Count > 0)
|
if (Config.PushbulletSettings.DeviceList.Count > 0)
|
||||||
{
|
{
|
||||||
Config.PushbulletSettings.DeviceList.ForEach(x => cboPushbulletDevices.Items.Add(x.Name ?? Resources.UploadersConfigForm_LoadSettings_Invalid_device_name));
|
Config.PushbulletSettings.DeviceList.ForEach(x => cbPushbulletDevices.Items.Add(x.Name ?? Resources.UploadersConfigForm_LoadSettings_Invalid_device_name));
|
||||||
|
|
||||||
if (Config.PushbulletSettings.DeviceList.IsValidIndex(Config.PushbulletSettings.SelectedDevice))
|
if (Config.PushbulletSettings.DeviceList.IsValidIndex(Config.PushbulletSettings.SelectedDevice))
|
||||||
{
|
{
|
||||||
cboPushbulletDevices.SelectedIndex = Config.PushbulletSettings.SelectedDevice;
|
cbPushbulletDevices.SelectedIndex = Config.PushbulletSettings.SelectedDevice;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cboPushbulletDevices.SelectedIndex = 0;
|
cbPushbulletDevices.SelectedIndex = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1026,30 +1026,30 @@ private void btnPhotobucketCreateAlbum_Click(object sender, EventArgs e)
|
||||||
PhotobucketCreateAlbum();
|
PhotobucketCreateAlbum();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void cboPhotobucketAlbumPaths_SelectedIndexChanged(object sender, EventArgs e)
|
private void cbPhotobucketAlbumPaths_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (Config.PhotobucketAccountInfo != null)
|
if (Config.PhotobucketAccountInfo != null)
|
||||||
{
|
{
|
||||||
Config.PhotobucketAccountInfo.ActiveAlbumID = cboPhotobucketAlbumPaths.SelectedIndex;
|
Config.PhotobucketAccountInfo.ActiveAlbumID = cbPhotobucketAlbumPaths.SelectedIndex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnPhotobucketAddAlbum_Click(object sender, EventArgs e)
|
private void btnPhotobucketAddAlbum_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
string albumPath = cboPhotobucketAlbumPaths.Text;
|
string albumPath = cbPhotobucketAlbumPaths.Text;
|
||||||
if (!Config.PhotobucketAccountInfo.AlbumList.Contains(albumPath))
|
if (!Config.PhotobucketAccountInfo.AlbumList.Contains(albumPath))
|
||||||
{
|
{
|
||||||
Config.PhotobucketAccountInfo.AlbumList.Add(albumPath);
|
Config.PhotobucketAccountInfo.AlbumList.Add(albumPath);
|
||||||
cboPhotobucketAlbumPaths.Items.Add(albumPath);
|
cbPhotobucketAlbumPaths.Items.Add(albumPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnPhotobucketRemoveAlbum_Click(object sender, EventArgs e)
|
private void btnPhotobucketRemoveAlbum_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (cboPhotobucketAlbumPaths.Items.Count > 1)
|
if (cbPhotobucketAlbumPaths.Items.Count > 1)
|
||||||
{
|
{
|
||||||
cboPhotobucketAlbumPaths.Items.RemoveAt(cboPhotobucketAlbumPaths.SelectedIndex);
|
cbPhotobucketAlbumPaths.Items.RemoveAt(cbPhotobucketAlbumPaths.SelectedIndex);
|
||||||
cboPhotobucketAlbumPaths.SelectedIndex = cboPhotobucketAlbumPaths.Items.Count - 1;
|
cbPhotobucketAlbumPaths.SelectedIndex = cbPhotobucketAlbumPaths.Items.Count - 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2315,15 +2315,15 @@ private void txtPushbulletUserKey_TextChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
bool enable = !string.IsNullOrEmpty(txtPushbulletUserKey.Text.Trim());
|
bool enable = !string.IsNullOrEmpty(txtPushbulletUserKey.Text.Trim());
|
||||||
|
|
||||||
cboPushbulletDevices.Enabled = enable;
|
cbPushbulletDevices.Enabled = enable;
|
||||||
btnPushbulletGetDeviceList.Enabled = enable;
|
btnPushbulletGetDeviceList.Enabled = enable;
|
||||||
|
|
||||||
Config.PushbulletSettings.UserAPIKey = txtPushbulletUserKey.Text;
|
Config.PushbulletSettings.UserAPIKey = txtPushbulletUserKey.Text;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void cboPushbulletDevices_SelectedIndexChanged(object sender, EventArgs e)
|
private void cbPushbulletDevices_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Config.PushbulletSettings.SelectedDevice = cboPushbulletDevices.SelectedIndex;
|
Config.PushbulletSettings.SelectedDevice = cbPushbulletDevices.SelectedIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnPushbulletGetDeviceList_Click(object sender, EventArgs e)
|
private void btnPushbulletGetDeviceList_Click(object sender, EventArgs e)
|
||||||
|
@ -2335,19 +2335,19 @@ private void btnPushbulletGetDeviceList_Click(object sender, EventArgs e)
|
||||||
|
|
||||||
#region Shared folder
|
#region Shared folder
|
||||||
|
|
||||||
private void cboSharedFolderImages_SelectedIndexChanged(object sender, EventArgs e)
|
private void cbSharedFolderImages_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Config.LocalhostSelectedImages = cboSharedFolderImages.SelectedIndex;
|
Config.LocalhostSelectedImages = cbSharedFolderImages.SelectedIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void cboSharedFolderText_SelectedIndexChanged(object sender, EventArgs e)
|
private void cbSharedFolderText_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Config.LocalhostSelectedText = cboSharedFolderText.SelectedIndex;
|
Config.LocalhostSelectedText = cbSharedFolderText.SelectedIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void cboSharedFolderFiles_SelectedIndexChanged(object sender, EventArgs e)
|
private void cbSharedFolderFiles_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Config.LocalhostSelectedFiles = cboSharedFolderFiles.SelectedIndex;
|
Config.LocalhostSelectedFiles = cbSharedFolderFiles.SelectedIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btnSharedFolderAdd_Click(object sender, EventArgs e)
|
private void btnSharedFolderAdd_Click(object sender, EventArgs e)
|
||||||
|
@ -2771,7 +2771,7 @@ private void txtSeafileSharePassword_TextChanged(object sender, EventArgs e)
|
||||||
|
|
||||||
#region Streamable
|
#region Streamable
|
||||||
|
|
||||||
private void cboxStreamableAnonymous_CheckedChanged(object sender, EventArgs e)
|
private void cbStreamableAnonymous_CheckedChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Config.StreamableAnonymous = cbStreamableAnonymous.Checked;
|
Config.StreamableAnonymous = cbStreamableAnonymous.Checked;
|
||||||
txtStreamableUsername.Enabled = !Config.StreamableAnonymous;
|
txtStreamableUsername.Enabled = !Config.StreamableAnonymous;
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -173,8 +173,8 @@ public void PhotobucketAuthComplete()
|
||||||
lblPhotobucketAccountStatus.Text = Resources.UploadersConfigForm_Login_successful;
|
lblPhotobucketAccountStatus.Text = Resources.UploadersConfigForm_Login_successful;
|
||||||
txtPhotobucketDefaultAlbumName.Text = Config.PhotobucketAccountInfo.AlbumID;
|
txtPhotobucketDefaultAlbumName.Text = Config.PhotobucketAccountInfo.AlbumID;
|
||||||
Config.PhotobucketAccountInfo.AlbumList.Add(Config.PhotobucketAccountInfo.AlbumID);
|
Config.PhotobucketAccountInfo.AlbumList.Add(Config.PhotobucketAccountInfo.AlbumID);
|
||||||
cboPhotobucketAlbumPaths.Items.Add(Config.PhotobucketAccountInfo.AlbumID);
|
cbPhotobucketAlbumPaths.Items.Add(Config.PhotobucketAccountInfo.AlbumID);
|
||||||
cboPhotobucketAlbumPaths.SelectedIndex = 0;
|
cbPhotobucketAlbumPaths.SelectedIndex = 0;
|
||||||
MessageBox.Show(Resources.UploadersConfigForm_Login_successful, "ShareX", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
MessageBox.Show(Resources.UploadersConfigForm_Login_successful, "ShareX", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -197,7 +197,7 @@ public void PhotobucketCreateAlbum()
|
||||||
{
|
{
|
||||||
string albumPath = txtPhotobucketParentAlbumPath.Text + "/" + txtPhotobucketNewAlbumName.Text;
|
string albumPath = txtPhotobucketParentAlbumPath.Text + "/" + txtPhotobucketNewAlbumName.Text;
|
||||||
Config.PhotobucketAccountInfo.AlbumList.Add(albumPath);
|
Config.PhotobucketAccountInfo.AlbumList.Add(albumPath);
|
||||||
cboPhotobucketAlbumPaths.Items.Add(albumPath);
|
cbPhotobucketAlbumPaths.Items.Add(albumPath);
|
||||||
MessageBox.Show(string.Format(Resources.UploadersConfigForm_PhotobucketCreateAlbum__0__successfully_created_, albumPath), "ShareX",
|
MessageBox.Show(string.Format(Resources.UploadersConfigForm_PhotobucketCreateAlbum__0__successfully_created_, albumPath), "ShareX",
|
||||||
MessageBoxButtons.OK, MessageBoxIcon.Information);
|
MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
}
|
}
|
||||||
|
@ -764,8 +764,8 @@ public void UpdatePastebinStatus()
|
||||||
|
|
||||||
public void PushbulletGetDevices()
|
public void PushbulletGetDevices()
|
||||||
{
|
{
|
||||||
cboPushbulletDevices.Items.Clear();
|
cbPushbulletDevices.Items.Clear();
|
||||||
cboPushbulletDevices.ResetText();
|
cbPushbulletDevices.ResetText();
|
||||||
|
|
||||||
Pushbullet pushbullet = new Pushbullet(Config.PushbulletSettings);
|
Pushbullet pushbullet = new Pushbullet(Config.PushbulletSettings);
|
||||||
Config.PushbulletSettings.DeviceList = pushbullet.GetDeviceList();
|
Config.PushbulletSettings.DeviceList = pushbullet.GetDeviceList();
|
||||||
|
@ -774,17 +774,17 @@ public void PushbulletGetDevices()
|
||||||
{
|
{
|
||||||
Config.PushbulletSettings.SelectedDevice = 0;
|
Config.PushbulletSettings.SelectedDevice = 0;
|
||||||
|
|
||||||
cboPushbulletDevices.Enabled = true;
|
cbPushbulletDevices.Enabled = true;
|
||||||
|
|
||||||
Config.PushbulletSettings.DeviceList.ForEach(pbDevice =>
|
Config.PushbulletSettings.DeviceList.ForEach(pbDevice =>
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(pbDevice.Name))
|
if (!string.IsNullOrEmpty(pbDevice.Name))
|
||||||
{
|
{
|
||||||
cboPushbulletDevices.Items.Add(pbDevice.Name);
|
cbPushbulletDevices.Items.Add(pbDevice.Name);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
cboPushbulletDevices.SelectedIndex = 0;
|
cbPushbulletDevices.SelectedIndex = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -975,24 +975,24 @@ private void SharedFolderUpdateControls()
|
||||||
int selected = lbSharedFolderAccounts.SelectedIndex;
|
int selected = lbSharedFolderAccounts.SelectedIndex;
|
||||||
|
|
||||||
lbSharedFolderAccounts.Items.Clear();
|
lbSharedFolderAccounts.Items.Clear();
|
||||||
cboSharedFolderImages.Items.Clear();
|
cbSharedFolderImages.Items.Clear();
|
||||||
cboSharedFolderText.Items.Clear();
|
cbSharedFolderText.Items.Clear();
|
||||||
cboSharedFolderFiles.Items.Clear();
|
cbSharedFolderFiles.Items.Clear();
|
||||||
|
|
||||||
if (Config.LocalhostAccountList.Count > 0)
|
if (Config.LocalhostAccountList.Count > 0)
|
||||||
{
|
{
|
||||||
foreach (LocalhostAccount account in Config.LocalhostAccountList)
|
foreach (LocalhostAccount account in Config.LocalhostAccountList)
|
||||||
{
|
{
|
||||||
lbSharedFolderAccounts.Items.Add(account);
|
lbSharedFolderAccounts.Items.Add(account);
|
||||||
cboSharedFolderImages.Items.Add(account);
|
cbSharedFolderImages.Items.Add(account);
|
||||||
cboSharedFolderText.Items.Add(account);
|
cbSharedFolderText.Items.Add(account);
|
||||||
cboSharedFolderFiles.Items.Add(account);
|
cbSharedFolderFiles.Items.Add(account);
|
||||||
}
|
}
|
||||||
|
|
||||||
lbSharedFolderAccounts.SelectedIndex = selected.Clamp(0, Config.LocalhostAccountList.Count - 1);
|
lbSharedFolderAccounts.SelectedIndex = selected.Clamp(0, Config.LocalhostAccountList.Count - 1);
|
||||||
cboSharedFolderImages.SelectedIndex = Config.LocalhostSelectedImages.Clamp(0, Config.LocalhostAccountList.Count - 1);
|
cbSharedFolderImages.SelectedIndex = Config.LocalhostSelectedImages.Clamp(0, Config.LocalhostAccountList.Count - 1);
|
||||||
cboSharedFolderText.SelectedIndex = Config.LocalhostSelectedText.Clamp(0, Config.LocalhostAccountList.Count - 1);
|
cbSharedFolderText.SelectedIndex = Config.LocalhostSelectedText.Clamp(0, Config.LocalhostAccountList.Count - 1);
|
||||||
cboSharedFolderFiles.SelectedIndex = Config.LocalhostSelectedFiles.Clamp(0, Config.LocalhostAccountList.Count - 1);
|
cbSharedFolderFiles.SelectedIndex = Config.LocalhostSelectedFiles.Clamp(0, Config.LocalhostAccountList.Count - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
SharedFolderUpdateEnabledStates();
|
SharedFolderUpdateEnabledStates();
|
||||||
|
@ -1000,7 +1000,7 @@ private void SharedFolderUpdateControls()
|
||||||
|
|
||||||
private void SharedFolderUpdateEnabledStates()
|
private void SharedFolderUpdateEnabledStates()
|
||||||
{
|
{
|
||||||
cboSharedFolderImages.Enabled = cboSharedFolderText.Enabled = cboSharedFolderFiles.Enabled = Config.LocalhostAccountList.Count > 0;
|
cbSharedFolderImages.Enabled = cbSharedFolderText.Enabled = cbSharedFolderFiles.Enabled = Config.LocalhostAccountList.Count > 0;
|
||||||
btnSharedFolderRemove.Enabled = btnSharedFolderDuplicate.Enabled = lbSharedFolderAccounts.SelectedIndex > -1;
|
btnSharedFolderRemove.Enabled = btnSharedFolderDuplicate.Enabled = lbSharedFolderAccounts.SelectedIndex > -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue