Skip to content

Commit

Permalink
Remove remaining Silverlight support
Browse files Browse the repository at this point in the history
  • Loading branch information
punker76 committed Nov 22, 2017
1 parent fed868d commit 50024b0
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 66 deletions.
14 changes: 1 addition & 13 deletions Kaxaml/DocumentViews/WpfDocumentView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,6 @@ private void Parse(bool IsExplicit)
string str = XamlDocument.SourceText;

// handle the in memory preparsing (this happens behind the scenes all in memory)
str = DeSilverlight(str);


try
{
Expand Down Expand Up @@ -473,17 +471,7 @@ private void Parse(bool IsExplicit)
}
}

private string DeSilverlight(string str)
{
if (Kaxaml.Properties.Settings.Default.EnablePseudoSilverlight)
{
str = str.Replace("http://schemas.microsoft.com/client/2007", "http://schemas.microsoft.com/winfx/2006/xaml/presentation");
}

return str;
}

private string PreParse(string str)
private string PreParse(string str)
{
while (str.Contains("?COLOR"))
{
Expand Down
32 changes: 0 additions & 32 deletions Kaxaml/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@ public MainWindow()
this.InputBindings.Add(new InputBinding(binding.Command, new KeyGesture(Key.T, ModifierKeys.Control, "Ctrl+T")));
this.CommandBindings.Add(binding);

binding = new CommandBinding(NewAgTabCommand);
binding.Executed += new ExecutedRoutedEventHandler(this.NewAgTab_Executed);
binding.CanExecute += new CanExecuteRoutedEventHandler(this.NewAgTab_CanExecute);
this.InputBindings.Add(new InputBinding(binding.Command, new KeyGesture(Key.L, ModifierKeys.Control, "Ctrl+L")));
this.CommandBindings.Add(binding);

binding = new CommandBinding(CloseTabCommand);
binding.Executed += new ExecutedRoutedEventHandler(this.CloseTab_Executed);
binding.CanExecute += new CanExecuteRoutedEventHandler(this.CloseTab_CanExecute);
Expand Down Expand Up @@ -301,32 +295,6 @@ void NewWPFTab_CanExecute(object sender, CanExecuteRoutedEventArgs args)

#endregion

#region NewAgTabCommand

public readonly static RoutedUICommand NewAgTabCommand = new RoutedUICommand("New Silverlight Tab", "NewAgTabCommand", typeof(MainWindow));

void NewAgTab_Executed(object sender, ExecutedRoutedEventArgs args)
{
if (sender == this)
{
AgDocument doc = new AgDocument(System.IO.Directory.GetCurrentDirectory());
XamlDocuments.Add(doc);

this.DocumentsView.SelectedDocument = doc;

}
}

void NewAgTab_CanExecute(object sender, CanExecuteRoutedEventArgs args)
{
if (sender == this)
{
args.CanExecute = true;
}
}

#endregion

#region CloseTabCommand

public readonly static RoutedUICommand CloseTabCommand = new RoutedUICommand("Close Tab", "CloseTabCommand", typeof(MainWindow));
Expand Down
16 changes: 2 additions & 14 deletions Kaxaml/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions Kaxaml/Properties/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@
</Grid>
&lt;/Page&gt;</Value>
</Setting>
<Setting Name="EnablePseudoSilverlight" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="AgDefaultXaml" Type="System.String" Scope="User">
<Value Profile="(Default)">&lt;Grid
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
Expand Down
1 change: 0 additions & 1 deletion Kaxaml/Views/MenuView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

<MenuItem Header="_File" >
<MenuItem Command="k:MainWindow.NewWPFTabCommand" InputGestureText="Ctrl+T" />
<MenuItem Command="k:MainWindow.NewAgTabCommand" InputGestureText="Ctrl+L" />
<MenuItem Command="k:MainWindow.CloseTabCommand" InputGestureText="Ctrl+W" />
<Separator />
<MenuItem Command="k:MainWindow.OpenCommand" InputGestureText="Ctrl+O" />
Expand Down
3 changes: 0 additions & 3 deletions Kaxaml/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@
&lt;/Grid&gt;
&lt;/Page&gt;</value>
</setting>
<setting name="EnablePseudoSilverlight" serializeAs="String">
<value>True</value>
</setting>
<setting name="AgDefaultXaml" serializeAs="String">
<value>&lt;Grid
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
Expand Down

0 comments on commit 50024b0

Please sign in to comment.