From e5e8c48d5196bcd0452ea8fa7ac1a14b5749f2cb Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Thu, 23 Sep 2021 13:32:10 -0500 Subject: [PATCH] Implement editing --- .../Models/CustomBrowser.cs | 22 +++++++++++++++++-- .../Views/CustomBrowserSetting.xaml | 9 ++++---- .../Views/CustomBrowserSetting.xaml.cs | 12 +++++++--- .../Views/SettingsControl.xaml | 18 ++++++++------- .../Views/SettingsControl.xaml.cs | 10 +++++++++ 5 files changed, 54 insertions(+), 17 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Models/CustomBrowser.cs b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Models/CustomBrowser.cs index aeff82802..c19de08a4 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Models/CustomBrowser.cs +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Models/CustomBrowser.cs @@ -2,7 +2,25 @@ { public class CustomBrowser : BaseModel { - public string Name { get; set; } - public string DataDirectoryPath { get; set; } + private string _name; + private string _dataDirectoryPath; + public string Name + { + get => _name; + set + { + _name = value; + OnPropertyChanged(nameof(Name)); + } + } + public string DataDirectoryPath + { + get => _dataDirectoryPath; + set + { + _dataDirectoryPath = value; + OnPropertyChanged(nameof(DataDirectoryPath)); + } + } } } \ No newline at end of file diff --git a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/CustomBrowserSetting.xaml b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/CustomBrowserSetting.xaml index 85452a89b..e13663a8d 100644 --- a/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/CustomBrowserSetting.xaml +++ b/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/CustomBrowserSetting.xaml @@ -6,6 +6,7 @@ xmlns:local="clr-namespace:Flow.Launcher.Plugin.BrowserBookmark.Models" mc:Ignorable="d" Title="CustomBrowserSetting" Height="450" Width="600" + KeyDown="WindowKeyDown" > @@ -21,13 +22,13 @@ + HorizontalAlignment="Left" VerticalAlignment="Center"/> + HorizontalAlignment="Left" VerticalAlignment="Center"/> + HorizontalAlignment="Left" VerticalAlignment="Center" Width="100" Height="30"/> + HorizontalAlignment="Left" VerticalAlignment="Center" Width="200" Height="30"/>