Changeset 1600


Ignore:
Timestamp:
Jun 8, 2010, 6:02:50 AM (12 years ago)
Author:
matkovic
Message:

-added Animations
-added Arrow Image
-Some style changes

Location:
trunk/CrypPlugins/WorkspaceManager
Files:
1 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/WorkspaceManager/Model/WorkspaceModel.cs

    r1590 r1600  
    181181        /// <returns></returns>
    182182        public bool deleteConnectionModel(ConnectionModel connectionModel)
    183         {           
     183        {
     184            if (connectionModel == null)
     185                return false;
     186
    184187            connectionModel.From.OutputConnections.Remove(connectionModel);
    185188            connectionModel.To.InputConnection = null;
  • trunk/CrypPlugins/WorkspaceManager/View/Container/ConnectorView.xaml.cs

    r1584 r1600  
    2727
    2828        public event EventHandler<ConnectorViewEventArgs> OnConnectorMouseLeftButtonDown;
    29         public ConnectorModel cModel;
     29        public ConnectorModel model;
     30        public ConnectorModel Model
     31        {
     32            get { return model; }
     33            private set { model = value; }
     34        }
    3035
    3136        [TypeConverter(typeof(LengthConverter))]
     
    5863        {                       
    5964            this.MouseLeftButtonDown += new MouseButtonEventHandler(ConnectorView_MouseLeftButtonDown);
    60             this.cModel = cModel;
     65            this.Model = cModel;
    6166            InitializeComponent();
    62             Color color = Model.ColorHelper.getColor(cModel.ConnectorType);
     67            Color color = ColorHelper.getColor(cModel.ConnectorType);
    6368            this.Ellipse.Fill = new SolidColorBrush(Color.FromArgb(color.A, color.R, color.G, color.B));
    6469            this.Ellipse.ToolTip = cModel.ToolTip;
  • trunk/CrypPlugins/WorkspaceManager/View/Container/PluginContainerView.xaml

    r1595 r1600  
    2121        <StackPanel DockPanel.Dock="Left" Name="InputConnectorPanel" Width="20" Height="{Binding ElementName=Window, Path=ActualHeight}" VerticalAlignment="Bottom"/>
    2222        <StackPanel DockPanel.Dock="Top" Name="ControlPanel" Visibility="Hidden" Orientation="Horizontal" HorizontalAlignment="Right">
    23             <Button Height="20" Width="20" Style="{StaticResource ResourceKey=SettingsPluginContainerButtonStyle}" Margin="0,0,0,0">
     23            <Button Height="20" Width="20" Style="{StaticResource ResourceKey=SettingsPluginContainerButtonStyle}" Margin="0,0,0,0" Click="Button_Click_1">
    2424                <Button.RenderTransform>
    2525                    <ScaleTransform ScaleX="0.8" ScaleY="0.8"></ScaleTransform>
  • trunk/CrypPlugins/WorkspaceManager/View/Container/PluginContainerView.xaml.cs

    r1595 r1600  
    2323    {
    2424        public event EventHandler<ConnectorViewEventArgs> OnConnectorMouseLeftButtonDown;
    25 
    26         private List<ConnectorView> inputConnectorViewList = new List<ConnectorView>();
    27         private List<ConnectorView> outputConnectorViewList = new List<ConnectorView>();
     25        public event EventHandler<PluginContainerViewDeleteViewEventArgs> Delete;
     26        public event EventHandler<PluginContainerViewSettingsViewEventArgs> ShowSettings;
     27
     28        private List<ConnectorView> connectorViewList;
     29        public List<ConnectorView> ConnectorViewList
     30        {
     31            get { return connectorViewList; }
     32            private set { connectorViewList = value; }
     33        }
    2834        private PluginModel model;
     35        public PluginModel Model
     36        {
     37            get { return model; }
     38            private set { model = value; }
     39        }
    2940
    3041        public bool CanDrag { get; set; }
     
    3950        public PluginContainerView(PluginModel model)
    4051        {
    41             Loaded += new RoutedEventHandler(PluginContainerView_Loaded);
     52            this.ConnectorViewList = new List<ConnectorView>();
     53            this.Loaded += new RoutedEventHandler(PluginContainerView_Loaded);
    4254            this.MouseEnter += new MouseEventHandler(PluginContainerView_MouseEnter);
    4355            this.MouseLeave += new MouseEventHandler(PluginContainerView_MouseLeave);
     
    6779            PresentationPanel.Children.Add(img);
    6880            PluginName.Content = model.PluginType.Name.ToString();
    69             foreach (ConnectorModel cModel in model.InputConnectors)
    70             {
    71                 AddInputConnectorView(new ConnectorView(cModel));
    72             }
    73 
    74             foreach (ConnectorModel cModel in model.OutputConnectors)
    75             {
    76                 AddOutputConnectorView(new ConnectorView(cModel));
     81            foreach (ConnectorModel Model in model.InputConnectors)
     82            {
     83                AddInputConnectorView(new ConnectorView(Model));
     84            }
     85
     86            foreach (ConnectorModel Model in model.OutputConnectors)
     87            {
     88                AddOutputConnectorView(new ConnectorView(Model));
    7789            }
    7890        }
     
    8193        {
    8294            connector.OnConnectorMouseLeftButtonDown += new EventHandler<ConnectorViewEventArgs>(connector_OnConnectorMouseLeftButtonDown);
    83             this.inputConnectorViewList.Add(connector);
     95            this.ConnectorViewList.Add(connector);
    8496            this.InputConnectorPanel.Children.Add(connector);
    8597            this.SetAllConnectorPositionX();
     
    90102        {
    91103            connector.OnConnectorMouseLeftButtonDown += new EventHandler<ConnectorViewEventArgs>(connector_OnConnectorMouseLeftButtonDown);
    92             this.outputConnectorViewList.Add(connector);
     104            this.ConnectorViewList.Add(connector);
    93105            this.OutputConnectorPanel.Children.Add(connector);
    94106            this.SetAllConnectorPositionX();
     
    107119            Point point, relativePoint;
    108120            double x, y;
     121
    109122            foreach (ConnectorView conn in InputConnectorPanel.Children)
    110123            {
     
    156169        #endregion
    157170
     171        private void delete()
     172        {
     173            if (this.Delete != null)
     174            {
     175                this.Delete.Invoke(this, new PluginContainerViewDeleteViewEventArgs { container = this });
     176            }
     177        }
     178
     179        private void showSettings()
     180        {
     181            if (this.ShowSettings != null)
     182            {
     183                this.ShowSettings.Invoke(this, new PluginContainerViewSettingsViewEventArgs { container = this });
     184            }
     185        }
     186
     187        private void Button_Click_1(object sender, RoutedEventArgs e)
     188        {
     189            this.showSettings();
     190        }
     191
    158192        private void Button_Click(object sender, RoutedEventArgs e)
    159193        {
    160194            this.delete();
    161195        }
    162 
    163         private void delete()
    164         {
    165             if (Parent is Panel)
    166             {
    167                 (this.Parent as Panel).Children.Remove(this);
    168                 this.model.WorkspaceModel.deletePluginModel(this.model);
    169             }
    170         }
     196    }
     197
     198    public class PluginContainerViewDeleteViewEventArgs : EventArgs
     199    {
     200        public PluginContainerView container;
     201    }
     202
     203    public class PluginContainerViewSettingsViewEventArgs : EventArgs
     204    {
     205        public PluginContainerView container;
    171206    }
    172207}
  • trunk/CrypPlugins/WorkspaceManager/View/Container/WorkSpaceEditorView.xaml

    r1583 r1600  
    3030            </Border>
    3131            <DockPanel Height="auto" Width="auto">
    32                 <e:BottomBox DockPanel.Dock="Bottom" VerticalAlignment="Bottom">
    33                 </e:BottomBox>
     32                <e:BottomBox DockPanel.Dock="Bottom" VerticalAlignment="Bottom"></e:BottomBox>
    3433            </DockPanel>
    3534        </Grid>
    3635       
    37         <Grid Width="auto" Height="auto" Name="InformationPanel" Opacity="0" Visibility="Hidden">
     36        <Grid Width="auto" Height="auto" Name="InformationPanel" Visibility="Hidden">
    3837            <Grid.Background>
    39                 <SolidColorBrush Opacity="0.55" Color="Black"/>
     38                <SolidColorBrush Opacity="0.45" Color="Black"/>
    4039            </Grid.Background>
     40            <Grid MinWidth="200" MaxWidth="500" MinHeight="200" MaxHeight="500">
     41                <Grid.Background>
     42                    <SolidColorBrush Opacity="0.8" Color="WhiteSmoke"/>
     43                </Grid.Background>
     44                <Button Name="CloseSettingsButton" Height="20" Width="20" Click="CloseSettingsButton_Click"></Button>
     45            </Grid>
    4146
    4247        </Grid>
  • trunk/CrypPlugins/WorkspaceManager/View/Container/WorkSpaceEditorView.xaml.cs

    r1595 r1600  
    3232            BUSY
    3333        };
    34 
    3534        private Point previousDragPoint = new Point();
    3635        private ConnectorView selectedConnector;
     
    4140        public EditorState State;
    4241        public EditorState ConnectorState;
    43         public List<CryptoLineView> LineList = new List<CryptoLineView>();
     42        public List<CryptoLineView> ConnectionList = new List<CryptoLineView>();
    4443        public List<PluginContainerView> PluginContainerList = new List<PluginContainerView>();
    45         private WorkspaceModel WorkspaceModel;
     44        private WorkspaceModel model;
     45        public WorkspaceModel Model
     46        {
     47            get { return model; }
     48            private set { model = value; }
     49        }
    4650
    4751        public WorkSpaceEditorView()
     
    5256        public WorkSpaceEditorView(WorkspaceModel WorkspaceModel)
    5357        {
     58            this.MouseLeave += new MouseEventHandler(WorkSpaceEditorView_MouseLeave);
    5459            this.Loaded += new RoutedEventHandler(WorkSpaceEditorView_Loaded);
    5560            this.DragEnter += new DragEventHandler(WorkSpaceEditorView_DragEnter);
     
    5762            this.MouseMove += new MouseEventHandler(WorkSpaceEditorView_MouseMove);
    5863            this.PreviewMouseRightButtonDown += new MouseButtonEventHandler(WorkSpaceEditorView_PreviewMouseRightButtonDown);
    59             this.WorkspaceModel = WorkspaceModel;
     64            this.Model = WorkspaceModel;
    6065            this.State = EditorState.READY;
    6166            InitializeComponent();
    6267        }
    6368
     69        void PluginDelete(object sender, PluginContainerViewDeleteViewEventArgs e)
     70        {
     71            for(int i = 0; i< e.container.ConnectorViewList.Count; i++)
     72            {
     73                for(int j = 0; j< e.container.ConnectorViewList[i].Model.OutputConnections.Count; j++)
     74                {
     75                    Model.deleteConnectionModel(e.container.ConnectorViewList[i].Model.OutputConnections[j]);
     76                    for (int n = 0; n < ConnectionList.Count; n++)
     77                    {
     78                        if (ConnectionList[n].Model == e.container.ConnectorViewList[i].Model.OutputConnections[j] ||
     79                            ConnectionList[n].Model == e.container.ConnectorViewList[i].Model.InputConnection)
     80                            root.Children.Remove(ConnectionList[n]);
     81                    }
     82                }
     83                Model.deleteConnectionModel(e.container.ConnectorViewList[i].Model.InputConnection);
     84            }
     85            root.Children.Remove(e.container);
     86        }
     87
    6488        void WorkSpaceEditorView_Loaded(object sender, RoutedEventArgs e)
    6589        {
     
    7094        {
    7195            PluginContainerView shape = new PluginContainerView(model);
    72             shape.MouseLeave += new MouseEventHandler(shape_MouseLeave);
     96            shape.Delete += new EventHandler<PluginContainerViewDeleteViewEventArgs>(PluginDelete);
     97            shape.ShowSettings += new EventHandler<PluginContainerViewSettingsViewEventArgs>(shape_ShowSettings);
    7398            shape.OnConnectorMouseLeftButtonDown += new EventHandler<ConnectorViewEventArgs>(shape_OnConnectorMouseLeftButtonDown);
    7499            shape.MouseLeftButtonDown += new MouseButtonEventHandler(shape_MouseLeftButtonDown);
     
    79104        }
    80105
     106        void shape_ShowSettings(object sender, PluginContainerViewSettingsViewEventArgs e)
     107        {
     108            this.InformationPanel.Visibility = Visibility.Visible;
     109        }
     110
    81111        public void AddConnection(IConnectable source, IConnectable target)
    82112        {
    83             ConnectionModel connectionModel = this.WorkspaceModel.newConnectionModel(((ConnectorView)source).cModel, ((ConnectorView)target).cModel, ((ConnectorView)source).cModel.ConnectorType);
     113            ConnectionModel connectionModel = this.Model.newConnectionModel(((ConnectorView)source).Model, ((ConnectorView)target).Model, ((ConnectorView)source).Model.ConnectorType);
    84114            CryptoLineView conn = new CryptoLineView(connectionModel);
    85115            conn.SetBinding(CryptoLineView.StartPointProperty, CreateConnectorBinding(source));
    86116            conn.SetBinding(CryptoLineView.EndPointProperty, CreateConnectorBinding(target));
    87117            root.Children.Add(conn);
     118            ConnectionList.Add(conn);
    88119            Canvas.SetZIndex(conn, 0);           
    89120        }
     
    91122        private void AddConnectionSource(IConnectable source, CryptoLineView conn)
    92123        {
    93             Color color = ColorHelper.getColor((source as ConnectorView).cModel.ConnectorType);
     124            Color color = ColorHelper.getColor((source as ConnectorView).Model.ConnectorType);
    94125            conn.Stroke = new SolidColorBrush(color);
    95126            conn.SetBinding(CryptoLineView.StartPointProperty, CreateConnectorBinding(source));
     
    129160        void shape_OnConnectorMouseLeftButtonDown(object sender, ConnectorViewEventArgs e)
    130161        {
    131             if (selectedConnector != null && e.connector.cModel.ConnectorType.Name == selectedConnector.cModel.ConnectorType.Name)
     162            if (selectedConnector != null && e.connector.Model.ConnectorType.Name == selectedConnector.Model.ConnectorType.Name)
    132163            {
    133164                this.root.Children.Remove(dummyLine);
     
    155186        }
    156187
     188        void WorkSpaceEditorView_MouseLeave(object sender, MouseEventArgs e)
     189        {
     190            this.selectedPluginContainer = null;
     191            this.State = EditorState.READY;
     192        }
     193
    157194        void WorkSpaceEditorView_MouseMove(object sender, MouseEventArgs e)
    158195        {
     
    168205            }
    169206            this.previousDragPoint = Mouse.GetPosition(root);
    170         }
    171 
    172         void shape_MouseLeave(object sender, MouseEventArgs e)
    173         {
    174             this.selectedPluginContainer = null;
    175             this.State = EditorState.READY;
    176207        }
    177208
     
    194225            DragDropDataObject obj = e.Data.GetData("Cryptool.PluginBase.Editor.DragDropDataObject") as DragDropDataObject;
    195226            if(obj != null)
    196                 this.AddPluginContainerView(e.GetPosition(root), WorkspaceModel.newPluginModel(DragDropDataObjectToPluginConverter.CreatePluginInstance(obj.AssemblyFullName, obj.TypeFullName)));
     227                this.AddPluginContainerView(e.GetPosition(root), Model.newPluginModel(DragDropDataObjectToPluginConverter.CreatePluginInstance(obj.AssemblyFullName, obj.TypeFullName)));
    197228        }
    198229
     
    203234
    204235        #endregion
     236
     237        private void CloseSettingsButton_Click(object sender, RoutedEventArgs e)
     238        {
     239            this.InformationPanel.Visibility = Visibility.Hidden;
     240        }
    205241    }
    206242}
  • trunk/CrypPlugins/WorkspaceManager/View/VisualComponents/BottomBox.xaml

    r1583 r1600  
    55    xmlns:z="clr-namespace:WorkspaceManager.View.Converter"
    66    xmlns:p="clr-namespace:WorkspaceManager.Properties"
    7     Width="auto" MaxWidth="250" Height="30">
     7    Width="auto" MaxWidth="250">
    88    <UserControl.Resources>
    99        <ResourceDictionary>
    1010            <ResourceDictionary.MergedDictionaries>
    1111                <ResourceDictionary Source="../Resource/Styles.xaml"/>
     12                <ResourceDictionary Source="../Resource/Animations.xaml"/>
    1213            </ResourceDictionary.MergedDictionaries>
    1314            <z:ScaleToPercentageConverter x:Key="PercentageConverter"></z:ScaleToPercentageConverter>
    1415        </ResourceDictionary>
    1516    </UserControl.Resources>
     17   
     18    <UserControl.LayoutTransform>
     19        <ScaleTransform ScaleX="0.85" ScaleY="0.85"></ScaleTransform>
     20    </UserControl.LayoutTransform>
     21   
    1622    <UserControl.Effect>
    1723        <DropShadowEffect BlurRadius="10" Color="Black" ShadowDepth="0.5" Direction="90" Opacity="0.4"></DropShadowEffect>
    1824    </UserControl.Effect>
    1925
    20     <Border Background="{StaticResource ResourceKey=BottomBoxBrushLinearBrush}" BorderBrush="#bfd0f5" BorderThickness="0.5" CornerRadius="15,15,0,0">
    21         <StackPanel Height="35" Orientation="Horizontal" HorizontalAlignment="Center">
    22             <Border Margin="1,1,1,1" Opacity="0.85" CornerRadius="5,5,0,0" Background="{StaticResource ResourceKey=BottomBoxBackgroundBrush}" Height="25">
    23                 <Label Foreground="#444444" ContentStringFormat="{}{0:F0} %" Content="{Binding Source={x:Static p:Settings.Default}, Path=EditScale, Mode=OneWay, Converter={StaticResource ResourceKey=PercentageConverter}}" Width="45"></Label>
    24             </Border>
    25             <Border Margin="1,1,1,1" Opacity="0.85" CornerRadius="5,5,0,0" Background="{StaticResource ResourceKey=BottomBoxBackgroundBrush}" Height="25">
    26                 <Button Margin="5,2,5,0" Style="{StaticResource ResourceKey=ScalePluginContainerButtonStyle}" Click="Button_Click_1">
    27                     <Image Source="/WorkspaceManager;component/View/Image/reduce.png" Width="18" Height="18"></Image>
    28                 </Button>
    29             </Border>
    30             <Border Margin="1,1,1,1" Opacity="0.85" CornerRadius="5,5,0,0" Background="{StaticResource ResourceKey=BottomBoxBackgroundBrush}" Height="25">
    31                 <Slider Name="SliderEditorSize" Ticks="1,2" TickPlacement="BottomRight" Style="{StaticResource ResourceKey=SliderStyle}"
    32                                     Minimum="0.5" Maximum="2" Width="100" Height="26"
     26    <DockPanel Name="Root" MouseEnter="Main_MouseEnter" MouseLeave="Main_MouseLeave">
     27        <DockPanel.Background>
     28            <SolidColorBrush Opacity="0.01" Color="#444444"></SolidColorBrush>
     29        </DockPanel.Background>
     30        <Border Name="Main" Height="10" DockPanel.Dock="Bottom" VerticalAlignment="Bottom" ClipToBounds="True" Background="{StaticResource ResourceKey=BottomBoxBrushLinearBrush}" BorderBrush="#bfd0f5" BorderThickness="0.5" CornerRadius="15,15,0,0">
     31            <StackPanel Name="MainElementsBorder" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Top" Visibility="Collapsed">
     32                <Border Margin="1,1,1,1" Opacity="0.85" CornerRadius="5,5,0,0">
     33                    <Label Foreground="WhiteSmoke" VerticalAlignment="Top" ContentStringFormat="{}{0:F0} %" Content="{Binding Source={x:Static p:Settings.Default}, Path=EditScale, Mode=OneWay, Converter={StaticResource ResourceKey=PercentageConverter}}" Width="42"></Label>
     34                </Border>
     35                <Border Margin="1,1,1,1" Opacity="0.85" CornerRadius="5,5,0,0">
     36                    <Button Height="18" Margin="5,2,5,0" Style="{StaticResource ResourceKey=ScalePluginContainerButtonStyle}" Click="Button_Click_1">
     37                        <Image VerticalAlignment="Top" Source="/WorkspaceManager;component/View/Image/reduce.png" Width="18" Height="18"></Image>
     38                    </Button>
     39                </Border>
     40                <Border Margin="1,1,1,1" Opacity="0.85" CornerRadius="5,5,0,0">
     41                    <Slider Name="SliderEditorSize" Ticks="1,2" TickPlacement="BottomRight" Style="{StaticResource ResourceKey=SliderStyle}"
     42                                    Minimum="0.5" Maximum="2" Width="100" Height="22"
    3343                                    Value="{Binding Source={x:Static p:Settings.Default}, Path=EditScale, Mode=TwoWay}"/>
    34             </Border>
    35             <Border Margin="1,1,1,1" Opacity="0.85" CornerRadius="5,5,0,0" Background="{StaticResource ResourceKey=BottomBoxBackgroundBrush}" Height="25">
    36                 <Button Margin="5,2,5,0" Style="{StaticResource ResourceKey=ScalePluginContainerButtonStyle}" Click="Button_Click">
    37                     <Image Source="/WorkspaceManager;component/View/Image/increase.png" Width="18" Height="18"></Image>
    38                 </Button>
    39             </Border>
     44                </Border>
     45                <Border Margin="1,1,1,1" Opacity="0.85" CornerRadius="5,5,0,0">
     46                    <Button Height="18" Margin="5,2,5,0" Style="{StaticResource ResourceKey=ScalePluginContainerButtonStyle}" Click="Button_Click">
     47                        <Image VerticalAlignment="Top" Source="/WorkspaceManager;component/View/Image/increase.png" Width="18" Height="18"></Image>
     48                    </Button>
     49                </Border>
     50            </StackPanel>
     51        </Border>
     52
     53        <StackPanel Orientation="Horizontal" Name="Sub" HorizontalAlignment="Center" Opacity="0.6" DockPanel.Dock="Bottom" Height="23" VerticalAlignment="Bottom" Visibility="Visible">
     54            <StackPanel.RenderTransform>
     55                <TranslateTransform></TranslateTransform>
     56            </StackPanel.RenderTransform>
     57            <Image VerticalAlignment="Bottom" HorizontalAlignment="Left" Margin="10,0,5,0" Source="/WorkspaceManager;component/View/Image/arrow.png" Width="14"/>
     58            <Image VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0,0,0,2" Source="/WorkspaceManager;component/View/Image/arrow.png" Width="17"/>
     59            <Image VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="5,0,10,0" Source="/WorkspaceManager;component/View/Image/arrow.png" Width="14"/>
    4060        </StackPanel>
    41     </Border>
     61    </DockPanel>
    4262</UserControl>
  • trunk/CrypPlugins/WorkspaceManager/View/VisualComponents/BottomBox.xaml.cs

    r1583 r1600  
    1212using System.Windows.Navigation;
    1313using System.Windows.Shapes;
     14using System.Windows.Media.Animation;
    1415
    1516namespace WorkspaceManager.View.VisualComponents
     
    2223        public BottomBox()
    2324        {
     25            this.Loaded += new RoutedEventHandler(BottomBox_Loaded);
    2426            InitializeComponent();
     27        }
     28
     29        void BottomBox_Loaded(object sender, RoutedEventArgs e)
     30        {
     31            if (MainElementsBorder.Visibility == Visibility.Collapsed)
     32                Main_MouseLeave(null, null);
    2533        }
    2634
     
    3442            SliderEditorSize.Value -= 0.3;
    3543        }
     44
     45        private void Main_MouseEnter(object sender, MouseEventArgs e)
     46        {
     47            Sub.Visibility = Visibility.Collapsed;
     48            Main.BeginStoryboard((this.Resources["IncrementHeigth"] as Storyboard));
     49            (this.Resources["Up"] as Storyboard).Stop(Sub);
     50            MainElementsBorder.Visibility = Visibility.Visible;
     51        }
     52
     53        private void Main_MouseLeave(object sender, MouseEventArgs e)
     54        {
     55            Sub.Visibility = Visibility.Visible;
     56            Main.BeginStoryboard((this.Resources["DecrementHeigth"] as Storyboard));
     57            Sub.BeginStoryboard((this.Resources["Up"] as Storyboard));
     58            MainElementsBorder.Visibility = Visibility.Collapsed;
     59        }
    3660    }
    3761}
  • trunk/CrypPlugins/WorkspaceManager/View/VisualComponents/CryptoLineView.cs

    r1595 r1600  
    1919        private Point iPoint = new Point();
    2020
     21        private ConnectionModel model;
     22        public ConnectionModel Model
     23        {
     24            get { return model; }
     25            private set { model = value; }
     26        }
    2127        private static double offset = 10;
    2228
     
    2733        public static readonly DependencyProperty StartPointProperty = DependencyProperty.Register("StartPoint", typeof(Point), typeof(CryptoLineView), new FrameworkPropertyMetadata(new Point(0, 0), FrameworkPropertyMetadataOptions.AffectsRender | FrameworkPropertyMetadataOptions.AffectsMeasure));
    2834        public static readonly DependencyProperty EndPointProperty = DependencyProperty.Register("EndPoint", typeof(Point), typeof(CryptoLineView), new FrameworkPropertyMetadata(new Point(0, 0), FrameworkPropertyMetadataOptions.AffectsRender | FrameworkPropertyMetadataOptions.AffectsMeasure));
    29         public ConnectionModel connectionModel;
    3035
    3136                #endregion
     
    4752                #endregion
    4853
     54
     55
    4956        public CryptoLineView()
    5057        {
     
    5562        public CryptoLineView(ConnectionModel connectionModel) : this()
    5663        {
    57             this.connectionModel = connectionModel;
     64            this.Model = connectionModel;
    5865            Color color = ColorHelper.getColor(connectionModel.ConnectionType);
    5966            Stroke = new SolidColorBrush(color);
  • trunk/CrypPlugins/WorkspaceManager/WorkspaceManager.csproj

    r1590 r1600  
    182182    <Resource Include="View\Image\reduce.png" />
    183183  </ItemGroup>
     184  <ItemGroup>
     185    <Resource Include="View\Image\arrow.png" />
     186  </ItemGroup>
    184187  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    185188  <!--<PropertyGroup>
Note: See TracChangeset for help on using the changeset viewer.