Changeset 1584


Ignore:
Timestamp:
Jun 4, 2010, 9:20:17 AM (12 years ago)
Author:
kopal
Message:
  • added ColorHelper to Model (returns colors for given types)
  • ConnectorViews and CryptoLineViews now have colors depending on their data types
Location:
trunk/CrypPlugins/WorkspaceManager
Files:
5 edited

Legend:

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

    r1581 r1584  
    116116                    {
    117117                        ConnectorModel connectorModel = new ConnectorModel();
    118                         connectorModel.ConnectorType = propertyInfoAttribute.PropertyInfo.DeclaringType;
     118                        connectorModel.ConnectorType = propertyInfoAttribute.PropertyInfo.PropertyType;
    119119                        connectorModel.WorkspaceModel = WorkspaceModel;
    120120                        connectorModel.PluginModel = this;
     
    129129                    {
    130130                        ConnectorModel connectorModel = new ConnectorModel();
    131                         connectorModel.ConnectorType = propertyInfoAttribute.PropertyInfo.DeclaringType;
     131                        connectorModel.ConnectorType = propertyInfoAttribute.PropertyInfo.PropertyType;
    132132                        connectorModel.WorkspaceModel = WorkspaceModel;
    133133                        connectorModel.PluginModel = this;
  • trunk/CrypPlugins/WorkspaceManager/View/Container/ConnectorView.xaml

    r1570 r1584  
    66             mc:Ignorable="d">
    77    <Grid>
    8         <Ellipse Width="15" Height="15" Fill="Black"></Ellipse>
     8        <Ellipse Width="15" Height="15" Fill="Black" Name="Ellipse"></Ellipse>
    99           
    1010    </Grid>
  • trunk/CrypPlugins/WorkspaceManager/View/Container/ConnectorView.xaml.cs

    r1583 r1584  
    5656
    5757        public ConnectorView(Model.ConnectorModel cModel)
    58         {
     58        {                       
    5959            this.MouseLeftButtonDown += new MouseButtonEventHandler(ConnectorView_MouseLeftButtonDown);
    6060            this.cModel = cModel;
    6161            InitializeComponent();
     62            Color color = Model.ColorHelper.getColor(cModel.ConnectorType);
     63            this.Ellipse.Fill = new SolidColorBrush(Color.FromArgb(color.A, color.R, color.G, color.B));
     64            this.Ellipse.ToolTip = cModel.ToolTip;
    6265        }
    6366
  • trunk/CrypPlugins/WorkspaceManager/View/VisualComponents/CryptoLineView.cs

    r1570 r1584  
    5555        public CryptoLineView(ConnectionModel connectionModel) : this()
    5656        {
    57             this.connectionModel = connectionModel;           
     57            this.connectionModel = connectionModel;
     58            Color color = Model.ColorHelper.getColor(connectionModel.ConnectionType);
     59            Stroke = new SolidColorBrush(Color.FromArgb(color.A, color.R, color.G, color.B));
     60            StrokeThickness = 2;
    5861        }
    5962
  • trunk/CrypPlugins/WorkspaceManager/WorkspaceManager.csproj

    r1583 r1584  
    6363    <Reference Include="System.Core" />
    6464    <Reference Include="System.Drawing" />
     65    <Reference Include="System.Numerics" />
    6566    <Reference Include="System.Printing" />
    6667    <Reference Include="System.Runtime.Serialization.Formatters.Soap" />
     
    7778  <ItemGroup>
    7879    <Compile Include="Execution\ExecutionEngine.cs" />
     80    <Compile Include="Model\ColorHelper.cs" />
    7981    <Compile Include="Model\ConnectionModel.cs" />
    8082    <Compile Include="Model\ConnectorModel.cs" />
Note: See TracChangeset for help on using the changeset viewer.