<Window x:Class="Karaoke_Kingpin.Controller.Index"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:Karaoke_Kingpin.Controller"
        xmlns:converters="clr-namespace:Karaoke_Kingpin.Converters"
        xmlns:properties="clr-namespace:Karaoke_Kingpin.Properties"
        mc:Ignorable="d"
        Title="Index" Height="800" Width="950"
        Loaded="Window_Loaded">
    <!-- 添加這一行來設置背景顏色 -->

    <!-- 这里是资源定义的开始 -->
    <Window.Resources>
        <Style x:Key="CircularCheckBox" TargetType="{x:Type CheckBox}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type CheckBox}">
                        <Grid HorizontalAlignment="Left" Background="Transparent">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <!-- 用于圆形标记 -->
                                <ColumnDefinition Width="*"/>
                                <!-- 用于文本内容 -->
                            </Grid.ColumnDefinitions>

                            <Grid x:Name="CheckMarkGrid" Width="15" Height="15" Grid.Column="0">
                                <!-- 最外层的 Ellipse 作为边框 -->
                                <Ellipse Stroke="Black" StrokeThickness="1"
                                 Fill="Transparent" Width="15" Height="15"/>
                                <!-- 第二层的 Ellipse 用作白色背景 -->
                                <Ellipse x:Name="BackgroundEllipse" Fill="White" StrokeThickness="0"
                                 Width="13" Height="13" Margin="1"/>
                                <!-- 最内层的 Ellipse 用作填充色，初始时不可见 -->
                                <Ellipse x:Name="FillEllipse" Fill="Black" Visibility="Collapsed"
                                 Width="9" Height="9" Margin="3"/>
                            </Grid>

                            <!-- ContentPresenter 放在第二列，不会被遮挡 -->
                            <ContentPresenter Grid.Column="1" HorizontalAlignment="Left"
                                      Margin="4,0,0,0" VerticalAlignment="Center"/>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsChecked" Value="True">
                                <!-- 当 CheckBox 被选中时，显示填充的 Ellipse -->
                                <Setter Property="Visibility" TargetName="FillEllipse" Value="Visible"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>

        <x:Array Type="Color" x:Key="AvailableColors">
            <Color>#FFA52A2A</Color>
            <!-- 红色 -->
            <Color>#FF008000</Color>
            <!-- 绿色 -->
            <Color>#FF0000FF</Color>
            <!-- 蓝色 -->
            <Color>#FF808080</Color>
            <!-- 灰色 -->
            <!-- 添加更多颜色 -->
            <Color>#FFD3D3D3</Color>
        </x:Array>

        <DataTemplate x:Key="ColorTemplate">
            <Rectangle Width="16" Height="16" Fill="{Binding}" />
        </DataTemplate>

      <converters:ImagePathConverter x:Key="ImagePathConverter"/>
    </Window.Resources>
    <!-- 资源定义结束 -->

    <Grid>
        <TabControl>
            <TabItem Header="一般設定">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="15*"/>
                        <!-- 顶部文字行 -->
                        <RowDefinition Height="85*"/>
                        <!-- 剩余空间分配给下面的内容 -->
                    </Grid.RowDefinitions>

                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="13*"/>
                        <ColumnDefinition Width="87*"/>
                    </Grid.ColumnDefinitions>

                    <Image Source="{Binding Path=UserImage, Converter={StaticResource ImagePathConverter}}"
                       Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10"/>

                    <!-- 顶部的两行文字 -->
                    <Grid Grid.Row="0" Grid.Column="1" Margin="10">
                        <!--<TextBlock Text="一般設定，這裡放置一些系統、播放、以及一些選單的設定選項，請依喜好自行調整。" FontWeight="Bold"/>-->
                        <Grid Margin="10 20 10 0">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <!-- 歡迎詞 -->
                            <!--Label Content="歡迎詞：" VerticalAlignment="Center"/-->
                            <!--TextBox x:Name="WelcomeMessageTextBox"
                                 Text="歡迎使用超級巨星歡唱網路版系統，與你共度美好時光。"
                                 Grid.Column="1"
                                 VerticalAlignment="Center"
                                 HorizontalAlignment="Stretch"
                                 TextChanged="WelcomeMessageTextBox_TextChanged"/-->
                            <!-- 系統公告 -->
                            <!--Label Content="系統公告：" VerticalAlignment="Center" Grid.Row="1"/-->
                            <!--TextBox x:Name="txtAnnouncement" Text="這裡填入系統公告內容。" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Stretch" Grid.Row="1"/-->
                            <!--Button Content="發送" Grid.Column="2" VerticalAlignment="Center" Grid.Row="1" Click="SendAnnouncement_Click"/-->
                        </Grid>
                    </Grid>

                    <!-- 原有的 Grid 放在這裡，作為 StackPanel 的一部分 -->
                    <Grid Grid.Row="1" Grid.ColumnSpan="2">
                        <!-- 定义两个列 -->
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="3*" />
                            <!-- 这将设置第一列宽度为可用空间的 3/10 -->
                            <ColumnDefinition Width="6*" />
                        </Grid.ColumnDefinitions>

                        <!-- 第一個 Column 的 Grid -->
                        <Grid Grid.Column="0">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="5*" />
                                <!-- 這將設置第一個 Row 高度為可用空間的 6/10 -->
                                <RowDefinition Height="5*" />
                                <!-- 這將設置第二個 Row 高度為可用空間的 4/10 -->
                            </Grid.RowDefinitions>

                            <!-- 在這裡放置第一個 Column 的第一個 Row 內的控件 -->
                            <Grid Grid.Row="0">
                                <!-- 第一個 Column 的第一個 Row 的內容 -->
                                <GroupBox Header="一般系統設定" Margin="5">
                                    <StackPanel>
                                        <CheckBox IsChecked="True">Windows開啟時自動啟動系統。</CheckBox>
                                        <CheckBox IsChecked="False">啟動時不顯示啟動窗口。</CheckBox>
                                        <!--<CheckBox IsChecked="False">啟用功能建議。</CheckBox>-->
                                        <!--<CheckBox IsChecked="False">在MSN上顯示音樂資訊。</CheckBox>-->
                                        <CheckBox IsChecked="True">消費者用戶跑馬燈打勾啟用。</CheckBox>
                                        <!-- 更多 CheckBox 控件 -->
                                        <Grid Margin="10">
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="Auto" />
                                                <!-- 用于标签 -->
                                                <ColumnDefinition Width="*" />
                                                <!-- 用于两个按钮，共用同一列 -->
                                            </Grid.ColumnDefinitions>
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="Auto" />
                                            </Grid.RowDefinitions>

                                            <Label Content="貼圖秒數:" Grid.Column="0" Grid.Row="0" Grid.RowSpan="2" VerticalAlignment="Center" />

                                            <!--<xctk:IntegerUpDown x:Name="txtSticker" 
                                                                Value="10" 
                                                                Increment="1" 
                                                                Minimum="0" 
                                                                Maximum="100" 
                                                                Grid.Column="1" 
                                                                Grid.Row="0" 
                                                                Grid.RowSpan="2"
                                                                VerticalAlignment="Center" 
                                                                HorizontalAlignment="Stretch"/>-->
                                            <TextBox x:Name="txtSticker"
                                                 Text="10"
                                                 Grid.Column="1"
                                                 Grid.Row="0"
                                                 Grid.RowSpan="2"
                                                 VerticalAlignment="Center"
                                                 HorizontalAlignment="Stretch"/>
                                        </Grid>

                                        <Grid Margin="10">
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="Auto" />
                                                <!-- 用于标签 -->
                                                <ColumnDefinition Width="*" />
                                                <!-- 用于两个按钮，共用同一列 -->
                                            </Grid.ColumnDefinitions>
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="Auto" />
                                            </Grid.RowDefinitions>
                                        </Grid>
                                    </StackPanel>
                                </GroupBox>
                            </Grid>

                            <!-- 在這裡放置第一個 Column 的第二個 Row 內的控件 -->
                            <Grid Grid.Row="1">
                                <!-- 第一個 Column 的第二個 Row 的內容 -->
                                <GroupBox Header="選單參數" Margin="5">
                                    <Grid>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto" />
                                            <RowDefinition Height="Auto" />
                                            <RowDefinition Height="Auto" />
                                            <RowDefinition Height="Auto" />
                                        </Grid.RowDefinitions>

                                        <CheckBox Grid.Row="0" IsChecked="True">歌曲列表秀出歌手及小圖示。</CheckBox>
                                        <!-- 在这里可以继续添加更多的 CheckBox 或其他控件 -->
                                        <Grid Grid.Row="2" Margin="10">
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="Auto" />
                                                <!-- 用于标签 -->
                                                <ColumnDefinition Width="*" />
                                                <!-- 用于文本框 -->
                                                <ColumnDefinition Width="Auto" />
                                                <!-- 用于两个按钮，共用同一列 -->
                                                <ColumnDefinition Width="Auto" />
                                            </Grid.ColumnDefinitions>
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="Auto" />
                                                <!-- 第一行用于标签和文本框 -->
                                                <RowDefinition Height="Auto" />
                                                <!-- 第二行用于按钮 -->
                                                <RowDefinition Height="Auto" />
                                            </Grid.RowDefinitions>

                                            <!--Label Content="新進歌曲限:" Grid.Column="0" Grid.Row="0" Grid.RowSpan="2" VerticalAlignment="Center" /-->

                                            <!--TextBox x:Name="txtNewSongLimit"
                                                 Text="100"
                                                 Grid.Column="1"
                                                 Grid.Row="0"
                                                 Grid.RowSpan="2"
                                                 VerticalAlignment="Center"
                                                 HorizontalAlignment="Stretch"
                                                 TextChanged="IntegerUpDown_ValueChanged"/-->

                                            <!--Label Content="筆" Grid.Column="2" Grid.Row="1" /-->

                                            <!--Label Content="熱門歌曲限" Grid.Column="0" Grid.Row="2" VerticalAlignment="Center" /-->

                                            <!--TextBox x:Name="txtHotSongLimit"
                                                 Text="100"
                                                 Grid.Column="1"
                                                 Grid.Row="2"
                                                 Grid.RowSpan="2"
                                                 VerticalAlignment="Center"
                                                 HorizontalAlignment="Stretch"
                                                 TextChanged="IntegerUpDown_ValueChanged"/-->

                                            <!--Label Content="筆。" Grid.Column="2" Grid.Row="2" VerticalAlignment="Center" /-->
                                        </Grid>
                                    </Grid>
                                </GroupBox>
                            </Grid>
                        </Grid>

                        <!-- 第二個 column 的 Grid -->
                        <Grid Background="#F0F0F0" Grid.Column="1">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*" />
                                <RowDefinition Height="100" />
                                <RowDefinition Height="*" />
                            </Grid.RowDefinitions>

                            <!-- 第二個 column 的內容 -->
                            <!-- 在這裡放置第二個 Column 的第一個 Row 內的控件 -->
                            <Grid Grid.Row="0">
                                <!--第二個 Column 的第一個 Row 的內容-->
                                <GroupBox Header="跑馬燈" Margin="5">
                                    <Grid>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="42"/>
                                            <RowDefinition Height="42"/>
                                            <RowDefinition Height="42"/>
                                            <RowDefinition Height="42"/>
                                            <RowDefinition Height="42"/>
                                        </Grid.RowDefinitions>

                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="480"/>
                                            <ColumnDefinition Width="120"/>
                                        </Grid.ColumnDefinitions>

                                        <ListBox x:Name="MarqueeListBox"
                                                 Grid.Row="0" Grid.Column="0" Grid.RowSpan="5"
                                                 HorizontalAlignment="Left" Height="210"
                                                 Margin="10,10,0,0" VerticalAlignment="Top"
                                                 Width="760" FontSize="20"
                                                 SelectionChanged="MarqueeListBox_SelectionChanged">
                                            <ListBox.ItemTemplate>
                                                <DataTemplate>
                                                    <TextBlock Text="{Binding}" TextWrapping="Wrap"/>
                                                </DataTemplate>
                                            </ListBox.ItemTemplate>
                                        </ListBox>

                                        <Button Margin="5,5,20,5" Grid.Row="3" Grid.Column="1" Click="SendAnnouncement_Click">
                                            <TextBlock Text="發送" FontSize="25"/>
                                        </Button>
                                    </Grid>
                                </GroupBox>
                            </Grid>

                            <Grid Grid.Row="1">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="50"/>
                                    <RowDefinition Height="50"/>
                                </Grid.RowDefinitions>

                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="3*"/>
                                    <ColumnDefinition Width="1*"/>
                                    <ColumnDefinition Width="1*"/>
                                    <ColumnDefinition Width="1*"/>
                                </Grid.ColumnDefinitions>

                                <!-- 目標行的實現 -->
                                <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.Column="0">
                                    <Label Content="對象" VerticalAlignment="Center" Margin="0,0,10,0" FontSize="25"/>
                                    <ComboBox x:Name="RoomNumbersComboBox" Width="240" Height="40" VerticalAlignment="Center" FontSize="25"
                                              SelectedValue="{Binding SelectedRoom, Mode=TwoWay}">
                                        <ComboBox.ItemContainerStyle>
                                            <Style TargetType="ComboBoxItem">
                                                <Setter Property="FontSize" Value="25"/>
                                            </Style>
                                        </ComboBox.ItemContainerStyle>
                                    </ComboBox>
                                </StackPanel>
                                <StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="0">
                                    <Label Content="顏色" VerticalAlignment="Center" Margin="0,0,10,0" FontSize="25"/>
                                    <ComboBox x:Name="ColorComboBox" Width="240" Height="40" VerticalAlignment="Center" FontSize="25"
                                              SelectedValue="{Binding SelectedColor, Mode=TwoWay}"
                                              SelectedValuePath="Content">
                                        <ComboBoxItem Content="白色" FontSize="25"/>
                                        <ComboBoxItem Content="紅色" FontSize="25"/>
                                        <ComboBoxItem Content="綠色" FontSize="25"/>
                                        <ComboBoxItem Content="藍色" FontSize="25"/>
                                        <ComboBoxItem Content="黑色" FontSize="25"/>
                                        <!-- 添加更多選項 -->
                                    </ComboBox>
                                </StackPanel>
                                <Button Margin="5" Grid.Row="0" Grid.Column="2" Grid.ColumnSpan="2" Click="LoadMarqueeItem_Click">
                                    <TextBlock Text="讀取跑馬燈資料" FontSize="25"/>
                                </Button>
                                <Button x:Name="AddDataButton" Margin="5" Grid.Row="1" Grid.Column="1">
                                    <TextBlock Text="新增資料" FontSize="20"/>
                                </Button>
                                <Button Margin="5" Grid.Row="1" Grid.Column="2" Click="btnSaveData_Click">
                                    <TextBlock Text="儲存資料" FontSize="20"/>
                                </Button>
                                <Button Margin="5" Grid.Row="1" Grid.Column="3" Click="btnDeleteData_Click">
                                    <TextBlock Text="刪除資料" FontSize="20"/>
                                </Button>
                            </Grid>

                            <!-- 內容標籤 -->
                            <Label Content="內容" HorizontalAlignment="Left" FontSize="25" Grid.Row="2"/>

                            <!-- 內容TextBox -->
                            <TextBox x:Name="ContentTextBox" 
                                     Width="550" 
                                     Height="250" 
                                     HorizontalAlignment="Right" 
                                     VerticalAlignment="Top" 
                                     Margin="10" 
                                     FontSize="20" 
                                     Grid.Column="1" 
                                     Grid.Row="2" 
                                     TextWrapping="Wrap"
                                     Text="{Binding ContentText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
                        </Grid>
                    </Grid>
                </Grid>
            </TabItem>
            <TabItem Header="歌庫目錄" Height="19" VerticalAlignment="Top">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <!-- 為新的控件設置自動高度 -->
                        <RowDefinition Height="*"/>
                        <!-- 占據1/3-->
                        <RowDefinition Height="2*"/>
                        <!-- 剩餘的2/3-->
                    </Grid.RowDefinitions>

                    <!-- 新增的搜索功能部分 -->
                    <StackPanel Grid.Row="0" Orientation="Horizontal" VerticalAlignment="Top">
                        <ComboBox x:Name="searchTypeComboBox" Width="200" Margin="5" SelectionChanged="SearchTypeComboBox_SelectionChanged">
                            <!-- 在這裡新增 ComboBoxItem -->
                            <ComboBoxItem Content="編號查詢"/>
                            <ComboBoxItem Content="歌星查詢"/>
                            <ComboBoxItem Content="歌名查詢"/>
                            <ComboBoxItem Content="日期查詢"/>
                            <ComboBoxItem Content="語別查詢"/>
                            <!-- 更多選項... -->
                        </ComboBox>
                        <TextBox x:Name="searchTextBox" Width="500" Margin="5"/>
                        <Button Content="查詢" Width="100" Margin="5" Click="SearchButton_Click"/>
                        <Label x:Name="resultCountLabel" Content="查詢筆數: 0筆" Foreground="Blue" VerticalAlignment="Center" Margin="5"/>
                    </StackPanel>

                    <DataGrid x:Name="SongsDataGrid" AutoGenerateColumns="False" CanUserAddRows="False" Grid.Row="1" SelectionChanged="SongsDataGrid_SelectionChanged">
                        <DataGrid.Columns>
                            <DataGridTextColumn Header="歌曲編號" Binding="{Binding SongNumber}"/>
                            <DataGridTextColumn Header="歌曲名稱" Binding="{Binding Song}"/>
                            <DataGridTextColumn Header="歌星 A" Binding="{Binding ArtistA}"/>
                            <DataGridTextColumn Header="歌星 B" Binding="{Binding ArtistB}"/>
                            <DataGridTextColumn Header="路徑 1" Binding="{Binding SongFilePathHost1}"/>
                            <DataGridTextColumn Header="路徑 2" Binding="{Binding SongFilePathHost2}"/>
                            <DataGridTextColumn Header="歌曲檔名" Binding="{Binding SongFileName}"/>
                            <DataGridTextColumn Header="新增日期" Binding="{Binding AddedTime}"/>
                            <DataGridTextColumn Header="分類" Binding="{Binding Category}"/>
                            <DataGridTextColumn Header="歌曲注音" Binding="{Binding PhoneticNotation}"/>
                            <DataGridTextColumn Header="歌曲拼音" Binding="{Binding PinyinNotation}"/>
                            <DataGridTextColumn Header="語別" Binding="{Binding LanguageType}"/>
                            <DataGridTextColumn Header="點播次數" Binding="{Binding Plays}"/>
                            <DataGridTextColumn Header="版權01" Binding="{Binding Copyright01}"/>
                            <DataGridTextColumn Header="版權02" Binding="{Binding Copyright02}"/>
                            <DataGridTextColumn Header="版權03" Binding="{Binding Copyright03}"/>
                            <DataGridTextColumn Header="版權04" Binding="{Binding Copyright04}"/>
                            <DataGridTextColumn Header="版權05" Binding="{Binding Copyright05}"/>
                            <DataGridTextColumn Header="版權06" Binding="{Binding Copyright06}"/>
                            <DataGridTextColumn Header="狀態" Binding="{Binding Status}"/>
                            <!--<DataGridTextColumn Header="DB加減" Binding="{Binding DbAdjust}"/>-->
                            <DataGridTextColumn Header="歌名字數" Binding="{Binding SongNameLength}"/>
                            <DataGridTextColumn Header="人聲" Binding="{Binding Vocal}"/>
                            <DataGridTextColumn Header="狀態2" Binding="{Binding Status2}"/>
                            <DataGridTextColumn Header="情境" Binding="{Binding Situation}"/>
                            <DataGridTextColumn Header="歌星A注音" Binding="{Binding ArtistAPhonetic}"/>
                            <DataGridTextColumn Header="歌星B注音" Binding="{Binding ArtistBPhonetic}"/>
                            <DataGridTextColumn Header="歌星A分類" Binding="{Binding ArtistACategory}"/>
                            <DataGridTextColumn Header="歌星B分類" Binding="{Binding ArtistBCategory}"/>
                            <DataGridTextColumn Header="歌星A簡體" Binding="{Binding ArtistASimplified}"/>
                            <DataGridTextColumn Header="歌星B簡體" Binding="{Binding ArtistBSimplified}"/>
                            <DataGridTextColumn Header="歌名簡體" Binding="{Binding SongSimplified}"/>
                            <DataGridTextColumn Header="歌星A拼音" Binding="{Binding ArtistAPinyin}"/>
                            <DataGridTextColumn Header="歌星B拼音" Binding="{Binding ArtistBPinyin}"/>
                        </DataGrid.Columns>
                    </DataGrid>

                    <!-- 其他界面元素可以放在第二個RowDefinition中 -->
                    <Grid Grid.Row="2">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <!-- 表單部分 -->
                            <ColumnDefinition Width="Auto"/>
                            <!-- 按鈕部分 -->
                        </Grid.ColumnDefinitions>

                        <!-- 第一列 -->
                        <StackPanel Grid.Column="0" Orientation="Vertical">
                            <StackPanel Orientation="Horizontal"><Label Content="歌曲編號" /><TextBox x:Name="txtSongNumber" Width="400" /></StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <Label Content="歌曲名稱" />
                                <TextBox x:Name="txtSongName" Width="400" TextChanged="TxtSongName_TextChanged" />
                            </StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <Label Content="歌星A" />
                                <TextBox x:Name="txtArtistA" Width="400" TextChanged="TxtArtistA_TextChanged" /></StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <Label Content="歌星B"  />
                                <TextBox x:Name="txtArtistB" Width="400" TextChanged="TxtArtistB_TextChanged" /></StackPanel>
                            <StackPanel Orientation="Horizontal"><Label Content="路徑01" /><TextBox x:Name="txtPath1" Width="400" /></StackPanel>
                            <StackPanel Orientation="Horizontal"><Label Content="路徑02" /><TextBox x:Name="txtPath2" Width="400" /></StackPanel>
                            <StackPanel Orientation="Horizontal"><Label Content="歌曲檔名" /><TextBox x:Name="txtSongFileName" Width="400" /></StackPanel>
                            <StackPanel Orientation="Horizontal"><Label Content="新增日期" /><TextBox x:Name="txtAddedDate" Width="400" /></StackPanel>
                            <StackPanel Orientation="Horizontal"><Label Content="分類" /><TextBox x:Name="txtCategory" Width="400" /></StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <Label Content="歌曲拼音" />
                                <TextBox x:Name="txtSongPinyin" Width="400" />
                            </StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <Label Content="歌曲注音" />
                                <TextBox x:Name="txtSongPhonetic" Width="400" />
                            </StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <Label Content="點播次數" />
                                <TextBox x:Name="txtPlays" Width="400"/>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <Label Content="歌星A注音" />
                                <TextBox x:Name="txtArtistAPhonetic" Width="400" />
                            </StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <Label Content="歌星B注音" />
                                <TextBox x:Name="txtArtistBPhonetic" Width="400" />
                            </StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <Label Content="歌星A分類" />
                                <ComboBox x:Name="artistACategoryComboBox" Width="200">
                                    <ComboBoxItem Content="男" />
                                    <ComboBoxItem Content="團" />
                                    <ComboBoxItem Content="女" />
                                    <ComboBoxItem Content="外" />
                                    <ComboBoxItem Content="未定義" />
                                </ComboBox>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <Label Content="歌星B分類" />
                                <ComboBox x:Name="artistBCategoryComboBox" Width="200">
                                    <ComboBoxItem Content="男" />
                                    <ComboBoxItem Content="團" />
                                    <ComboBoxItem Content="女" />
                                    <ComboBoxItem Content="外" />
                                    <ComboBoxItem Content="未定義" />
                                </ComboBox>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <Button Content="情歌" Width="50" Margin="10,10,5,0" Click="LoveSongButton_Click" />
                                <Button Content="選秀" Width="50" Margin="10,10,5,0" Click="TalentShowButton_Click" />
                                <Button Content="串燒" Width="50" Margin="10,10,5,0" Click="MedleyButton_Click" />
                                <Button Content="90年" Width="50" Margin="10,10,5,0" Click="NinetiesButton_Click" />
                                <Button Content="懷念" Width="50" Margin="10,10,5,0" Click="MemoriesButton_Click" />
                                <Button Content="大陸" Width="50" Margin="10,10,5,0" Click="MainlandButton_Click" />
                                <Button Content="清除" Width="50" Margin="10,10,5,0" Click="ClearButton_Click" />
                            </StackPanel>
                        </StackPanel>

                        <!-- 按鈕部分 -->
                        <StackPanel Grid.Column="1" Orientation="Vertical">
                            <StackPanel Orientation="Horizontal">
                                <Label Content="DB加減" />
                                <TextBox x:Name="txtDbAdjust" Width="200" />
                                <Label Content="歌名字數" />
                                <TextBox x:Name="txtSongNameLength" Width="200" />
                            </StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <Label Content="版權01" />
                                <TextBox x:Name="txtCopyright01" Width="400" /></StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <Label Content="版權02" />
                                <TextBox x:Name="txtCopyright02" Width="400" /></StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <Label Content="版權03" />
                                <TextBox x:Name="txtCopyright03" Width="400" /></StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <Label Content="版權04" />
                                <TextBox x:Name="txtCopyright04" Width="400" /></StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <Label Content="版權05" />
                                <TextBox x:Name="txtCopyright05" Width="400" /></StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <Label Content="版權06" />
                                <TextBox x:Name="txtCopyright06" Width="400" /></StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <Label Content="語別" />
                                <ComboBox x:Name="languageTypeComboBox" Width="200">
                                    <!-- 在這裡新增 ComboBoxItem -->
                                    <ComboBoxItem>國語</ComboBoxItem>
                                    <ComboBoxItem>台語</ComboBoxItem>
                                    <ComboBoxItem>英文</ComboBoxItem>
                                    <ComboBoxItem>日語</ComboBoxItem>
                                    <ComboBoxItem>粵語</ComboBoxItem>
                                    <ComboBoxItem>其他</ComboBoxItem>
                                    <ComboBoxItem>韓語</ComboBoxItem>
                                    <ComboBoxItem>越語</ComboBoxItem>
                                    <ComboBoxItem>客語</ComboBoxItem>
                                </ComboBox>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <Label Content="狀態" />
                                <ComboBox x:Name="statusComboBox" Width="200">
                                    <ComboBoxItem Content="0" />
                                    <ComboBoxItem Content="1" />
                                </ComboBox>
                                <Label Content="狀態2" />
                                <ComboBox x:Name="status2ComboBox" Width="200">
                                    <ComboBoxItem Content="0" />
                                    <ComboBoxItem Content="1" />
                                </ComboBox>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal">
                            </StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <Label Content="人聲" />
                                <ComboBox x:Name="vocalComboBox" Width="200">
                                    <ComboBoxItem Content="0" />
                                    <ComboBoxItem Content="1" />
                                </ComboBox>
                                <Label Content="1.有 0.無" />
                            </StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <Label Content="情境" />
                                <ComboBox x:Name="situationsComboBox" Width="200">
                                    <ComboBoxItem Content="浪漫" />
                                    <ComboBoxItem Content="柔和" />
                                    <ComboBoxItem Content="動感" />
                                    <ComboBoxItem Content="明亮" />
                                </ComboBox>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <Label Content="歌星A簡體" />
                                <TextBox x:Name="txtArtistASimplified" Width="400" />
                            </StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <Label Content="歌星B簡體" />
                                <TextBox x:Name="txtArtistBSimplified" Width="400" />
                            </StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <Label Content="歌名簡體" />
                                <TextBox x:Name="txtSongSimplified" Width="400" />
                            </StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <Label Content="歌星A拼音" />
                                <TextBox x:Name="txtArtistAPinyin" Width="400" />
                            </StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <Label Content="歌星B拼音" />
                                <TextBox x:Name="txtArtistBPinyin" Width="400" />
                            </StackPanel>
                            <!-- 新增的按鈕水平排列 -->
                            <StackPanel Orientation="Horizontal">
                                <Button Content="注音更新" Width="133" Margin="10,10,5,0" Click="UpdatePhoneticButton_Click" />
                                <Button Content="儲存歌曲" Width="133" Margin="10,10,5,0" Click="SaveSongButton_Click"/>
                                <Button Content="刪除歌曲" Width="133" Margin="10,10,5,0" Click="DeleteSongButton_Click"/>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <Button x:Name="exportSongsButton" Content="匯出歌庫" Click="ExportSongsButton_Click" Width="210" Margin="0,10,10,0"/>
                                <Button x:Name="importSongsButton" Content="匯入歌庫" Click="ImportSongsButton_Click" Width="210" Margin="10,10,5,0"/>
                            </StackPanel>
                        </StackPanel>
                    </Grid>
                </Grid>
            </TabItem>
            <!--<TabItem Header="佈景主題">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="15*" />
                        <RowDefinition Height="85*" />
                    </Grid.RowDefinitions>

                     --><!--定义列--><!-- 
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="1*" />
                         --><!--左边的图像--><!-- 
                        <ColumnDefinition Width="9*" />
                         --><!--剩余空间--><!-- 
                    </Grid.ColumnDefinitions>

                     --><!--添加图片--> 
                    <!--<Image Source="{Binding Source={x:Static properties:Resources.images}, Converter={StaticResource BitmapToImageSourceConverter}}" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10"/>-->
                    <!--<Image Source="C:\Users\Administrator\KSongloverNET\images.jpg" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10"/>--><!--
                    <Image Source="{Binding ImagesImage, Converter={StaticResource ImagePathConverter}}" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="0"/>

                    <TextBlock Grid.Row="0" Grid.Column="1" Text="系統支援多樣的佈景主題功能，你可以至官方佈景主題專頁進行下載，你也可以透過文件指引，並建立自定義的佈景主題並分享給同好。" Margin="10"/>

                     --><!--添加GroupBox来创建一个带标题和边框的区域--><!-- 
                    <GroupBox Header="佈景主題資訊" Margin="10" Grid.Row="1" Grid.ColumnSpan="2">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="*" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="100"/>
                                 --><!--對於其他元素--><!-- 
                                <ColumnDefinition Width="*"/>
                                 --><!--給 ComboBox 使用，填充所有剩餘空間--><!-- 
                                <ColumnDefinition Width="170"/>
                            </Grid.ColumnDefinitions>

                             --><!--其他元素可能在第一列--> 

                             <!--添加一个Label来显示"佈景主題"这四个字--><!-- 
                            <Label Grid.Row="0" Grid.Column="0" Content="佈景主題：" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="10,10,0,0"/>

                            <ComboBox x:Name="themeSelector" Grid.Row="0" Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="10,10,10,0" SelectionChanged="themeSelector_SelectionChanged">
                                <ComboBoxItem Content="./themes/black" />
                                <ComboBoxItem Content="./themes/default" />
                                <ComboBoxItem Content="./themes/default.cn" />
                                 --><!--添加更多的主題選項--><!-- 
                            </ComboBox>

                            <Image x:Name="themeImage" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Top" Height="350" Width="560" Margin="10,10" />

                             --><!--修改后的内部Grid，添加ColumnDefinitions定义--><!-- 
                            <Grid Grid.Row="0" Grid.RowSpan="2" Grid.Column="2">
                                <Grid.RowDefinitions>
                                     --><!--定义两个行--><!-- 
                                    <RowDefinition Height="30"/>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="Auto"/>
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                     --><!--定义两个列，第一个用于可能的未来使用，第二个用于显示"更多主題..."的TextBox--><!-- 
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>

                                 --><!--设置Grid.Column确保"更多主題..."显示在第二列--><!-- 
                                <TextBlock Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center">
                                    <Hyperlink NavigateUri="http://example.com">更多主題...</Hyperlink>
                                </TextBlock>

                                <Label Grid.Column="0" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Top" Foreground="Blue">點播台字型調整：</Label>

                                --><!--<xctk:IntegerUpDown x:Name="txtDianBoTaiFontAdjust" 
                                                                Value="0" 
                                                                Increment="2" 
                                                                Minimum="-8" 
                                                                Maximum="8" 
                                                                Grid.Column="1" 
                                                                Grid.Row="1" 
                                                                Grid.RowSpan="2"
                                                                VerticalAlignment="Top" 
                                                                HorizontalAlignment="Stretch"/>--><!--

                                <Label Grid.Column="0" Grid.Row="2" HorizontalAlignment="Left" Foreground="Blue">播放台字型調整：</Label>

                                --><!--<xctk:IntegerUpDown x:Name="txtBoFangTaiFontAdjust" 
                                                                Value="0" 
                                                                Increment="2" 
                                                                Minimum="-8" 
                                                                Maximum="8" 
                                                                Grid.Column="1" 
                                                                Grid.Row="2" 
                                                                Grid.RowSpan="2"
                                                                VerticalAlignment="Top" 
                                                                HorizontalAlignment="Stretch"/>--><!--
                            </Grid>

                            <GroupBox Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="3" Header="內定字型設定(只影響佈景主題中未設定字型元件)">
                                <Grid>
                                     --><!--Default Font Settings--><!-- 
                                    <TextBlock FontFamily="Arial" VerticalAlignment="Center">Ariel; 26; white</TextBlock>

                                     --><!--Button on the Right Side--><!-- 
                                    <Button HorizontalAlignment="Right" Content="設定..." Width="60"/>
                                </Grid>
                            </GroupBox>
                        </Grid>
                    </GroupBox>
                </Grid>
            </TabItem>-->
            <!--<TabItem Header="進階腳本">
                --><!-- 進階腳本的內容 --><!--
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="2*" />
                        --><!-- 其他行定義 --><!--
                        <RowDefinition Height="8*" />
                    </Grid.RowDefinitions>

                    <Grid Grid.Row="0">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="15*"/>
                            <ColumnDefinition Width="85*"/>
                        </Grid.ColumnDefinitions>

                        <Image Source="C:\Users\Administrator\KSongloverNET\script.jpg" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10"/>
                        --><!-- 上面一排文字 --><!--
                        <TextBlock Grid.Column="1" Text="此設定主要用於系統執行時將執行的初始化命令，你可以自行新增及刪除要執行的命令，也可進行其執行的先後順序，請確保其命令可正常執行，否則可能會造成程式異常，請小心設定。" 
                            Margin="10" 
                            VerticalAlignment="Top" 
                            HorizontalAlignment="Left"
                            TextWrapping="Wrap"/>
                    </Grid>

                    --><!-- 下面的大方框、文字、和按鈕 --><!--
                    <Grid Grid.Row="1" Margin="10">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="9*" />
                            <ColumnDefinition Width="1*" />
                        </Grid.ColumnDefinitions>

                        --><!-- 上面一行文字 --><!--
                        <TextBlock Grid.Row="0" Text="初始化腳本命令：" Margin="0 0 0 10" Foreground="Blue" />

                        --><!-- 下面的大方框可以輸入文字 --><!--
                        <TextBox Grid.Row="1" Grid.Column="0" Grid.RowSpan="5" Width="Auto" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto">
                            mkdir c:\video
                        </TextBox>

                        --><!-- 新增按鈕 --><!--
                        <Button Grid.Row="1" Grid.Column="1" Content="新增" Height="20" Margin="4,0,4,0" />
                        --><!-- 刪除按鈕 --><!--
                        <Button Grid.Row="2" Grid.Column="1" Content="刪除" Height="20" VerticalAlignment="Top" Margin="4,4,4,0" />
                        --><!-- 向上移動按鈕 --><!--
                        <Button Grid.Row="3" Grid.Column="1" Content="向上移動" Height="20" VerticalAlignment="Top" Margin="4,4,4,0" />
                        --><!-- 向下移動按鈕 --><!--
                        <Button Grid.Row="4" Grid.Column="1" Content="向下移動" Height="20" VerticalAlignment="Top" Margin="4,4,4,0" />
                        --><!-- 編輯按鈕 --><!--
                        <Button Grid.Row="5" Grid.Column="1" Content="編輯..." Height="20" VerticalAlignment="Top" Margin="4,4,4,0" />

                        --><!-- 复选框 --><!--
                        <CheckBox Grid.Row="6" Grid.Column="0" Margin="0,10,0,0" Content="執行時顯示視窗(通常為除錯使用)" VerticalAlignment="Top" Foreground="Blue"/>
                    </Grid>
                </Grid>
            </TabItem>-->
            <TabItem Header="除錯">
                <!-- 除錯的內容 -->
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="20*"/>
                        <!-- 其他行定義 -->
                        <RowDefinition Height="72*"/>
                        <RowDefinition Height="8*"/>
                    </Grid.RowDefinitions>

                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="15*"/>
                        <ColumnDefinition Width="85*"/>
                    </Grid.ColumnDefinitions>

                    <Image Source="{Binding Path=BugImage, Converter={StaticResource ImagePathConverter}}"
                       Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10"/>
                    
                    <!-- 上面一排文字 -->
                    <TextBlock Grid.Row="0" Grid.Column="1" Text="如果發生一些異常狀態，你可以嘗試將偵錯模式打開，系統將自動生成作業日誌檔，以利進行錯誤排除，你也可將此日誌檔傳送給官方參考，讓K歌情人更加完美。" 
                        Margin="10" 
                        VerticalAlignment="Top" 
                        HorizontalAlignment="Left"
                        TextWrapping="Wrap"/>

                    <GroupBox Grid.Row="1" Grid.ColumnSpan="2" Header="偵錯模式" Margin="10">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>

                            <TextBlock Grid.Row="0" Margin="5,5,0,0" FontSize="22" FontWeight="Bold">顯示各個log檔案連接，點選後可以開啟查看 例如下方圖示 所有功能的記錄均在此</TextBlock>

                            <Grid Grid.Row="1">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="*"/>
                                </Grid.ColumnDefinitions>

                                <Button Grid.Row="1" Grid.Column="0" Margin="10" Click="SongSelectionError_Click">點歌錯誤</Button>
                                <!--<Button Grid.Row="1" Grid.Column="1" Margin="10" Click="LoginError_Click">登入錯誤</Button>-->
                                <!--<Button Grid.Row="1" Grid.Column="2" Margin="10" Click="PlaybackFailure_Click">播放失敗</Button>-->
                                <Button Grid.Row="1" Grid.Column="1" Margin="10" Click="SystemException_Click">系統異常</Button>
                                
                                <!-- 新增的 ComboBox -->
                                <ComboBox x:Name="hostComboBox" Grid.Row="1" Grid.Column="4" Margin="10" Width="150" SelectionChanged="HostComboBox_SelectionChanged"/>

                            </Grid>

                            <TextBox x:Name="systemExceptionLogTextBox" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="4" Margin="10" IsReadOnly="True" VerticalScrollBarVisibility="Auto" Visibility="Collapsed"/>
                        </Grid>
                    </GroupBox>

                    <!-- 底部的行 -->
                    <Border Background="WhiteSmoke" Grid.Row="2" Grid.ColumnSpan="2">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="80"/>
                                <ColumnDefinition Width="80"/>
                                <ColumnDefinition Width="80"/>
                            </Grid.ColumnDefinitions>
                            <Button Content="確定" Grid.Column="1" Margin="6"/>
                            <Button Content="結束" Grid.Column="2" Margin="6"/>
                            <Button Content="套用" Grid.Column="3" Margin="6"/>
                        </Grid>
                    </Border>
                </Grid>
            </TabItem>
            <!--<TabItem Header="待機播放">
                 --><!--待機播放的內容--><!-- 
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="20*"/>
                         --><!--其他行定義--><!-- 
                        <RowDefinition Height="72*"/>
                        <RowDefinition Height="8*"/>
                    </Grid.RowDefinitions>

                    <Grid Grid.Row="0">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="15*"/>
                            <ColumnDefinition Width="85*"/>
                        </Grid.ColumnDefinitions>

                        <Image Source="{Binding Path=FilmImage, Converter={StaticResource ImagePathConverter}}"
                           Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10"/>

                        <TextBlock Grid.Row="1" Grid.Column="1" FontSize="18" FontWeight="Bold" Text="開啟包廂時 可以預先設定播放 包廂位置 防火安全等宣傳影片或圖片資訊" 
                                    Margin="10" 
                                    VerticalAlignment="Top" 
                                    HorizontalAlignment="Left"
                                    TextWrapping="Wrap"/>
                    </Grid>

                    <GroupBox Grid.Row="1" Header="待機播放強化功能" Margin="10">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>

                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            
                            <CheckBox Grid.Row="0" Margin="10">啟用待機播放強化功能(照片功能或廣告功能)</CheckBox>

                            <TextBlock Grid.Row="1" Grid.Column="0" Text="選擇待播影片路徑(支援mpg, dat, avi, mvb, mkv, mp4, flv)：" 
                                    Margin="2" 
                                    VerticalAlignment="Top" 
                                    HorizontalAlignment="Left"
                                    TextWrapping="Wrap"/>

                            <Button Grid.Row="1" Grid.Column="1" Content="選擇..." Width="60" Margin="2" />

                            <TextBox x:Name="standbyPlaybackPathTextBox" IsReadOnly="True" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Margin="2" Background="WhiteSmoke" />
                        </Grid>
                    </GroupBox>

                     --><!--底部的行--><!-- 
                    <Border Background="WhiteSmoke" Grid.Row="2" Grid.ColumnSpan="2">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="80"/>
                                <ColumnDefinition Width="80"/>
                                <ColumnDefinition Width="80"/>
                            </Grid.ColumnDefinitions>
                            <Button Content="確定" Grid.Column="1" Margin="6"/>
                            <Button Content="結束" Grid.Column="2" Margin="6"/>
                            <Button Content="套用" Grid.Column="3" Margin="6"/>
                        </Grid>
                    </Border>
                </Grid>
            </TabItem>-->
            <!--<TabItem Header="快取處理">
                --><!-- 快取處理的內容 --><!--
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="20*"/>
                        --><!-- 其他行定義 --><!--
                        <RowDefinition Height="72*"/>
                        <RowDefinition Height="8*"/>
                    </Grid.RowDefinitions>

                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="15*"/>
                            <ColumnDefinition Width="85*"/>
                        </Grid.ColumnDefinitions>

                        <Image Source="{Binding Path=CacheImage, Converter={StaticResource ImagePathConverter}}"
                           Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10"/>

                        <TextBlock Grid.Row="1" Grid.Column="1" FontSize="18" FontWeight="Bold" Text="預先從歌庫主機下載點播歌曲至主機 到達設定容量或重開機就清空" 
                                    Margin="10" 
                                    VerticalAlignment="Top" 
                                    HorizontalAlignment="Left"
                                    TextWrapping="Wrap"/>
                    </Grid>

                    <GroupBox Grid.Row="1" Header="快取" Margin="10">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>

                            <CheckBox Grid.Row="0" Margin="10">啟用檔案快取機制(含雲端歌庫機制)</CheckBox>

                            <Grid Grid.Row="1">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="30"/>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="Auto"/>
                                </Grid.RowDefinitions>

                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                
                                <CheckBox Grid.Row="0" Grid.Column="0" Style="{StaticResource CircularCheckBox}" Margin="10,7" Content="依容量限制" VerticalAlignment="Top"/>

                                --><!--<xctk:IntegerUpDown x:Name="capacityLimitUpDown" 
                                                                Value="1" 
                                                                Increment="1" 
                                                                Minimum="1" 
                                                                Maximum="100" 
                                                                Grid.Column="1" 
                                                                Grid.Row="0" 
                                                                Grid.RowSpan="2"
                                                                Margin="0,4"
                                                                VerticalAlignment="Top" 
                                                                HorizontalAlignment="Stretch"/>--><!--

                                <TextBlock Grid.Row="0" Grid.Column="2" VerticalAlignment="Center">GB</TextBlock>

                                <CheckBox Grid.Row="1" Style="{StaticResource CircularCheckBox}" Margin="10,7" Content="依百分比" />

                                --><!--<xctk:IntegerUpDown x:Name="percentageLimitUpDown" 
                                                                Value="80" 
                                                                Increment="1" 
                                                                Minimum="1" 
                                                                Maximum="100" 
                                                                Grid.Column="1" 
                                                                Grid.Row="1" 
                                                                VerticalAlignment="Center" 
                                                                HorizontalAlignment="Stretch"
                                                                IsEnabled="False"/>--><!--

                                <TextBlock Grid.Row="1" Grid.Column="2" VerticalAlignment="Center">%</TextBlock>

                                <Button Grid.Row="1" Grid.Column="3" Content="選擇..." Width="60" Margin="2" Click="BrowseCacheLocation_Click" HorizontalAlignment="Right" Background="Gainsboro" />

                                <TextBlock Grid.Row="2" Grid.Column="0"></TextBlock>

                                <TextBlock Grid.Row="2" Text="快取存放位置：" TextWrapping="Wrap" Margin="10,0"/>

                                <TextBox x:Name="cacheLocationTextBox" IsReadOnly="True" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="3" HorizontalAlignment="Stretch" Margin="2" Background="WhiteSmoke" />

                                <CheckBox Grid.Row="3" Grid.ColumnSpan="3" Margin="10">包含Youtube點播使用快取（此功能啟用將降低畫質，如網路速度夠快不建議啟用）</CheckBox>
                            </Grid>
                        </Grid>
                    </GroupBox>

                    --><!-- 底部的行 --><!--
                    <Border Background="WhiteSmoke" Grid.Row="2" Grid.ColumnSpan="2">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="80"/>
                                <ColumnDefinition Width="80"/>
                                <ColumnDefinition Width="80"/>
                            </Grid.ColumnDefinitions>
                            <Button Content="確定" Grid.Column="1" Margin="6"/>
                            <Button Content="結束" Grid.Column="2" Margin="6"/>
                            <Button Content="套用" Grid.Column="3" Margin="6"/>
                        </Grid>
                    </Border>
                </Grid>
            </TabItem>-->
        </TabControl>
    </Grid>
</Window>
