Changeset 1790


Ignore:
Timestamp:
Aug 9, 2010, 7:56:06 PM (11 years ago)
Author:
kopal
Message:
  • now the initializes() method of a plugin will be called when the workspace is deserialized
  • bug fix of the minimized view of the plugins
Location:
trunk/CrypPlugins/WorkspaceManager
Files:
4 edited

Legend:

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

    r1782 r1790  
    9191            foreach (PluginModel pluginModel in workspacemodel.AllPluginModels)
    9292            {
     93                pluginModel.Plugin.Initialize();
    9394                pluginModel.Plugin.OnGuiLogNotificationOccured += workspaceManagerEditor.GuiLogNotificationOccured;
    9495                pluginModel.Plugin.OnGuiLogNotificationOccured += pluginModel.GuiLogNotificationOccured;
  • trunk/CrypPlugins/WorkspaceManager/Model/PluginModel.cs

    r1776 r1790  
    129129        /// Is the Plugin actually minimized?
    130130        /// </summary>
    131         public bool? Minimized { get; set; }
     131        public bool Minimized { get; set; }
    132132
    133133        /// <summary>
  • trunk/CrypPlugins/WorkspaceManager/Model/WorkspaceModel.cs

    r1780 r1790  
    9292            pluginModel.RepeatStart = false;
    9393            pluginModel.generateConnectors();
     94            pluginModel.Plugin.Initialize();
    9495            pluginModel.Plugin.OnGuiLogNotificationOccured += this.WorkspaceManagerEditor.GuiLogNotificationOccured;
    9596            pluginModel.Plugin.OnGuiLogNotificationOccured += pluginModel.GuiLogNotificationOccured;
    9697            pluginModel.Plugin.OnPluginProgressChanged += pluginModel.PluginProgressChanged;
    97             pluginModel.Plugin.OnPluginStatusChanged += pluginModel.PluginStatusChanged;
     98            pluginModel.Plugin.OnPluginStatusChanged += pluginModel.PluginStatusChanged;           
    9899            this.AllPluginModels.Add(pluginModel);
    99100            this.WorkspaceManagerEditor.HasChanges = true;
  • trunk/CrypPlugins/WorkspaceManager/View/Container/PluginContainerView.xaml.cs

    r1760 r1790  
    285285        void PluginContainerView_Loaded(object sender, RoutedEventArgs e)
    286286        {
     287           
    287288            MinHeight = this.PluginBase.MinHeight;
    288289            MinWidth = this.PluginBase.MinWidth;
    289290            this.BorderGradientStop.Color = ColorHelper.GetColor(this.Model.PluginType);
    290291            this.BorderGradientStopSecond.Color = Color.FromArgb(100, this.BorderGradientStop.Color.R, this.BorderGradientStop.Color.G, this.BorderGradientStop.Color.B);
    291 
    292             if (this.Model.Minimized == null || this.Model.Minimized == true)
    293             {
    294                 this.Icon = this.Model.getImage();
     292            this.Icon = this.Model.getImage();
     293            this.Icon.Width = 40;
     294            this.Icon.Height = 40;
     295
     296            if (this.Model.Minimized == true)
     297            {
    295298                this.PresentationPanel.Child = this.Icon;
    296299                this.Model.Minimized = true;
    297300            }
    298             else if (this.Model.Minimized == false)
     301            else
    299302            {
    300303                this.PluginBase.MinHeight = model.MinHeight;
     
    309312                this.MinMaxImage.Source = new BitmapImage(new Uri("/WorkspaceManager;component/View/Image/Min.png", UriKind.RelativeOrAbsolute));
    310313            }
    311 
    312314            SetAllConnectorPositionX();
     315           
    313316        }
    314317
     
    383386        private void MinMaxBorder_MouseLeftButtonDown(object sender, RoutedEventArgs e)
    384387        {
    385             if (model.PluginPresentation != null && PresentationPanel.Child is Image)
     388            if (model.Minimized == true)
    386389            {
    387390                PluginBase.MinHeight = model.MinHeight;
     
    392395                RightDelta.IsEnabled = true;
    393396                BottomRightDelta.IsEnabled = true;
    394                 PresentationPanel.Child = model.PluginPresentation;
     397                PresentationPanel.Child = model.PluginPresentation;               
    395398                model.Minimized = false;
    396399                MinMaxImage.Source = new BitmapImage(new Uri("/WorkspaceManager;component/View/Image/Min.png", UriKind.RelativeOrAbsolute));
    397                 return;
    398             }
    399 
    400             if (PresentationPanel.Child is UserControl)
     400            }
     401            else
    401402            {
    402403                PluginBase.MinHeight = MinHeight;
     
    408409                BottomRightDelta.IsEnabled = false;
    409410                PresentationPanel.Child = this.Icon;
     411                model.Minimized = true;
    410412                MinMaxImage.Source = new BitmapImage(new Uri("/WorkspaceManager;component/View/Image/Max.png", UriKind.RelativeOrAbsolute));
    411                 return;
    412413            }
    413414
     
    458459            if (this.Model.Minimized == null || this.Model.Minimized == true)
    459460            {
    460                 this.Icon = model.getImage();
    461461                this.PresentationPanel.Child = this.Icon;
    462462            }
Note: See TracChangeset for help on using the changeset viewer.