浏览代码

Made DFLayoutEmbeddedMediaValues INotifyCollectionChanged

Kenric Nugteren 1 周之前
父节点
当前提交
753ad234d7

+ 72 - 3
InABox.Core/DigitalForms/Layouts/Values/DFLayoutEmbeddedMediaValues.cs

@@ -1,6 +1,8 @@
 using System;
 using System.Collections;
 using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Collections.Specialized;
 using System.ComponentModel;
 using System.Linq;
 using System.Runtime.CompilerServices;
@@ -8,9 +10,9 @@ using InABox.Core;
 
 namespace InABox.Core
 {
-    public class DFLayoutEmbeddedMediaValues : IEnumerable<DFLayoutEmbeddedMediaValue>, INotifyPropertyChanged, IDFLayoutValue<List<DFLayoutEmbeddedMediaValue>>
+    public class DFLayoutEmbeddedMediaValues : IEnumerable<DFLayoutEmbeddedMediaValue>, INotifyPropertyChanged, IDFLayoutValue<List<DFLayoutEmbeddedMediaValue>>, INotifyCollectionChanged, IList
     {
-        private readonly List<DFLayoutEmbeddedMediaValue> _values = new List<DFLayoutEmbeddedMediaValue>();
+        private readonly ObservableCollection<DFLayoutEmbeddedMediaValue> _values = new ObservableCollection<DFLayoutEmbeddedMediaValue>();
         public DFLayoutEmbeddedMediaValue[] Values => _values.ToArray();
 
         public bool Present { get; set; } = false;
@@ -21,12 +23,27 @@ namespace InABox.Core
             set
             {
                 _values.Clear();
+                CollectionChanged?.Invoke(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));
                 foreach (var bytes in value)
-                    _values.Add(new DFLayoutEmbeddedMediaValue() { ID = Guid.Empty, Data = bytes});
+                {
+                    var v = new DFLayoutEmbeddedMediaValue() { ID = Guid.Empty, Data = bytes };
+                    _values.Add(v);
+                    CollectionChanged?.Invoke(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, v));
+                }
                 OnPropertyChanged(nameof(Values));
             }
         }
 
+        public DFLayoutEmbeddedMediaValues()
+        {
+            _values.CollectionChanged += _values_CollectionChanged;
+        }
+
+        private void _values_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
+        {
+            CollectionChanged?.Invoke(this, e);
+        }
+
         public void Serialize(DFSaveStorageEntry storage)
         {
             var results = new List<string>();
@@ -87,6 +104,7 @@ namespace InABox.Core
         }
 
         public event PropertyChangedEventHandler? PropertyChanged;
+        public event NotifyCollectionChangedEventHandler? CollectionChanged;
 
         protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = "")
         {
@@ -100,5 +118,56 @@ namespace InABox.Core
             OnPropertyChanged(propertyName);
             return true;
         }
+
+        #region IList
+
+        public int Count => ((ICollection<DFLayoutEmbeddedMediaValue>)_values).Count;
+
+        public bool IsReadOnly => ((ICollection<DFLayoutEmbeddedMediaValue>)_values).IsReadOnly;
+
+        public bool IsFixedSize => ((IList)_values).IsFixedSize;
+
+        public bool IsSynchronized => ((ICollection)_values).IsSynchronized;
+
+        public object SyncRoot => ((ICollection)_values).SyncRoot;
+
+        object IList.this[int index] { get => ((IList)_values)[index]; set => ((IList)_values)[index] = value; }
+
+        public int Add(object value)
+        {
+            return ((IList)_values).Add(value);
+        }
+
+        public bool Contains(object value)
+        {
+            return ((IList)_values).Contains(value);
+        }
+
+        public int IndexOf(object value)
+        {
+            return ((IList)_values).IndexOf(value);
+        }
+
+        public void Insert(int index, object value)
+        {
+            ((IList)_values).Insert(index, value);
+        }
+
+        public void Remove(object value)
+        {
+            ((IList)_values).Remove(value);
+        }
+
+        public void RemoveAt(int index)
+        {
+            ((IList)_values).RemoveAt(index);
+        }
+
+        public void CopyTo(Array array, int index)
+        {
+            ((ICollection)_values).CopyTo(array, index);
+        }
+
+        #endregion
     }
 }

