]> O.S.I.I.S - jp/crow.git/commitdiff
remove docker, floating dockingwin should be added to iface
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Wed, 14 Mar 2018 23:25:23 +0000 (00:25 +0100)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Wed, 14 Mar 2018 23:25:23 +0000 (00:25 +0100)
16 files changed:
Crow.csproj
CrowIDE/src/CrowIDE.cs
CrowIDE/src/Editors/ImlVisualEditor.cs
CrowIDE/ui/CrowIDE.crow
CrowIDE/ui/DockWindows/winEditor.crow
CrowIDE/ui/DockWindows/winProperties.crow
CrowIDE/ui/DockWindows/winSolution.crow
CrowIDE/ui/editors/IMLEdit.itemp
Default.style
Templates/FileDialog.template
Tests/BasicTests.cs
Tests/Interfaces/Experimental/testDock.crow
src/GraphicObjects/DockStack.cs
src/GraphicObjects/DockWindow.cs
src/GraphicObjects/Docker.cs [deleted file]
src/GraphicObjects/Image.cs

index db3da7bb91261ee14fb32cb66872d90d43fa7d85..1b5b3406bf82884fd9a7d1531c6027a3043bc311 100644 (file)
     <Compile Include="src\ObservableList.cs" />
     <Compile Include="src\GraphicObjects\IMLContainer.cs" />
     <Compile Include="src\DragDropEventArgs.cs" />
-    <Compile Include="src\GraphicObjects\Docker.cs" />
     <Compile Include="src\GraphicObjects\DockWindow.cs" />
     <Compile Include="src\ParsingException.cs" />
     <Compile Include="src\IMLAttributes.cs" />
index 3850a865f8930fb87d7fa3d5245225e8f77148b7..46a926e348b73211cbc1a4344227831e321975c2 100644 (file)
@@ -62,24 +62,24 @@ namespace Crow.Coding
                        cmdCloseSolution = new Command(new Action(() => closeSolution()))
                        { Caption = "Close Solution", Icon = new SvgPicture("#Crow.Coding.ui.icons.paste-on-document.svg"), CanExecute = false};
 
-                       CMDViewErrors = new Command(new Action(() => loadDockWindow ("#Crow.Coding.ui.DockWindows.winErrors.crow")))
+                       CMDViewErrors = new Command(new Action(() => loadWindow ("#Crow.Coding.ui.DockWindows.winErrors.crow",this)))
                        { Caption = "Errors pane"};
-                       CMDViewSolution = new Command(new Action(() => loadDockWindow ("#Crow.Coding.ui.DockWindows.winSolution.crow")))
+                       CMDViewSolution = new Command(new Action(() => loadWindow ("#Crow.Coding.ui.DockWindows.winSolution.crow",this)))
                        { Caption = "Solution Tree", CanExecute = false};
-                       CMDViewEditor = new Command(new Action(() => loadDockWindow ("#Crow.Coding.ui.DockWindows.winEditor.crow")))
+                       CMDViewEditor = new Command(new Action(() => loadWindow ("#Crow.Coding.ui.DockWindows.winEditor.crow",this)))
                        { Caption = "Editor Pane"};
-                       CMDViewProperties = new Command(new Action(() => loadDockWindow ("#Crow.Coding.ui.DockWindows.winProperties.crow")))
+                       CMDViewProperties = new Command(new Action(() => loadWindow ("#Crow.Coding.ui.DockWindows.winProperties.crow",this)))
                        { Caption = "Properties"};
-                       CMDViewDesign = new Command(new Action(() => loadDockWindow ("#Crow.Coding.ui.DockWindows.winDesign.crow")))
+                       CMDViewDesign = new Command(new Action(() => loadWindow ("#Crow.Coding.ui.DockWindows.winDesign.crow",this)))
                        { Caption = "Quick Design", CanExecute = true};
-                       CMDViewToolbox = new Command(new Action(() => loadDockWindow ("#Crow.Coding.ui.DockWindows.winToolbox.crow")))
+                       CMDViewToolbox = new Command(new Action(() => loadWindow ("#Crow.Coding.ui.DockWindows.winToolbox.crow",this)))
                        { Caption = "Toolbox", CanExecute = false};
