source: trunk/CrypPlugins/WorkspaceManager/Model/VisualElementModel.cs @ 2280

Last change on this file since 2280 was 1991, checked in by matkovic, 11 years ago

-fixed pathfinding
-fixed line drawing
-added Colorpicker
-fixed lock/unlock at TextInputWrapper
-feature: Background and TextForeground in TextInputWrapper added
-fixed a issue With loading and such
-WorkspaceModel doesn't throw exception anymore (Samples functional again)
-fixed some Styles
-Startable implemented and loaded right
-Startable Logo moved

File size: 2.7 KB
Line 
1/*                             
2   Copyright 2010 Nils Kopal, Viktor M.
3
4   Licensed under the Apache License, Version 2.0 (the "License");
5   you may not use this file except in compliance with the License.
6   You may obtain a copy of the License at
7
8       http://www.apache.org/licenses/LICENSE-2.0
9
10   Unless required by applicable law or agreed to in writing, software
11   distributed under the License is distributed on an "AS IS" BASIS,
12   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   See the License for the specific language governing permissions and
14   limitations under the License.
15*/
16
17
18using System;
19using System.Collections.Generic;
20using System.Linq;
21using System.Text;
22using System.Windows;
23using WorkspaceManager.View.Interface;
24
25namespace WorkspaceManager.Model
26{
27    /// <summary>
28    /// Abstract super class for all Model Elements which will have
29    /// a representation by a View class. It is needed to represent
30    /// Coordinates and Dimensions
31    /// </summary>
32    [Serializable]
33    public abstract class VisualElementModel
34    {
35        /// <summary>
36        /// Called when this object is deleted
37        /// </summary>
38        [field: NonSerialized]
39        public event EventHandler<EventArgs> OnDelete;
40
41        /// <summary>
42        /// Triggers event OnDelete
43        /// </summary>
44        public void onDelete(){
45            if(OnDelete != null){
46                EventArgs args = new EventArgs();         
47                OnDelete.Invoke(this, args);
48            }
49        }
50
51        /// <summary>
52        /// Current Position of this VisualElementModel
53        /// </summary>
54        public Point Position;
55
56        /// <summary>
57        /// Minimum Width of this VisualElementModel
58        /// </summary>
59        public double MinWidth = 250;
60       
61        /// <summary>
62        /// Minimum Height of this VisualElementModel
63        /// </summary>     
64        public double MinHeight = 200;
65
66        /// <summary>
67        /// Width of this VisualElementModel
68        /// </summary>
69        public double Width = 400;
70
71        /// <summary>
72        /// Height of this VisualElementModel
73        /// </summary>
74        public double Height = 300;
75
76        /// <summary>
77        /// Name of this VisualElementModel
78        /// </summary>
79        public string Name;
80
81        /// <summary>
82        /// Indicates that this Model Element needs a GUI Update
83        /// </summary>
84        public Boolean GuiNeedsUpdate { get; set; }
85
86        /// <summary>
87        /// View Element of this VisualElement
88        /// </summary>
89        [NonSerialized]
90        public IUpdateableView UpdateableView = null;   
91    }
92}
Note: See TracBrowser for help on using the repository browser.