+ 180 - 181
inabox.wpf/DigitalForms/Designer/Controls/Fields/DFMultiImageControl.cs

@@ -14,230 +14,229 @@ using System.Windows.Media;
 using System.Windows.Media.Effects;
 using System.Windows.Media.Imaging;
 
-namespace InABox.DynamicGrid
+namespace InABox.DynamicGrid;
+
+public class DFMultiImageControl : DynamicFormFieldControl<DFLayoutMultiImage, DFLayoutMultiImageProperties, List<Guid>?, DFLayoutEmbeddedMediaValues>
 {
-    public class DFMultiImageControl : DynamicFormFieldControl<DFLayoutMultiImage, DFLayoutMultiImageProperties, List<Guid>, DFLayoutEmbeddedMediaValues>
-    {
-        private DFLayoutEmbeddedMediaValues _value = null!;
-        
-        private Grid Grid = null!; // Late-initialised
-        private StackPanel Images = null!; // Late-initialised
-        private bool Enabled = true;
+    private DFLayoutEmbeddedMediaValues _value = null!;
+    
+    private Grid Grid = null!; // Late-initialised
+    private StackPanel Images = null!; // Late-initialised
+    private bool Enabled = true;
 
-        static DFMultiImageControl()
-        {
-            IsEnabledProperty.OverrideMetadata(
-                typeof(DFMultiImageControl),
-                new UIPropertyMetadata(
-                    true,
-                    ControlIsEnabledChanged));
-        }
+    static DFMultiImageControl()
+    {
+        IsEnabledProperty.OverrideMetadata(
+            typeof(DFMultiImageControl),
+            new UIPropertyMetadata(
+                true,
+                ControlIsEnabledChanged));
+    }
 
-        private static void ControlIsEnabledChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
-        {
-            var control = (DFMultiImageControl)obj;
-            control.IsEnabled = true;
-            control.Enabled = (bool)e.NewValue;
-        }
+    private static void ControlIsEnabledChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
+    {
+        var control = (DFMultiImageControl)obj;
+        control.IsEnabled = true;
+        control.Enabled = (bool)e.NewValue;
+    }
 
-        protected override FrameworkElement Create()
-        {
-            _value = new DFLayoutEmbeddedMediaValues();
-            
-            Grid = new Grid();
-            Grid.ColumnDefinitions.Add(new ColumnDefinition { Width = GridLength.Auto });
-            Grid.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) });
-            Grid.ColumnDefinitions.Add(new ColumnDefinition { Width = GridLength.Auto });
+    protected override FrameworkElement Create()
+    {
+        _value = new DFLayoutEmbeddedMediaValues();
+        
+        Grid = new Grid();
+        Grid.ColumnDefinitions.Add(new ColumnDefinition { Width = GridLength.Auto });
+        Grid.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) });
+        Grid.ColumnDefinitions.Add(new ColumnDefinition { Width = GridLength.Auto });
 
-            Grid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star) });
-            Grid.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto });
+        Grid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star) });
+        Grid.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto });
 
-            var imagesScroll = new ScrollViewer
-            {
-                HorizontalScrollBarVisibility = ScrollBarVisibility.Auto,
-                VerticalScrollBarVisibility = ScrollBarVisibility.Disabled,
-                Background = new SolidColorBrush(Colors.Gray)
-            };
+        var imagesScroll = new ScrollViewer
+        {
+            HorizontalScrollBarVisibility = ScrollBarVisibility.Auto,
+            VerticalScrollBarVisibility = ScrollBarVisibility.Disabled,
+            Background = new SolidColorBrush(Colors.Gray)
+        };
 
-            Images = new StackPanel { Orientation = Orientation.Horizontal, Height = 200 };
+        Images = new StackPanel { Orientation = Orientation.Horizontal };
 
-            imagesScroll.Content = Images;
+        imagesScroll.Content = Images;
 
