• R/O
  • HTTP
  • SSH
  • HTTPS

FooEditor: Commit


Commit MetaInfo

Revision8f198af7a2abe8f926df0d39e39f59a43f5e6a39 (tree)
Time2019-01-16 19:21:29
Authortest <test@yaho...>
Commitertest

Log Message

起動時に不要なコントロールは表示しないようにした

Change Summary

Incremental Difference

--- a/UWP/FooEditor.UWP/Views/MainPage.xaml
+++ b/UWP/FooEditor.UWP/Views/MainPage.xaml
@@ -48,10 +48,10 @@
4848 </AppBarButton>
4949 <AppBarButton Icon="Undo" Command="{Binding UndoCommand}" x:Uid="UndoButton"/>
5050 <AppBarButton Icon="Redo" Command="{Binding RedoCommand}" x:Uid="RedoButton"/>
51- <AppBarButton Icon="Find" AllowFocusOnInteraction="True" Name="FindButton" x:Uid="SearchButton">
51+ <AppBarButton Icon="Find" AllowFocusOnInteraction="True" Name="FindButton" x:Uid="SearchButton" Click="FindButton_Click">
5252 <AppBarButton.Flyout>
5353 <Flyout Closed="Flyout_Closed">
54- <StackPanel Margin="20">
54+ <StackPanel Margin="20" x:Load="False" x:Name="FindUI">
5555 <TextBlock x:Uid="FindPatternLabel" Margin="0,10,0,0"/>
5656 <TextBox Text="{Binding FindPattern,Mode=TwoWay}" Margin="0,10,0,0" x:Uid="FindPatternTextBox"/>
5757 <TextBlock x:Uid="ReplacePattern" Margin="0,10,0,0"/>
@@ -74,10 +74,10 @@
7474 </AppBarButton>
7575 <CommandBar.SecondaryCommands>
7676 <AppBarButton Command="{Binding PrintCommand}" x:Uid="PrintButton"/>
77- <AppBarButton AllowFocusOnInteraction="True" Name="GoToButton" x:Uid="GoToButton">
77+ <AppBarButton AllowFocusOnInteraction="True" Name="GoToButton" x:Uid="GoToButton" Click="GoToButton_Click">
7878 <AppBarButton.Flyout>
7979 <Flyout Closed="Flyout_Closed">
80- <StackPanel Margin="20">
80+ <StackPanel Margin="20" x:Load="False" x:Name="GoToUI">
8181 <TextBlock x:Uid="ToRowLabel" Margin="0,10,0,0"/>
8282 <TextBox Text="{Binding ToRow,Mode=TwoWay}" Margin="0,10,0,0" x:Uid="ToRowTextBox"/>
8383 <TextBlock x:Uid="EndRowLabel" Margin="0,10,0,0"/>
@@ -88,10 +88,10 @@
8888 </Flyout>
8989 </AppBarButton.Flyout>
9090 </AppBarButton>
91- <AppBarButton AllowFocusOnInteraction="True" x:Uid="PropertyButton">
91+ <AppBarButton AllowFocusOnInteraction="True" x:Uid="PropertyButton" Click="DocumentTypeButton_Click">
9292 <AppBarButton.Flyout>
9393 <Flyout>
94- <StackPanel Orientation="Vertical" Margin="20">
94+ <StackPanel Orientation="Vertical" Margin="20" x:Load="False" x:Name="DocumentTypeUI">
9595 <TextBlock x:Uid="DocumentTypeLabel" Margin="0,10,0,0"/>
9696 <ComboBox ItemsSource="{Binding FileTypeCollection}" Width="150" SelectedItem="{Binding DocumentType,Mode=TwoWay}" Margin="0,10,0,0">
9797 <ComboBox.ItemTemplate>
@@ -121,10 +121,10 @@
121121 </AppBarButton.Flyout>
122122 </AppBarButton>
123123 <AppBarButton Icon="List" x:Uid="OutlineTree" Command="{Binding OpenOutlineCommand}"/>
124- <AppBarButton x:Uid="Snipeet" AllowFocusOnInteraction="True">
124+ <AppBarButton x:Uid="Snipeet" AllowFocusOnInteraction="True" Click="SnippetButton_Click">
125125 <AppBarButton.Flyout>
126126 <Flyout>
127- <StackPanel>
127+ <StackPanel x:Load="False" x:Name="SnippetUI">
128128 <TextBlock Text="カテゴリー" />
129129 <ComboBox Width="300" ItemsSource="{Binding CategoryList}" SelectedItem="{Binding CurrentCategory,Mode=TwoWay}">
130130 <ComboBox.ItemTemplate>
--- a/UWP/FooEditor.UWP/Views/MainPage.xaml.cs
+++ b/UWP/FooEditor.UWP/Views/MainPage.xaml.cs
@@ -179,5 +179,27 @@ namespace FooEditor.UWP.Views
179179 }
180180
181181 }
182+
183+ /* とてつもなく汚いが、x:bindが使えないのでとりあえずこうする */
184+ private void FindButton_Click(object sender, RoutedEventArgs e)
185+ {
186+ this.FindName("FindUI");
187+ }
188+
189+ private void GoToButton_Click(object sender, RoutedEventArgs e)
190+ {
191+ this.FindName("GoToUI");
192+ }
193+
194+ private void DocumentTypeButton_Click(object sender, RoutedEventArgs e)
195+ {
196+ this.FindName("DocumentTypeUI");
197+ }
198+
199+ private void SnippetButton_Click(object sender, RoutedEventArgs e)
200+ {
201+ this.FindName("SnippetUI");
202+ }
203+ /* 要修正 */
182204 }
183205 }
\ No newline at end of file
Show on old repository browser