Explorar o código

option dialog in construction

olivier.massot %!s(int64=9) %!d(string=hai) anos
pai
achega
10720f5963

BIN=BIN
barry.v12.suo


+ 10 - 4
barry/MainWindow.xaml

@@ -16,9 +16,15 @@
 
         <Label x:Name="lbl_drive" Content="Current drive:" HorizontalAlignment="Left" Margin="10,196,0,0" VerticalAlignment="Top" Width="219" FontWeight="Bold"/>
         <Label x:Name="lbl_driveletter" Content="" HorizontalAlignment="Left" Margin="10,227,0,0" VerticalAlignment="Top" Width="243"/>
-
-        <TextBox x:Name="txt_console" Margin="258,10,10,10" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Auto" FontFamily="Consolas" />
-        <Button Content="Backup" HorizontalAlignment="Left" Margin="154,274,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click"/>
-        <Button Content="Preview" HorizontalAlignment="Left" Margin="59,274,0,0" VerticalAlignment="Top" Width="75" RenderTransformOrigin="-0.263,0.407" Click="Button_Click_1"/>
+        <Button Name="btn_backup" Content="Backup" HorizontalAlignment="Left" Margin="145,253,0,0" VerticalAlignment="Top" Width="75" Click="btn_backup_Click"/>
+        <Button Name="btn_preview" Content="Preview" HorizontalAlignment="Left" Margin="30,253,0,0" VerticalAlignment="Top" Width="75" RenderTransformOrigin="-0.263,0.407" Click="btn_preview_Click"/>
+        <RichTextBox Name="txt_console" HorizontalAlignment="Left" Height="300" Margin="258,10,0,0" VerticalAlignment="Top" Width="610">
+            <FlowDocument>
+                <Paragraph>
+                    <Run Text=""/>
+                </Paragraph>
+            </FlowDocument>
+        </RichTextBox>
+        <Button Name="btn_options" Content="Options" HorizontalAlignment="Left" Margin="30,288,0,0" VerticalAlignment="Top" Width="75" Click="btn_options_Click"/>
     </Grid>
 </Window>

+ 42 - 21
barry/MainWindow.xaml.cs

@@ -23,11 +23,9 @@ namespace barry
     /// </summary>
     public partial class MainWindow : Window
     {
-        //TextBoxOutputter outputter;
         Methods methods = new Methods();
 
-        string source;
-        string target;
+        internal BackupConfig bkp;
 
         public MainWindow()
         {
@@ -41,27 +39,29 @@ namespace barry
             
             print("**** BARRY Backup ****");
 
-            //methods.register_this_cpu();
-
-            BackupConfig bkp = methods.load_this_cpu();
+            bkp = methods.load_this_cpu();
             if (bkp == null)
             {
                 print(">> unknown machine");
+                btn_backup.IsEnabled = false;
+                btn_preview.IsEnabled = false;
                 return;
             }
 
-            target = bkp.dir_path;
-            print("Target of the backup: " + bkp.dir_path);
-            source = methods.current_drive_letter() + bkp.local_subdir;
-            print("Source: " + source);
+            print("Source: " + bkp_source());
+            print("Target of the backup: " + bkp_target());
+            
+        }
 
+        internal string bkp_source()
+        {
+            return bkp.dir_path;
         }
 
-        //private void connect_console_to_textbox()
-        //{
-        //    outputter = new TextBoxOutputter(txt_console);
-        //    Console.SetOut(outputter);
-        //}
+        internal string bkp_target()
+        {
+            return methods.current_drive_letter() + bkp.local_subdir;
+        }
 
         private void displays_barry_picture()
         {
@@ -72,10 +72,12 @@ namespace barry
             img_barry.Source = bitmap;
         }
 
-        public void print(string line)
+        private string last_added = "";
+        public void print(string line, bool flush = false)
         {
             txt_console.AppendText(line + "\n");
             txt_console.ScrollToEnd();
+            last_added = line + "\n";
         }
 
         /// <summary>
@@ -98,15 +100,14 @@ namespace barry
         }
 
 
