Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion MultilineGreyText/Options/General.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,15 @@ public class General : BaseOptionModel<General>{
[DefaultValue(false)]
public bool TelemetryCodeSnippets{ get; set; } = false;

[Category("Refact Assistant")]
[DisplayName("Insecure SSL")]
[Description("Allow insecure SSL connections.")]
[DefaultValue(false)]
public bool InsecureSSL { get; set; } = false;

//enters a message into the log when the options are saved
public General() : base(){
Saved += delegate { VS.StatusBar.ShowMessageAsync("Options Saved").FireAndForget(); };
}
}
}
}
5 changes: 5 additions & 0 deletions MultilineGreyText/Options/GeneralOptions.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@
<CheckBox x:Name="pTelemetryCodeSnippets" Content="Send corrected code snippets."
IsThreeState="False"
Checked="pTelemetryCodeSnippets_Checked" Unchecked="pTelemetryCodeSnippets_Unchecked"/>

<TextBlock Margin="0 15 0 10">Refactai: <Bold>Insecure SSL</Bold></TextBlock>
<CheckBox x:Name="pInsecureSSL" Content="Allow insecure SSL connections."
IsThreeState="False"
Checked="pInsecureSSL_Checked" Unchecked="pInsecureSSL_Unchecked"/>
</StackPanel>

</Grid>
Expand Down
13 changes: 13 additions & 0 deletions MultilineGreyText/Options/GeneralOptions.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public GeneralOptions() {
public void Initialize(){
pPauseCompletion.IsChecked = General.Instance.PauseCompletion;
pTelemetryCodeSnippets.IsChecked = General.Instance.TelemetryCodeSnippets;
pInsecureSSL.IsChecked = General.Instance.InsecureSSL;

AddressURL.Text = General.Instance.AddressURL;
APIKey.Text = General.Instance.APIKey;
Expand Down Expand Up @@ -51,6 +52,18 @@ private void pTelemetryCodeSnippets_Unchecked(object sender, System.Windows.Rout
General.Instance.Save();
}

//insecure SSL checked
private void pInsecureSSL_Checked(object sender, System.Windows.RoutedEventArgs e){
General.Instance.InsecureSSL = (bool)pInsecureSSL.IsChecked;
General.Instance.Save();
}

//insecure SSL unchecked
private void pInsecureSSL_Unchecked(object sender, System.Windows.RoutedEventArgs e){
General.Instance.InsecureSSL = (bool)pInsecureSSL.IsChecked;
General.Instance.Save();
}

//address url text handler
private void AddressURL_textChanged(object sender, TextChangedEventArgs args){
General.Instance.AddressURL = AddressURL.Text;
Expand Down
Loading