-                       CMDViewSchema = new Command(new Action(() => loadDockWindow ("#Crow.Coding.ui.DockWindows.winSchema.crow")))
+                       CMDViewSchema = new Command(new Action(() => loadWindow ("#Crow.Coding.ui.DockWindows.winSchema.crow",this)))
                        { Caption = "IML Shematic View", CanExecute = true};
-                       CMDViewStyling = new Command(new Action(() => loadDockWindow ("#Crow.Coding.ui.DockWindows.winStyleView.crow")))
+                       CMDViewStyling = new Command(new Action(() => loadWindow ("#Crow.Coding.ui.DockWindows.winStyleView.crow",this)))
                        { Caption = "Styling Explorer", CanExecute = true};
                                
-                       CMDViewGTExp = new Command(new Action(() => loadDockWindow ("#Crow.Coding.ui.DockWindows.winGTExplorer.crow")))
+                       CMDViewGTExp = new Command(new Action(() => loadWindow ("#Crow.Coding.ui.DockWindows.winGTExplorer.crow")))
                        { Caption = "Graphic Tree Explorer", CanExecute = false};
                        CMDCompile = new Command(new Action(() => compileSolution()))
                        { Caption = "Compile", CanExecute = false};
@@ -119,7 +119,7 @@ namespace Crow.Coding
                Instantiator instFileDlg;
                Solution currentSolution;
                Project currentProject;
-               Docker mainDock;
+               DockStack mainDock;
 
                public static Interface MainIFace;
                public static CrowIDE MainWin;
@@ -139,7 +139,7 @@ namespace Crow.Coding
 
                        MainIFace = ifaceControl[0].CrowInterface;
 
-                       mainDock = go.FindByName ("mainDock") as Docker;
+                       mainDock = go.FindByName ("mainDock") as DockStack;
 
                        if (ReopenLastSolution && !string.IsNullOrEmpty (LastOpenSolution)) {
                                CurrentSolution = Solution.LoadSolution (LastOpenSolution);
@@ -150,15 +150,15 @@ namespace Crow.Coding
                        instFileDlg = Instantiator.CreateFromImlFragment
                                (MainIFace, "<FileDialog Caption='Open File' CurrentDirectory='{²CurrentDirectory}' SearchPattern='*.sln' OkClicked='onFileOpen'/>");
 
-                       DockWindow dw = loadDockWindow ("#Crow.Coding.ui.DockWindows.winEditor.crow");
+                       DockWindow dw = loadWindow ("#Crow.Coding.ui.DockWindows.winEditor.crow", this) as DockWindow;
                        dw.DockingPosition = Alignment.Center;
-                       dw.Dock (mainDock.Children [0] as DockStack);
-                       dw = loadDockWindow ("#Crow.Coding.ui.DockWindows.winSolution.crow");
+                       dw.Dock (mainDock);
+                       dw = loadWindow ("#Crow.Coding.ui.DockWindows.winSolution.crow", this) as DockWindow;
                        dw.DockingPosition = Alignment.Right;
-                       dw.Dock (mainDock.Children [0] as DockStack);
-                       dw = loadDockWindow ("#Crow.Coding.ui.DockWindows.winToolbox.crow");
+                       dw.Dock (mainDock);
+                       dw = loadWindow ("#Crow.Coding.ui.DockWindows.winToolbox.crow", this) as DockWindow;
                        dw.DockingPosition = Alignment.Left;
-                       dw.Dock (mainDock.Children [0] as DockStack);
+                       dw.Dock (mainDock);
 
                }
 
@@ -267,33 +267,35 @@ namespace Crow.Coding
 //                             loadWindow ("#Crow.Coding.ui.CSProjExplorer.crow");
 //                     }
                }