-        private void Button_Click(object sender, RoutedEventArgs e)
+        private void btn_backup_Click(object sender, RoutedEventArgs e)
         {
-            cmd(String.Format("ROBOCOPY {0} {1} /E /XO /w:1 /r:3", source, target));
+            cmd(String.Format("ROBOCOPY {0} {1} /E /XO /w:1 /r:3", bkp_source(), bkp_target()));
         }
 
-        private void Button_Click_1(object sender, RoutedEventArgs e)
+        private void btn_preview_Click(object sender, RoutedEventArgs e)
         {
-            cmd(String.Format("ROBOCOPY {0} {1} /E /XO /L", source, target));
-            //cmd("ping www.qwant.fr");
+            cmd(String.Format("ROBOCOPY {0} {1} /E /XO /L", bkp_source(), bkp_target()));
         }
 
         public void cmd(string cmd)
@@ -146,7 +147,27 @@ namespace barry
             Dispatcher.BeginInvoke(new Action(() => print(outLine.Data)), DispatcherPriority.ContextIdle, null);
         }
 
+        private void btn_options_Click(object sender, RoutedEventArgs e)
+        {
+            if (bkp == null)
+            {
+                string msg = "Barry do not know this computer, do you want him to memorize it?";
+                MessageBoxResult result = MessageBox.Show(msg, "Confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question);
+                if (result == MessageBoxResult.No)
+                {
+                    return;
+                }
+                methods.register_this_cpu();
+                bkp = methods.load_this_cpu();
+
+            }
 
+            Window opt_window = new OptionsWindow(bkp);
+            opt_window.Owner = this;
+            opt_window.ShowDialog();
+
+
+        }
 
     }
 

+ 31 - 0
barry/OptionsWindow.xaml

@@ -0,0 +1,31 @@
+<Window x:Class="barry.OptionsWindow"
+        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+        Title="Barry - Options" Height="345" Width="389.125">
+    <Grid>
+        <Grid.RowDefinitions>
+            <RowDefinition Height="61*"/>
+            <RowDefinition Height="209*"/>
+        </Grid.RowDefinitions>
+
+        <Label Content="Directory on the PC" HorizontalAlignment="Left" Margin="10,2,0,0" VerticalAlignment="Top"/>
+        <TextBox Name="txt_path" HorizontalAlignment="Left" Height="23" Margin="10,28,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="361" TextChanged="txt_path_TextChanged"/>
+
+        <Label Content="Sub-directory of the USB Device" HorizontalAlignment="Left" Margin="10,56,0,0" VerticalAlignment="Top" Grid.RowSpan="2"/>
+        <TextBox Name="txt_subdir" HorizontalAlignment="Left" Height="23" Margin="10,19,0,0" Grid.Row="1" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="361" TextChanged="txt_subdir_TextChanged"/>
+
+        <Label Content="What should barry do:" HorizontalAlignment="Left" Margin="10,52,0,0" Grid.Row="1" VerticalAlignment="Top"/>
+
+        <ComboBox Name="cb_bkptype" HorizontalAlignment="Left" Margin="143,54,0,0" VerticalAlignment="Top" Width="228" SelectionChanged="cb_bkptype_SelectionChanged" Grid.Row="1">
+            <ComboBoxItem Tag="0" Content="Nothing"/>
+            <ComboBoxItem Tag="1" Content="Backup : USB Device >> Computer" IsSelected="True"/>
+            <ComboBoxItem Tag="-1" Content="Backup : Computer >> USB Device"/>
+        </ComboBox>
+
+        <Label Name="lbl_decription" Content="Please tell Barry what to do..." HorizontalAlignment="Left" Margin="10,83,0,0" Grid.Row="1" VerticalAlignment="Top" Height="92" Width="356" FontStyle="Italic"/>
+
+        <Button Name="btn_save" Content="Save" HorizontalAlignment="Left" Margin="277,201,0,0" Grid.Row="1" VerticalAlignment="Top" Width="75" Click="btn_save_Click" RenderTransformOrigin="0.507,2.182"/>
+        <Button Name="btn_cancel" Content="Cancel" HorizontalAlignment="Left" Margin="49,201,0,0" Grid.Row="1" VerticalAlignment="Top" Width="75" RenderTransformOrigin="0.413,2.136" Click="btn_cancel_Click"/>
+
+    </Grid>
+</Window>