-            var clearButton = new Button
-            {
-                Content = "Clear",
-                Margin = new Thickness(0, 5, 0, 0),
-                Width = 60,
-                Height = 35
-            };
-            clearButton.Click += MultiImageClear_Click;
-
-            var addButton = new Button
-            {
-                Content = "Add",
-                Margin = new Thickness(0, 5, 0, 0),
-                Width = 60,
-                Height = 35
-            };
-            addButton.Click += MultiImageAdd_Click;
-
-            imagesScroll.SetGridPosition(0, 0, 1, 3);
-            clearButton.SetGridPosition(1, 0, 1, 1);
-            addButton.SetGridPosition(1, 2, 1, 1);
-            Grid.Children.Add(imagesScroll);
-            Grid.Children.Add(clearButton);
-            Grid.Children.Add(addButton);
-
-            return Grid;
-        }
-        
-        private void AddMultiImage(DFLayoutEmbeddedMediaValue value)// byte[]? data)
+        var clearButton = new Button
         {
-            _value.Add(value);
-            value.Thumbnail ??= value.Data != null
-                ? ImageUtils.BitmapImageFromBytes(value.Data)?.Resize(200, 200).ToArray<BmpBitmapEncoder>()
-                : new System.Drawing.Bitmap(256, 256).WatermarkImage("No Image", System.Drawing.Color.Gray).AsBitmapImage().ToArray<BmpBitmapEncoder>();
-
-            var border = new Border
-            {
-                Effect = new DropShadowEffect
-                {
-                    ShadowDepth = 0,
-                    BlurRadius = 10
-                }
-            };
+            Content = "Clear",
+            Margin = new Thickness(0, 5, 0, 0),
+            Width = 60,
+            Height = 35
+        };
+        clearButton.Click += MultiImageClear_Click;
+
+        var addButton = new Button
+        {
+            Content = "Add",
+            Margin = new Thickness(0, 5, 0, 0),
+            Width = 60,
+            Height = 35
+        };
+        addButton.Click += MultiImageAdd_Click;
+
+        imagesScroll.SetGridPosition(0, 0, 1, 3);
+        clearButton.SetGridPosition(1, 0, 1, 1);
+        addButton.SetGridPosition(1, 2, 1, 1);
+        Grid.Children.Add(imagesScroll);
+        Grid.Children.Add(clearButton);
+        Grid.Children.Add(addButton);
+
+        return Grid;
+    }
+    
+    private void AddMultiImage(DFLayoutEmbeddedMediaValue value)// byte[]? data)
+    {
+        _value.Add(value);
+        value.Thumbnail ??= value.Data != null
+            ? ImageUtils.BitmapImageFromBytes(value.Data)?.Resize(200, 200).ToArray<BmpBitmapEncoder>()
+            : new System.Drawing.Bitmap(256, 256).WatermarkImage("No Image", System.Drawing.Color.Gray).AsBitmapImage().ToArray<BmpBitmapEncoder>();
 
-            var image = new Image
-            {
-                Margin = new Thickness(5)
-            };
-            var source = value.Data != null
-                ? ImageUtils.BitmapImageFromBytes(value.Data)
-                : value.Thumbnail != null
-                    ? ImageUtils.BitmapImageFromBytes(value.Thumbnail)
-                    : null;
-            if (source != null)
+        var border = new Border
+        {
+            Effect = new DropShadowEffect
             {
-                image.Source = source;
-
-                var menu = new ContextMenu();
-                menu.AddItem("View Image", null, value, MultiImageView_Click);
-                if (Enabled)
-                {
-                    menu.AddItem("Remove Image", null, ((FrameworkElement)border, value), MultiImageRemove_Click);
-                }
-                image.ContextMenu = menu;
-
-                border.Child = image;
-                Images.Children.Add(border);
+                ShadowDepth = 0,
+                BlurRadius = 10
             }
-        }
+        };
 