-               DockWindow loadDockWindow(string path){
-                       lock (MainIFace.UpdateMutex) {
-                               GraphicObject g = MainIFace.FindByName (path);
-                               if (g == null){
-                                       try {                                   
-                                                       g = MainIFace.Load (path);
-                                                       mainDock.AddChild (g);
-                                                       g.Name = path;
-                                                       g.DataSource = CurrentSolution;
-                                       } catch (Exception ex) {
-                                               System.Diagnostics.Debug.WriteLine (ex.ToString ());
-                                       }
-                               }
-                               return g as DockWindow;
-                       }
-               }
-               void loadWindow(string path, object dataSource = null){
+//             DockWindow loadDockWindow(string path){
+//                     lock (MainIFace.UpdateMutex) {
+//                             GraphicObject g = MainIFace.FindByName (path);
+//                             if (g == null){
+//                                     try {                                   
+//                                                     g = MainIFace.Load (path);
+//                                                     mainDock.AddChild (g);
+//                                                     g.Name = path;
+//                                                     g.DataSource = CurrentSolution;
+//                                     } catch (Exception ex) {
+//                                             System.Diagnostics.Debug.WriteLine (ex.ToString ());
+//                                     }
+//                             }
+//                             return g as DockWindow;
+//                     }
+//             }
+               Window loadWindow(string path, object dataSource = null){
                        try {
                                GraphicObject g = MainIFace.FindByName (path);
                                if (g != null)
-                                       return;
+                                       return g as Window;
                                g = MainIFace.AddWidget (path);
                                g.Name = path;
                                g.DataSource = dataSource;
+                               return g as Window;
                        } catch (Exception ex) {
                                System.Diagnostics.Debug.WriteLine (ex.ToString ());
                        }
+                       return null;
                }
                void closeWindow (string path){
                        GraphicObject g = MainIFace.FindByName (path);
index 3ccf62783b95d819e3305a6c6aa645d29d7e9acd..66ee3431bbad1f2f5e5dde3c423696c3c89f0750 100644 (file)
@@ -60,7 +60,7 @@ namespace Crow.Coding
 
                Picture icoMove, icoStyle;
                Rectangle rIcons = default(Rectangle);
-               Size iconSize = new Size(10,10);
+               Size iconSize = new Size(11,11);
 
                public List<Crow.Command> Commands;
                Crow.Command cmdDelete;
@@ -375,10 +375,10 @@ namespace Crow.Coding
                        }
                        SelectedItem = HoverWidget;
 
-                       if (SelectedItem != null && projFile != null) {
-                               projFile.CurrentLine = SelectedItem.design_line;
-                               projFile.CurrentColumn = SelectedItem.design_column;
-                       }
+//                     if (SelectedItem != null && projFile != null) {
+//                             projFile.CurrentLine = SelectedItem.design_line;
+//                             projFile.CurrentColumn = SelectedItem.design_column;
+//                     }
 
                }
 
@@ -430,7 +430,14 @@ namespace Crow.Coding
                        } else {
                                gr.SetSourceColor (Color.LavenderBlush);
                                gr.Rectangle (cb, 2.0 / z);
-                               drawCenteredTextLine(gr, cb.Center, Error.InnerException?.Message);
+                               string[] lerrs = Error.ToString ().Split ('\n');
+                               Point p = cb.Center;
+                               p.Y -= lerrs.Length * 20;
+                               foreach (string le in lerrs) {
+                                       drawCenteredTextLine(gr, p, le);
+                                       p.Y += 20;
+
+                               }
                        }
                        gr.Stroke ();
 