+ 89 - 0
barry/OptionsWindow.xaml.cs

@@ -0,0 +1,89 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+
+namespace barry
+{
+    /// <summary>
+    /// Logique d'interaction pour OptionsWindow.xaml
+    /// </summary>
+    public partial class OptionsWindow : Window
+    {
+        Methods methods = new Methods();
+        BackupConfig bkp;
+        bool _loaded = false;
+        public OptionsWindow(BackupConfig current_bkp)
+        {
+
+            InitializeComponent();
+            _loaded = true;
+
+            bkp = current_bkp;
+
+            txt_path.Text = bkp.dir_path;
+            txt_subdir.Text = bkp.local_subdir;
+            foreach (ComboBoxItem item in cb_bkptype.Items)
+            {
+                if(item.Tag.Equals(bkp.bkp_type))
+                {
+                    cb_bkptype.SelectedItem = item;
+                }
+            }
+
+        }
+
+        private void btn_save_Click(object sender, RoutedEventArgs e)
+        {
+            methods.save_this_cpu(bkp);
+        }
+
+        private void btn_cancel_Click(object sender, RoutedEventArgs e)
+        {
+            
+        }
+
+        private void cb_bkptype_SelectionChanged(object sender, SelectionChangedEventArgs e)
+        {
+            if (!_loaded) { return; }
+            bkp.bkp_type = int.Parse(cb_bkptype.Tag.ToString());
+            update_window();
+        }
+
+        private void update_window()
+        {
+            if (!_loaded) { return; }
+            lbl_decription.Content = bkp.describe();
+        }
+
+        private void txt_subdir_TextChanged(object sender, TextChangedEventArgs e)
+        {
+            if (!_loaded) { return; }
+            //if (! System.IO.Directory.Exists(txt_subdir.Text))
+            //{
+            //    lbl_decription.Content = "Wait! Barry does not find this directory on the computer!";
+            //    return;
+            //}
+            
+            bkp.local_subdir = txt_subdir.Text;
+            update_window();
+        }
+
+        private void txt_path_TextChanged(object sender, TextChangedEventArgs e)
+        {
+            if (!_loaded) { return; }
+            bkp.dir_path = txt_path.Text;
+            update_window();
+        }
+
+    }
+}

+ 7 - 0
barry/barry.csproj

@@ -81,6 +81,9 @@
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </ApplicationDefinition>
+    <Compile Include="OptionsWindow.xaml.cs">
+      <DependentUpon>OptionsWindow.xaml</DependentUpon>
+    </Compile>
     <Page Include="MainWindow.xaml">
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
@@ -97,6 +100,10 @@
       <DependentUpon>MainWindow.xaml</DependentUpon>
       <SubType>Code</SubType>
     </Compile>
+    <Page Include="OptionsWindow.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
   </ItemGroup>
   <ItemGroup>
     <Compile Include="Properties\AssemblyInfo.cs">

BIN=BIN
barry/bin/Debug/barry.exe


BIN=BIN
barry/bin/Debug/barry.pdb


+ 29 - 0
barry/core/BackupConfig.cs

@@ -19,6 +19,7 @@ namespace barry
 
         // operation type
         // 1 for a backup of the device on the computer (default)
+        // 0 for nothing
         // -1 for a backup of the computer on the device
         public int bkp_type = 1;
 
@@ -28,6 +29,34 @@ namespace barry
         public string last_bkp_target = "";
 
 
+        /// <summary>
+        /// return an explicative text about what barry is going to do
+        /// </summary>
+        /// <returns></returns>
+        public string describe()
+        {
+            Methods methods = new Methods();
+            string msg = "";
+            if (bkp_type == 0)
+            {
+                msg = "Simple: Barry won't do nothing.";
+            }
+            else if (bkp_type == 1)
+            {
+                msg = String.Format("Barry will copy all of your files and directories:\nFrom your USB Device, in {0}\n To your computer, in {1}", methods.current_drive_letter() + local_subdir, dir_path);
+            }
+            else if (bkp_type == 1)
+            {
+                msg = String.Format("Barry will copy all of your files and directories:\nFrom your computer, in {1}\n To your USB Device, in {0}", methods.current_drive_letter() + local_subdir, dir_path);
+            }
+            else
+            {
+                msg = "Problem: Barry don't know what he should do. And he do not like it...";
+            }
+
+            msg += "\nThe last time Barry did that was " + last_bkp_date + ", and it was a " + last_bkp_result;
+            return msg;
+        }
 
 
     }

