Commit be82ef92 authored by Rabbit's avatar Rabbit
Browse files

新增面板高度设置项

parent b6891e64
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -46,6 +46,9 @@
            <setting name="RandomMode" serializeAs="String">
                <value>3</value>
            </setting>
            <setting name="WindowHeight" serializeAs="String">
                <value>500</value>
            </setting>
        </CountDownList.MiscSetting>
    </userSettings>
</configuration>
 No newline at end of file
+14 −5
Original line number Diff line number Diff line
@@ -214,6 +214,14 @@ namespace CountDownList.Class
                                    brush = ib;
                                }
                                else
                                {
                                    try
                                    {
                                        ib.ImageSource = new BitmapImage(new Uri(backgroundRaw, UriKind.RelativeOrAbsolute));
                                        ib.Stretch = Stretch.UniformToFill;
                                        brush = ib;
                                    }
                                    catch (FileNotFoundException)
                                    {
                                        ib.ImageSource = new BitmapImage(new Uri("UI\\Misc\\PathErr.png", UriKind.RelativeOrAbsolute));
                                        ib.Stretch = Stretch.UniformToFill;
@@ -222,6 +230,7 @@ namespace CountDownList.Class
                                        pathErr.Add(new(title, backgroundRaw));
                                    }
                                }
                            }
                            catch
                            {

+6 −1
Original line number Diff line number Diff line
@@ -10,7 +10,12 @@
        xmlns:hc="https://handyorg.github.io/handycontrol" xmlns:local1="clr-namespace:CountDownList.Class"
        Title="MainWindow" Height="500" Width="392" Background="{x:Null}" WindowStyle="None" ShowInTaskbar="False" ResizeMode="CanMinimize" Loaded="Window_Loaded" MouseEnter="Window_MouseEnter" MouseLeave="Window_MouseLeave">
    <WindowChrome.WindowChrome>
        <WindowChrome GlassFrameThickness="-1,-1,-1,-1" CaptionHeight="0" NonClientFrameEdges="None"     UseAeroCaptionButtons="False" />
        <WindowChrome
            GlassFrameThickness="-1,-1,-1,-1"
            CaptionHeight="0"
            NonClientFrameEdges="None"
            UseAeroCaptionButtons="False"
            CornerRadius="8"/>
    </WindowChrome.WindowChrome>

    <Window.Resources>
+4 −3
Original line number Diff line number Diff line
@@ -70,6 +70,7 @@ namespace CountDownList
        public MainWindow()
        {
            InitializeComponent();
            Height = MiscSetting.Default.WindowHeight;
        }

        private void Border_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
@@ -92,7 +93,7 @@ namespace CountDownList
                IsOpen = true;
                border.Visibility = Visibility.Visible;
                border1.CornerRadius = new(8,8,0,0);
                Height = 500;
                Height = MiscSetting.Default.WindowHeight; ;
            }
        }

@@ -206,7 +207,7 @@ namespace CountDownList
                IsOpen = true;
                border.Visibility = Visibility.Visible;
                border1.CornerRadius = new(8, 8, 0, 0);
                Height = 500;
                Height = MiscSetting.Default.WindowHeight;
            }

            Version.Text = $"CountDownList V{new AssemblyInformation().AssemblyVersion}";
@@ -260,7 +261,7 @@ namespace CountDownList
                IsOpen = true;
                border.Visibility = Visibility.Visible;
                border1.CornerRadius = new(8, 8, 0, 0);
                Height = 500;
                Height = MiscSetting.Default.WindowHeight;
            }
        }

+12 −0
Original line number Diff line number Diff line
@@ -178,5 +178,17 @@ namespace CountDownList {
                this["RandomMode"] = value;
            }
        }
        
        [global::System.Configuration.UserScopedSettingAttribute()]
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.Configuration.DefaultSettingValueAttribute("500")]
        public double WindowHeight {
            get {
                return ((double)(this["WindowHeight"]));
            }
            set {
                this["WindowHeight"] = value;
            }
        }
    }
}
Loading