-        private void MultiImageClear_Click(object sender, RoutedEventArgs e)
+        var image = new Image
+        {
+            Margin = new Thickness(5)
+        };
+        var source = value.Data != null
+            ? ImageUtils.BitmapImageFromBytes(value.Data)
+            : value.Thumbnail != null
+                ? ImageUtils.BitmapImageFromBytes(value.Thumbnail)
+                : null;
+        if (source != null)
         {
-            _value.Clear();
-            if (Images.Children.Count > 0)
+            image.Source = source;
+
+            var menu = new ContextMenu();
+            menu.AddItem("View Image", null, value, MultiImageView_Click);
+            if (Enabled)
             {
-                Images.Children.Clear();
-                ChangeField();
+                menu.AddItem("Remove Image", null, ((FrameworkElement)border, value), MultiImageRemove_Click);
             }
-        }
+            image.ContextMenu = menu;
 
-        private void ShowImage(byte[] data)
-        {
-            var filename = Path.ChangeExtension(Path.GetTempFileName(), ".jpg");
-            File.WriteAllBytes(filename, data);
-
-            var gsProcessInfo = new ProcessStartInfo();
-            gsProcessInfo.Verb = "open";
-            gsProcessInfo.WindowStyle = ProcessWindowStyle.Normal;
-            gsProcessInfo.FileName = filename;
-            gsProcessInfo.UseShellExecute = true;
-            Process.Start(gsProcessInfo);
+            border.Child = image;
+            Images.Children.Add(border);
         }
+    }
 
-        private void MultiImageView_Click(DFLayoutEmbeddedMediaValue element)
+    private void MultiImageClear_Click(object sender, RoutedEventArgs e)
+    {
+        _value.Clear();
+        if (Images.Children.Count > 0)
         {
-            if (element.Data?.Any() == true)
-            {
-                ShowImage(element.Data);
-            }
-            else
-            {
-                DigitalFormDocumentFactory.LoadDocument(element.ID, (data) =>
-                {
-                    element.Data = data;
-                    Dispatcher.BeginInvoke(() => ShowImage(data));
-                });
-            }
+            Images.Children.Clear();
+            ChangeField();
         }
-        private void MultiImageRemove_Click((FrameworkElement, DFLayoutEmbeddedMediaValue) element)
+    }
+
+    private void ShowImage(byte[] data)
+    {
+        var filename = Path.ChangeExtension(Path.GetTempFileName(), ".jpg");
+        File.WriteAllBytes(filename, data);
+
+        var gsProcessInfo = new ProcessStartInfo();
+        gsProcessInfo.Verb = "open";
+        gsProcessInfo.WindowStyle = ProcessWindowStyle.Normal;
+        gsProcessInfo.FileName = filename;
+        gsProcessInfo.UseShellExecute = true;
+        Process.Start(gsProcessInfo);
+    }
+
+    private void MultiImageView_Click(DFLayoutEmbeddedMediaValue element)
+    {
+        if (element.Data?.Any() == true)
         {
-            _value.Remove(element.Item2);
-            Images.Children.Remove(element.Item1);
-            ChangeField();
+            ShowImage(element.Data);
         }
-        private void MultiImageAdd_Click(object sender, RoutedEventArgs e)
+        else
         {
-            if (EmbeddedImageUtilities.SelectImageFile(out var data))
+            DigitalFormDocumentFactory.LoadDocument(element.ID, (data) =>
             {
-                AddMultiImage(new DFLayoutEmbeddedMediaValue { Data = data });
-                ChangeField();
-            }
+                element.Data = data;
+                Dispatcher.BeginInvoke(() => ShowImage(data));
+            });
         }
-
-        public override DFLayoutEmbeddedMediaValues GetSerializedValue()
+    }
+    private void MultiImageRemove_Click((FrameworkElement, DFLayoutEmbeddedMediaValue) element)
+    {
+        _value.Remove(element.Item2);
+        Images.Children.Remove(element.Item1);
+        ChangeField();
+    }
+    private void MultiImageAdd_Click(object sender, RoutedEventArgs e)
+    {
+        if (EmbeddedImageUtilities.SelectImageFile(out var data))
         {
-            foreach (var val in _value)
-            {
-                if ((val.Data?.Any() == true) && (val.ID == Guid.Empty))
-                    val.ID = DigitalFormDocumentFactory.SaveDocument(val.Data);
-            }
-            return _value;
+            AddMultiImage(new DFLayoutEmbeddedMediaValue { Data = data });
+            ChangeField();
         }
+    }
 