+ 2 - 1
barry/core/methods.cs

@@ -187,11 +187,12 @@ namespace barry
 
             // add a select dir dialog box
 
-            new_bkp.dir_path = @"e:\test\";
+            new_bkp.dir_path = @"";
 
             barry_config.Add(machine_guid, new_bkp);
 
             save_config_to_file(barry_config);
+
         }
 
         public BackupConfig load_this_cpu()

BIN=BIN
barry/obj/Debug/MainWindow.baml


+ 42 - 7
barry/obj/Debug/MainWindow.g.cs

@@ -1,4 +1,4 @@
-#pragma checksum "..\..\MainWindow.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "222A5900330F06B0A8E471C77677A68F"
+#pragma checksum "..\..\MainWindow.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "87D2242A2B7D219F9A34FC07C6B49244"
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     Ce code a été généré par un outil.
@@ -89,9 +89,33 @@ namespace barry {
         #line hidden
         
         
+        #line 19 "..\..\MainWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button btn_backup;
+        
+        #line default
+        #line hidden
+        
+        
         #line 20 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.TextBox txt_console;
+        internal System.Windows.Controls.Button btn_preview;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 21 "..\..\MainWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.RichTextBox txt_console;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 28 "..\..\MainWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button btn_options;
         
         #line default
         #line hidden
@@ -153,20 +177,31 @@ namespace barry {
             this.lbl_driveletter = ((System.Windows.Controls.Label)(target));
             return;
             case 8:
-            this.txt_console = ((System.Windows.Controls.TextBox)(target));
+            this.btn_backup = ((System.Windows.Controls.Button)(target));
+            
+            #line 19 "..\..\MainWindow.xaml"
+            this.btn_backup.Click += new System.Windows.RoutedEventHandler(this.btn_backup_Click);
+            
+            #line default
+            #line hidden
             return;
             case 9:
+            this.btn_preview = ((System.Windows.Controls.Button)(target));
             
-            #line 21 "..\..\MainWindow.xaml"
-            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click);
+            #line 20 "..\..\MainWindow.xaml"
+            this.btn_preview.Click += new System.Windows.RoutedEventHandler(this.btn_preview_Click);
             
             #line default
             #line hidden
             return;
             case 10:
+            this.txt_console = ((System.Windows.Controls.RichTextBox)(target));
+            return;
+            case 11:
+            this.btn_options = ((System.Windows.Controls.Button)(target));
             
-            #line 22 "..\..\MainWindow.xaml"
-            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click_1);
+            #line 28 "..\..\MainWindow.xaml"
+            this.btn_options.Click += new System.Windows.RoutedEventHandler(this.btn_options_Click);
             
             #line default
             #line hidden

+ 42 - 7
barry/obj/Debug/MainWindow.g.i.cs