@@ -558,6 +565,8 @@ namespace Crow.Coding
                        drawCenteredTextLine (gr, new PointD(center.X,center.Y), txt);
                }
                void drawCenteredTextLine (Context gr, PointD center, string txt){
+                       if (string.IsNullOrEmpty(txt))
+                               return;
                        FontExtents fe = gr.FontExtents;
                        TextExtents te = gr.TextExtents (txt);
 
index 7fe511f1936676e6864c59ddc561c188a5599849..d721ac361b1c98de27c052c3221aac1b62b815bc 100644 (file)
@@ -39,8 +39,8 @@
                        </MenuItem>
                </Menu>
 <!--           <Label DataSource="{CurrentSolution}" Text="{SelectedItemElement}" Width="Stretched"/>-->
-               <Docker Name="mainDock">
-                       <DockStack />
+<!--           <Docker >-->
+                       <DockStack Name="mainDock"/>
 <!--                   <DockWindow DataSource="{CurrentSolution}" Name="winEditor" Caption="Edit View" Width="70%" Height="80%">
                                <Template>
                                        <Border BorderWidth="1" Foreground="DimGray" CornerRadius="{./CornerRadius}"
@@ -53,6 +53,6 @@
                                <EditPane SelectedItem="{²SelectedItem}" SelectedItemElement="{²SelectedItemElement}" Data="{OpenedItems}" DataTest="Extension"
                                        ItemTemplate="#Crow.Coding.ui.EditPaneItems.template"/>
                        </DockWindow>-->
-               </Docker>
+<!--           </Docker>-->
        </VerticalStack>
 </Window>
index 8ba392d42e34d23164b68241edfd3f5d2aba62ca..eb757b612ad2c055a3b4e011d05820991b48f901 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<DockWindow DataSource="{CurrentSolution}" Name="winEditor" Caption="Edit View">
-       <EditPane SelectedItem="{²SelectedItem}" SelectedItemElement="{²SelectedItemElement}" Data="{OpenedItems}" DataTest="Extension"
+<DockWindow Name="winEditor" Caption="Edit View">
+       <EditPane DataSource="{CurrentSolution}" SelectedItem="{²SelectedItem}" SelectedItemElement="{²SelectedItemElement}" Data="{OpenedItems}" DataTest="Extension"
                ItemTemplate="#Crow.Coding.ui.EditPaneItems.template"/>
 </DockWindow>
index f4d7450e92109495ccef173126671915ef85a455..25d073b6d184e99c980f0b9faebed1fbb2439756 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
-<DockWindow DataSource="{CurrentSolution}" Name="winProperties" Caption="Properties"  Width="20%">
-       <MembersView ProjectNode="{SelectedItem}"
+<DockWindow Name="winProperties" Caption="Properties"  Width="20%">
+       <MembersView DataSource="{CurrentSolution}" ProjectNode="{SelectedItem}"
                Instance="{SelectedItemElement}" DataTest="Type"
                ItemTemplate="#Crow.Coding.ui.MembersItem.template"/>
 </DockWindow>
index af4f717b5a39af528147b015c742bf66f7ab4c88..06ca58bab04877701fc5f4eb6884373756d4c78f 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
-<DockWindow DataSource="{CurrentSolution}" Name="winSolution" Caption="Solution"  Width="20%">
-       <TreeView Name="treeview" IsRoot="true"
+<DockWindow Name="winSolution" Caption="Solution"  Width="20%">
+       <TreeView Name="treeview" IsRoot="true" DataSource="{CurrentSolution}"
                Data="{Projects}" SelectedItemChanged="onSelectedItemChanged"
                ItemTemplate="#Crow.Coding.ui.ProjectTree.template"/>
 </DockWindow>
index 85944b8e40d8f057fb554ed61725a14a4072fe27..84f391cfce1a1613c0cb87f5edfee314a6ac8f83 100644 (file)
@@ -22,8 +22,7 @@
                <Label DataSource="{../editor.HoverWidget}" Width="Stretched" Margin="1" Text="{Name}"/>
                <VerticalStack Height="60%" Width="Stretched" Margin="0" MinimumSize="10,10">
                        <HorizontalStack>
-                               <Scroller Name="scroller1" 
-                                               Margin="2" ScrollY="{../scrollbar1.Value}">
+                               <Scroller Name="scroller1" Margin="2" >
                                        <ImlVisualEditor  Foreground="SkyBlue" Name="editor" Background="Gray"                                          
                                                VerticalAlignment="Top" HorizontalAlignment="Left" Margin="10"
                                                Width="512" Height="512" ContextCommands="{/Commands}"
index f1445fe5c10a77240ba7ed0ca9ee0171424ab3f3..5b36bc2d9275d1d4629191d1052571d2f53a78c8 100644 (file)
@@ -131,6 +131,7 @@ DockWindow {
        Background = "Onyx";
        Focusable = "true";
        AllowDrag = "true";
+       AlwaysOnTop = "true";
        Margin="0";
        Width="200";
        Height="200";
index 6fae49c5992cf07cc0a24225910926172845a565..42b5ec0c52c6709319cc38fd707575ec1b1d0c66 100644 (file)
@@ -16,7 +16,7 @@
                        </Border>
                        <GraphicObject Width="5"/>
                </HorizontalStack>
-               <Container Name="Content" MinimumSize="50,50" Background="DimGray">
+               <Container Name="Content" MinimumSize="50,50" Background="Jet">
                        <VerticalStack Margin="1">
                                <HorizontalStack Height="Fit">
                                        <Button Fit="true" Caption="Up" MouseClick="./goUpDirClick">
                                                        SelectedItemChanged="./onSelectedItemChanged">
                                                        <Template>
                                                                <HorizontalStack>
-                                                                       <Scroller ScrollX="{../scrollbar1.Value}"  Name="scroller1">
+                                                                       <Scroller Name="scroller1">
                                                                                <VerticalStack Height="Fit" VerticalAlignment="Top"
                                                                                        Name="ItemsContainer" Margin="0" Spacing="1"/>
                                                                        </Scroller>
-                                                                       <ScrollBar Name="scrollbar1" Value="{²../scroller1.ScrollY}"
-                                                                               LargeIncrement="{../scroller1.PageHeight}" SmallIncrement="30"
+                                                                       <ScrollBar Name="scrollbar1" Orientation="Vertical"
+                                                                               Value="{²../scroller1.ScrollY}"        Maximum="{../scroller1.MaxScrollY}" 
                                                                                CursorSize="{../scroller1.ChildHeightRatio}"
-                                                                               Maximum="{../scroller1.MaximumScroll}" Orientation="Vertical"
+                                                                               LargeIncrement="{../scroller1.PageHeight}" SmallIncrement="30"
                                                                                Width="14" />
                                                                </HorizontalStack>
                                                        </Template>
index 09db62314f8015ebb17d84f51c07f5c1f532c590..149ff4a9ebc0c6f0a32b2e4707c76ffe5b591474 100644 (file)
@@ -177,7 +177,8 @@ namespace Tests
 
                        this.KeyDown += KeyboardKeyDown1;
 
-                       testFiles = new string [] { @"Interfaces/Divers/welcome.crow" };
+                       testFiles = new string [] { @"Interfaces/Experimental/testDock.crow" };
+                       //testFiles = new string [] { @"Interfaces/Divers/welcome.crow" };
                        //testFiles = new string [] { @"Interfaces/Divers/colorPicker.crow" };
                        testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/GraphicObject", "*.crow")).ToArray ();
                        testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Container", "*.crow")).ToArray ();
@@ -193,6 +194,13 @@ namespace Tests
                        //testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Experimental", "*.crow")).ToArray ();
 
                        Load(testFiles[idx]).DataSource = this;
+
+                       LoadIMLFragment (@"<DockWindow Width=""150"" Height=""150"" Background=""DarkRed"" />", 0);
+                       LoadIMLFragment (@"<DockWindow Width=""200"" Height=""150"" Background=""DarkGreen"" />", 0);
+                       LoadIMLFragment (@"<DockWindow Width=""250"" Height=""150"" Background=""Brown"" />", 0);
+                       LoadIMLFragment (@"<DockWindow Width=""300"" Height=""150"" Background=""DarkBlue"" />", 0);
+
+
                }
                void KeyboardKeyDown1 (object sender, OpenTK.Input.KeyboardKeyEventArgs e)
                {
index 22e2dc06474f8a2a8a12c0970931f6b4b4bc10f8..94a936a6fb8a83280e02f3684801ac3dca6484c5 100644 (file)
@@ -1,18 +1,11 @@
 <?xml version="1.0"?>
-<VerticalStack>
-       <Docker>
-               <DockStack Background="DimGray"/>
-               <DockWindow Width="150" Height="150" Background="DarkRed" />
-               <DockWindow Width="150" Height="150" Background="DarkGreen"/>
-               <DockWindow Width="150" Height="150" Background="Blue"/>
-               <DockWindow Width="150" Height="150" Background="DarkYellow"/>
-               <DockWindow Width="150" Height="150" Background="Yellow"/>
-               <DockWindow Width="150" Height="150" Background="BrownWeb"/>
-       </Docker>
+<Window Height="50%" Width="60%">
+       <DockStack Background="#60101050" Margin="10"/>
+</Window>
 <!---          <DockWindow Left="400" Top="400" Width="150" Height="150" Background="MediumSeaGreen"/>
                <DockWindow Left="450" Top="450" Width="150" Height="150" Background="Maize"/>-->
        
-</VerticalStack>
+
 <!--<Group Background="DimGray" Margin = "0" Focusable="true" >
        <Window Top="100" Left="100" Focusable="true" Caption="View 1" Width="300" Height="300"><GraphicObject Background="Green" Focusable="true" MouseEnter="{Background=Gray}" MouseLeave="{Background=Green}"/></Window>
        <Window Top="200" Left="200" Focusable="true" Caption="View 2" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Blue" MouseEnter="{Background=Gray}" MouseLeave="{Background=Blue}"/></Window>
index caefb2ec3b4588b465d1e60f5dcefe4b97e06c23..cdd43d80f609b33a7b5ea0d607180f38464a207b 100644 (file)
@@ -30,9 +30,7 @@ namespace Crow
 {
        [DesignIgnore]
        public class DockStack : GenericStack
-       {
-               Docker rootDock { get { return LogicalParent as Docker; }}
-
+       {               
                #region CTor
                public DockStack ()     {}
                public DockStack (Interface iface) : base (iface) {}
@@ -41,7 +39,10 @@ namespace Crow
                public override void AddChild (GraphicObject g)
                {
                        base.AddChild (g);
-                       g.LogicalParent = this.LogicalParent;
+                       if (localLogicalParentIsNull)
+                               g.LogicalParent = this;
+                       else
+                               g.LogicalParent = this.LogicalParent;
                }
                public override void InsertChild (int idx, GraphicObject g)
                {
index e3dc2b9fbe156f3a4c5027ab961d08575fb3d153..ca4b93f4bbc006946e2c7edf5f28fdf685184201 100644 (file)
@@ -44,8 +44,6 @@ namespace Crow
                Rectangle savedSlot;    //last undocked slot recalled when view is undocked
                bool wasResizable;
 
-               public Docker RootDock { get { return LogicalParent as Docker; }}
-
                public bool IsDocked {
                        get { return isDocked; }
                        set {
@@ -137,7 +135,7 @@ namespace Crow
                                DockStack ds = Parent as DockStack;
                                ds.Undock (this);
 
-                               RootDock.AddChild (this);
+                               IFace.AddWidget (this);
 
                                this.Left = savedSlot.Left;
                                this.Top = savedSlot.Top;
@@ -160,8 +158,7 @@ namespace Crow
                                LastSlots = LastPaintedSlot = Slot = default(Rectangle);
                                Left = Top = 0;
 
-                               Group g = Parent as Group;
-                               g.RemoveChild (this);
+                               IFace.RemoveWidget (this);
 
                                target.Dock (this);
                        }
diff --git a/src/GraphicObjects/Docker.cs b/src/GraphicObjects/Docker.cs
deleted file mode 100644 (file)
index 1aa4fa3..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-//
-// DocksView.cs
-//
-// Author:
-//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// Copyright (c) 2013-2017 Jean-Philippe Bruyère
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-using System;
-using System.Xml.Serialization;
-using System.ComponentModel;
-using Crow.IML;
-using System.Collections.Generic;
-using System.Diagnostics;
-
-namespace Crow
-{
-       public class Docker : Group
-       {               
-               #region CTOR
-               static Docker () {
-               }
-               public Docker () : base ()
-               {
-               }
-               #endregion
-
-               int dockingThreshold;
-
-
-               [XmlAttributeAttribute][DefaultValue(10)]
-               public virtual int DockingThreshold {
-                       get { return dockingThreshold; }
-                       set {
-                               if (dockingThreshold == value)
-                                       return;
-                               dockingThreshold = value; 
-                               NotifyValueChanged ("DockingThreshold", dockingThreshold);
-                       }
-               }
-
-               public override void AddChild (GraphicObject g)
-               {                               
-                       base.AddChild (g);
-                       g.LogicalParent = this;
-               }
-
-               public override void onMouseMove (object sender, MouseMoveEventArgs e)
-               {                       
-                       if (IFace.DragAndDropOperation?.DragSource as DockWindow != null) {
-                               DockWindow dw = IFace.DragAndDropOperation.DragSource as DockWindow;
-                               if (!dw.IsDocked) {
-                                       Rectangle r = dw.ScreenCoordinates (dw.Slot);
-                                       Point p = ScreenPointToLocal (e.Position);
-                                       dw.Left = p.X - r.Width / 2;
-                                       dw.Top = p.Y - r.Height / 2;
-                               }
-                       }
-                       base.onMouseMove (sender, e);
-               }
-
-               public string ExportWinConfigs () {
-                       return "";      
-               }
-       }
-}
-
index c59abca8417279b924b7475afc01c08f362a9a24..e83183c003c34ee423b6279791e052b3aa2896da 100644 (file)
@@ -93,9 +93,9 @@ namespace Crow
                                        if (string.IsNullOrEmpty(value))
                                                Picture = null;
                                        else {
-                                               lock(IFace.LayoutMutex){
+                                               //lock(IFace.LayoutMutex){
                                                        LoadImage (value);
-                                               }
+                                               //}
                                        }
                                } catch (Exception ex) {
                                        Debug.WriteLine (ex.Message);