-        public override void SetSerializedValue(DFLayoutEmbeddedMediaValues value)
+    public override DFLayoutEmbeddedMediaValues GetSerializedValue()
+    {
+        foreach (var val in _value)
         {
-            Images.Children.Clear();
-
-            _value = new DFLayoutEmbeddedMediaValues();
-            foreach (var val in value)
-            {
-                AddMultiImage(val);
-            }
+            if ((val.Data?.Any() == true) && (val.ID == Guid.Empty))
+                val.ID = DigitalFormDocumentFactory.SaveDocument(val.Data);
         }
+        return _value;
+    }
+
+    public override void SetSerializedValue(DFLayoutEmbeddedMediaValues value)
+    {
+        Images.Children.Clear();
 
-        public override List<Guid> GetValue()
+        _value = new DFLayoutEmbeddedMediaValues();
+        foreach (var val in value)
         {
-            return _value.Select(x => x.ID).ToList();
+            AddMultiImage(val);
         }
+    }
 
-        public override void SetValue(List<Guid>? value)
+    public override List<Guid> GetValue()
+    {
+        return _value.Select(x => x.ID).ToList();
+    }
+
+    public override void SetValue(List<Guid>? value)
+    {
+        var newValue = new DFLayoutEmbeddedMediaValues();
+        if(value is not null)
         {
-            var newValue = new DFLayoutEmbeddedMediaValues();
-            if(value is not null)
+            foreach (var id in value)
             {
-                foreach (var id in value)
+                newValue.Add(new DFLayoutEmbeddedMediaValue
                 {
-                    newValue.Add(new DFLayoutEmbeddedMediaValue
-                    {
-                        ID = id
-                    });
-                }
+                    ID = id
+                });
             }
-            SetSerializedValue(newValue);
         }
+        SetSerializedValue(newValue);
+    }
 
-        protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)
+    protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)
+    {
+        base.OnPropertyChanged(e);
+        if (e.Property == IsEnabledProperty)
         {
-            base.OnPropertyChanged(e);
-            if (e.Property == IsEnabledProperty)
-            {
-                Grid.RowDefinitions[1].Height = (bool)e.NewValue
-                    ? GridLength.Auto
-                    : new GridLength(0);
-            }
+            Grid.RowDefinitions[1].Height = (bool)e.NewValue
+                ? GridLength.Auto
+                : new GridLength(0);
         }
-        protected override bool IsEmpty() => _value.Values.Length == 0;
     }
+    protected override bool IsEmpty() => _value.Values.Length == 0;
 }

+ 2 - 2
inabox.wpf/DigitalForms/Designer/DynamicFormDesignGrid.cs

@@ -2172,7 +2172,7 @@ public class DynamicFormDesignGrid : Grid, IDFRenderer
     /// Renders the form; after this is called, any changes to properties triggers a refresh.
     /// </summary>
     /// <remarks>