@@ -1,4 +1,4 @@
-#pragma checksum "..\..\MainWindow.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "222A5900330F06B0A8E471C77677A68F"
+#pragma checksum "..\..\MainWindow.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "87D2242A2B7D219F9A34FC07C6B49244"
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     Ce code a été généré par un outil.
@@ -89,9 +89,33 @@ namespace barry {
         #line hidden
         
         
+        #line 19 "..\..\MainWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button btn_backup;
+        
+        #line default
+        #line hidden
+        
+        
         #line 20 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.TextBox txt_console;
+        internal System.Windows.Controls.Button btn_preview;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 21 "..\..\MainWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.RichTextBox txt_console;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 28 "..\..\MainWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button btn_options;
         
         #line default
         #line hidden
@@ -153,20 +177,31 @@ namespace barry {
             this.lbl_driveletter = ((System.Windows.Controls.Label)(target));
             return;
             case 8:
-            this.txt_console = ((System.Windows.Controls.TextBox)(target));
+            this.btn_backup = ((System.Windows.Controls.Button)(target));
+            
+            #line 19 "..\..\MainWindow.xaml"
+            this.btn_backup.Click += new System.Windows.RoutedEventHandler(this.btn_backup_Click);
+            
+            #line default
+            #line hidden
             return;
             case 9:
+            this.btn_preview = ((System.Windows.Controls.Button)(target));
             
-            #line 21 "..\..\MainWindow.xaml"
-            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click);
+            #line 20 "..\..\MainWindow.xaml"
+            this.btn_preview.Click += new System.Windows.RoutedEventHandler(this.btn_preview_Click);
             
             #line default
             #line hidden
             return;
             case 10:
+            this.txt_console = ((System.Windows.Controls.RichTextBox)(target));
+            return;
+            case 11:
+            this.btn_options = ((System.Windows.Controls.Button)(target));
             
-            #line 22 "..\..\MainWindow.xaml"
-            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click_1);
+            #line 28 "..\..\MainWindow.xaml"
+            this.btn_options.Click += new System.Windows.RoutedEventHandler(this.btn_options_Click);
             
             #line default
             #line hidden

BIN=BIN
barry/obj/Debug/OptionsWindow.baml


+ 173 - 0
barry/obj/Debug/OptionsWindow.g.cs

@@ -0,0 +1,173 @@
+#pragma checksum "..\..\OptionsWindow.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "FBB84F9DDF6F2AF19D5888246AC437FB"
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Ce code a été généré par un outil.
+//     Version du runtime :4.0.30319.42000
+//
+//     Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si
+//     le code est régénéré.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Diagnostics;
+using System.Windows;
+using System.Windows.Automation;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Markup;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Media.Effects;
+using System.Windows.Media.Imaging;
+using System.Windows.Media.Media3D;
+using System.Windows.Media.TextFormatting;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using System.Windows.Shell;
+
+
+namespace barry {
+    
+    
+    /// <summary>
+    /// OptionsWindow
+    /// </summary>
+    public partial class OptionsWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
+        
+        
+        #line 12 "..\..\OptionsWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox txt_path;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 15 "..\..\OptionsWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox txt_subdir;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 19 "..\..\OptionsWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.ComboBox cb_bkptype;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 25 "..\..\OptionsWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Label lbl_decription;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 27 "..\..\OptionsWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button btn_save;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 28 "..\..\OptionsWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button btn_cancel;
+        
+        #line default
+        #line hidden
+        
+        private bool _contentLoaded;
+        
+        /// <summary>
+        /// InitializeComponent
+        /// </summary>
+        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
+        public void InitializeComponent() {
+            if (_contentLoaded) {
+                return;
+            }
+            _contentLoaded = true;
+            System.Uri resourceLocater = new System.Uri("/barry;component/optionswindow.xaml", System.UriKind.Relative);
+            
+            #line 1 "..\..\OptionsWindow.xaml"
+            System.Windows.Application.LoadComponent(this, resourceLocater);
+            
+            #line default
+            #line hidden
+        }
+        
+        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
+        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
+        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
+            switch (connectionId)
+            {
+            case 1:
+            this.txt_path = ((System.Windows.Controls.TextBox)(target));
+            
+            #line 12 "..\..\OptionsWindow.xaml"
+            this.txt_path.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txt_path_TextChanged);
+            
+            #line default
+            #line hidden
+            return;
+            case 2:
+            this.txt_subdir = ((System.Windows.Controls.TextBox)(target));
+            
+            #line 15 "..\..\OptionsWindow.xaml"
+            this.txt_subdir.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txt_subdir_TextChanged);
+            
+            #line default
+            #line hidden
+            return;
+            case 3:
+            this.cb_bkptype = ((System.Windows.Controls.ComboBox)(target));
+            
+            #line 19 "..\..\OptionsWindow.xaml"
+            this.cb_bkptype.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cb_bkptype_SelectionChanged);
+            
+            #line default
+            #line hidden
+            return;
+            case 4:
+            this.lbl_decription = ((System.Windows.Controls.Label)(target));
+            return;
+            case 5:
+            this.btn_save = ((System.Windows.Controls.Button)(target));
+            
+            #line 27 "..\..\OptionsWindow.xaml"
+            this.btn_save.Click += new System.Windows.RoutedEventHandler(this.btn_save_Click);
+            
+            #line default
+            #line hidden
+            return;
+            case 6:
+            this.btn_cancel = ((System.Windows.Controls.Button)(target));
+            
+            #line 28 "..\..\OptionsWindow.xaml"
+            this.btn_cancel.Click += new System.Windows.RoutedEventHandler(this.btn_cancel_Click);
+            
+            #line default
+            #line hidden
+            return;
+            }
+            this._contentLoaded = true;
+        }
+    }
+}
+

+ 173 - 0
barry/obj/Debug/OptionsWindow.g.i.cs

@@ -0,0 +1,173 @@
+#pragma checksum "..\..\OptionsWindow.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "FBB84F9DDF6F2AF19D5888246AC437FB"
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Ce code a été généré par un outil.
+//     Version du runtime :4.0.30319.42000
+//
+//     Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si
+//     le code est régénéré.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Diagnostics;
+using System.Windows;
+using System.Windows.Automation;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Markup;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Media.Effects;
+using System.Windows.Media.Imaging;
+using System.Windows.Media.Media3D;
+using System.Windows.Media.TextFormatting;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using System.Windows.Shell;
+
+
+namespace barry {
+    
+    
+    /// <summary>
+    /// OptionsWindow
+    /// </summary>
+    public partial class OptionsWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
+        
+        
+        #line 12 "..\..\OptionsWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox txt_path;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 15 "..\..\OptionsWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox txt_subdir;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 19 "..\..\OptionsWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.ComboBox cb_bkptype;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 25 "..\..\OptionsWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Label lbl_decription;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 27 "..\..\OptionsWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button btn_save;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 28 "..\..\OptionsWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button btn_cancel;
+        
+        #line default
+        #line hidden
+        
+        private bool _contentLoaded;
+        
+        /// <summary>
+        /// InitializeComponent
+        /// </summary>
+        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
+        public void InitializeComponent() {
+            if (_contentLoaded) {
+                return;
+            }
+            _contentLoaded = true;
+            System.Uri resourceLocater = new System.Uri("/barry;component/optionswindow.xaml", System.UriKind.Relative);
+            
+            #line 1 "..\..\OptionsWindow.xaml"
+            System.Windows.Application.LoadComponent(this, resourceLocater);
+            
+            #line default
+            #line hidden
+        }
+        
+        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
+        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
+        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
+            switch (connectionId)
+            {
+            case 1:
+            this.txt_path = ((System.Windows.Controls.TextBox)(target));
+            
+            #line 12 "..\..\OptionsWindow.xaml"
+            this.txt_path.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txt_path_TextChanged);
+            
+            #line default
+            #line hidden
+            return;
+            case 2:
+            this.txt_subdir = ((System.Windows.Controls.TextBox)(target));
+            
+            #line 15 "..\..\OptionsWindow.xaml"
+            this.txt_subdir.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txt_subdir_TextChanged);
+            
+            #line default
+            #line hidden
+            return;
+            case 3:
+            this.cb_bkptype = ((System.Windows.Controls.ComboBox)(target));
+            
+            #line 19 "..\..\OptionsWindow.xaml"
+            this.cb_bkptype.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cb_bkptype_SelectionChanged);
+            
+            #line default
+            #line hidden
+            return;
+            case 4:
+            this.lbl_decription = ((System.Windows.Controls.Label)(target));
+            return;
+            case 5:
+            this.btn_save = ((System.Windows.Controls.Button)(target));
+            
+            #line 27 "..\..\OptionsWindow.xaml"
+            this.btn_save.Click += new System.Windows.RoutedEventHandler(this.btn_save_Click);
+            
+            #line default
+            #line hidden
+            return;
+            case 6:
+            this.btn_cancel = ((System.Windows.Controls.Button)(target));
+            
+            #line 28 "..\..\OptionsWindow.xaml"
+            this.btn_cancel.Click += new System.Windows.RoutedEventHandler(this.btn_cancel_Click);
+            
+            #line default
+            #line hidden
+            return;
+            }
+            this._contentLoaded = true;
+        }
+    }
+}
+