-    /// This should be called before <see cref="LoadValues(Dictionary{string, object})"/> or <see cref="SaveValues"/>
+    /// This should be called before <see cref="LoadValues(DFLoadStorage)"/> or <see cref="SaveValues"/>
     /// </remarks>
     public void Initialize()
     {
@@ -2314,7 +2314,7 @@ public class DynamicFormDesignGrid : Grid, IDFRenderer
     {
         _changing = true;
         InitializeEntityValues();
-        foreach (var (key, value) in values.Items())
+        foreach (var (key, _) in values.Items())
         {
             if (!key.Contains('.'))
             {

+ 0 - 134
inabox.wpf/DynamicGrid/Editors/CheckBoxEditor/CheckBoxEditor2.resx

@@ -1,134 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-    <!-- 
-      Microsoft ResX Schema 
-      
-      Version 2.0
-      
-      The primary goals of this format is to allow a simple XML format 
-      that is mostly human readable. The generation and parsing of the 
-      various data types are done through the TypeConverter classes 
-      associated with the data types.
-      
-      Example:
-      
-      ... ado.net/XML headers & schema ...
-      <resheader name="resmimetype">text/microsoft-resx</resheader>
-      <resheader name="version">2.0</resheader>
-      <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-      <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-      <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
-      <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-      <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-          <value>[base64 mime encoded serialized .NET Framework object]</value>
-      </data>
-      <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-          <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
-          <comment>This is a comment</comment>
-      </data>
-                  
-      There are any number of "resheader" rows that contain simple 
-      name/value pairs.
-      
-      Each data row contains a name, and value. The row also contains a 
-      type or mimetype. Type corresponds to a .NET class that support 
-      text/value conversion through the TypeConverter architecture. 
-      Classes that don't support this are serialized and stored with the 
-      mimetype set.
-      
-      The mimetype is used for serialized objects, and tells the 
-      ResXResourceReader how to depersist the object. This is currently not 
-      extensible. For a given mimetype the value must be set accordingly:
-      
-      Note - application/x-microsoft.net.object.binary.base64 is the format 
-      that the ResXResourceWriter will generate, however the reader can 
-      read any of the formats listed below.
-      
-      mimetype: application/x-microsoft.net.object.binary.base64
-      value   : The object must be serialized with 
-              : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
-              : and then encoded with base64 encoding.
-      
-      mimetype: application/x-microsoft.net.object.soap.base64
-      value   : The object must be serialized with 
-              : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-              : and then encoded with base64 encoding.
-  
-      mimetype: application/x-microsoft.net.object.bytearray.base64
-      value   : The object must be serialized into a byte array 
-              : using a System.ComponentModel.TypeConverter
-              : and then encoded with base64 encoding.
-      -->
-    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
-                id="root"
-                xmlns="">
-        <xsd:import namespace="http://www.w3.org/XML/1998/namespace"/>
-        <xsd:element name="root" msdata:IsDataSet="true">
-            <xsd:complexType>
-                <xsd:choice maxOccurs="unbounded">
-                    <xsd:element name="metadata">
-                        <xsd:complexType>
-                            <xsd:sequence>
-                                <xsd:element name="value" type="xsd:string" minOccurs="0"/>
-                            </xsd:sequence>
-                            <xsd:attribute name="name" use="required" type="xsd:string"/>
-                            <xsd:attribute name="type" type="xsd:string"/>
-                            <xsd:attribute name="mimetype" type="xsd:string"/>
-                            <xsd:attribute ref="xml:space"/>
-                        </xsd:complexType>
-                    </xsd:element>
-                    <xsd:element name="assembly">
-                        <xsd:complexType>
-                            <xsd:attribute name="alias" type="xsd:string"/>
-                            <xsd:attribute name="name" type="xsd:string"/>
-                        </xsd:complexType>
-                    </xsd:element>
-                    <xsd:element name="data">
-                        <xsd:complexType>
-                            <xsd:sequence>
-                                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/>
-                                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2"/>
-                            </xsd:sequence>
-                            <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1"/>
-                            <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3"/>
-                            <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4"/>
-                            <xsd:attribute ref="xml:space"/>
-                        </xsd:complexType>
-                    </xsd:element>
-                    <xsd:element name="resheader">
-                        <xsd:complexType>
-                            <xsd:sequence>
-                                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/>
-                            </xsd:sequence>
-                            <xsd:attribute name="name" type="xsd:string" use="required"/>
-                        </xsd:complexType>
-                    </xsd:element>
-                </xsd:choice>
-            </xsd:complexType>
-        </xsd:element>
-    </xsd:schema>
-    <resheader name="resmimetype">
-        <value>text/microsoft-resx</value>
-    </resheader>
-    <resheader name="version">
-        <value>2.0</value>
-    </resheader>
-    <resheader name="reader">
-        <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral,
-            PublicKeyToken=b77a5c561934e089
-        </value>
-    </resheader>
-    <resheader name="writer">
-        <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral,
-            PublicKeyToken=b77a5c561934e089
-        </value>
-    </resheader>
-    <metadata name="checkBox1.TrayLocation"
-              type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-        <value>324, 942</value>
-    </metadata>
-    <metadata name="$this.TrayLargeIcon"
-              type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-        <value>False</value>
-    </metadata>
-</root>