+ 74 - 0
barry/obj/Debug/Window1.g.i.cs

@@ -0,0 +1,74 @@
+#pragma checksum "..\..\Window1.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "26298F39F687440EE953EB07DB23DDCD"
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Ce code a été généré par un outil.
+//     Version du runtime :4.0.30319.42000
+//
+//     Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si
+//     le code est régénéré.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Diagnostics;
+using System.Windows;
+using System.Windows.Automation;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Markup;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Media.Effects;
+using System.Windows.Media.Imaging;
+using System.Windows.Media.Media3D;
+using System.Windows.Media.TextFormatting;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using System.Windows.Shell;
+
+
+namespace barry {
+    
+    
+    /// <summary>
+    /// Window1
+    /// </summary>
+    public partial class Window1 : System.Windows.Window, System.Windows.Markup.IComponentConnector {
+        
+        private bool _contentLoaded;
+        
+        /// <summary>
+        /// InitializeComponent
+        /// </summary>
+        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
+        public void InitializeComponent() {
+            if (_contentLoaded) {
+                return;
+            }
+            _contentLoaded = true;
+            System.Uri resourceLocater = new System.Uri("/barry;component/window1.xaml", System.UriKind.Relative);
+            
+            #line 1 "..\..\Window1.xaml"
+            System.Windows.Application.LoadComponent(this, resourceLocater);
+            
+            #line default
+            #line hidden
+        }
+        
+        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
+        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
+        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
+            this._contentLoaded = true;
+        }
+    }
+}
+

+ 4 - 2
barry/obj/Debug/barry.csproj.FileListAbsolute.txt

@@ -1,6 +1,8 @@
 O:\dev\barry\barry\bin\Debug\barry.exe.config
 O:\dev\barry\barry\bin\Debug\barry.exe
 O:\dev\barry\barry\bin\Debug\barry.pdb
+O:\dev\barry\barry\bin\Debug\Newtonsoft.Json.dll
+O:\dev\barry\barry\bin\Debug\Newtonsoft.Json.xml
 O:\dev\barry\barry\obj\Debug\MainWindow.g.cs
 O:\dev\barry\barry\obj\Debug\App.g.cs
 O:\dev\barry\barry\obj\Debug\barry_MarkupCompile.cache
@@ -12,5 +14,5 @@ O:\dev\barry\barry\obj\Debug\barry.csproj.GenerateResource.Cache
 O:\dev\barry\barry\obj\Debug\barry.exe
 O:\dev\barry\barry\obj\Debug\barry.pdb
 O:\dev\barry\barry\obj\Debug\barry.csprojResolveAssemblyReference.cache
-O:\dev\barry\barry\bin\Debug\Newtonsoft.Json.dll
-O:\dev\barry\barry\bin\Debug\Newtonsoft.Json.xml
+O:\dev\barry\barry\obj\Debug\OptionsWindow.baml
+O:\dev\barry\barry\obj\Debug\OptionsWindow.g.cs

BIN=BIN
barry/obj/Debug/barry.exe


BIN=BIN
barry/obj/Debug/barry.g.resources


BIN=BIN
barry/obj/Debug/barry.pdb


+ 3 - 3
barry/obj/Debug/barry_MarkupCompile.cache

@@ -10,11 +10,11 @@ none
 false
 DEBUG;TRACE
 O:\dev\barry\barry\App.xaml
-11151548125
+21361147038
 
-9923451085
+10-1034403408
 15-1754248334
-MainWindow.xaml;
+MainWindow.xaml;OptionsWindow.xaml;
 
 False
 

+ 4 - 4
barry/obj/Debug/barry_MarkupCompile.i.cache

@@ -10,11 +10,11 @@ none
 false
 DEBUG;TRACE
 O:\dev\barry\barry\App.xaml
-11151548125
+21361147038
 
-132006942199
+1449087706
 15-1754248334
-MainWindow.xaml;
+MainWindow.xaml;OptionsWindow.xaml;
 
-True
+False
 

+ 0 - 4
barry/obj/Debug/barry_MarkupCompile.i.lref

@@ -1,4 +0,0 @@
-
-
-FO:\dev\barry\barry\MainWindow.xaml;;
-