Ignore:
Timestamp:
Sep 2, 2010, 10:06:52 AM (11 years ago)
Author:
matkovic
Message:

-Fullscreen enhanced
-TextInput added
-Picture scaling added
-Textinput scaling added
-Textinput format command added
-Several style changes
-Progressbar redesigned
-Last log message now appearing
-IControlContainer commenced
-Several icons added
-Plugin state now stored and loaded
-Plugin height and width now storing and loading
-Several misc changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/WorkspaceManager/View/Container/WorkSpaceEditorView.xaml.cs

    r1847 r1892  
    4040        private PluginContainerView currentFullViewContainer;
    4141
     42        public UserContentWrapper UserContentWrapper { get; set; }
    4243        public EditorState State;
    4344        public EditorState ConnectorState;
     
    6061            setBaseControl(WorkspaceModel);                       
    6162            InitializeComponent();
    62             this.UserControlWrapper.Children.Add(new UserContentWrapper(WorkspaceModel));
     63            this.UserContentWrapper = new UserContentWrapper(WorkspaceModel, (BottomBoxParent.Child as BottomBox));
     64            this.UserControlWrapperParent.Children.Add(UserContentWrapper);
    6365        }
    6466
    6567        private void setBaseControl(WorkspaceModel WorkspaceModel)
    6668        {
    67             this.MouseLeftButtonDown += new MouseButtonEventHandler(WorkSpaceEditorView_OnMouseLeftButtonDown);
     69            //this.MouseLeftButtonDown += new MouseButtonEventHandler(WorkSpaceEditorView_OnMouseLeftButtonDown);
    6870            this.MouseLeave += new MouseEventHandler(WorkSpaceEditorView_MouseLeave);
    6971            this.Loaded += new RoutedEventHandler(WorkSpaceEditorView_Loaded);
     
    112114        {
    113115            this.InformationPanel.Visibility = Visibility.Visible;
    114             e.container.PresentationPanel.Child = null;
    115             this.FullPresentation.Children.Add(e.container.Model.PluginPresentation);
     116            e.container.PrepareFullscreen();
     117            this.PrstPanel.DataContext = e.container;
     118            this.CtrPanel.DataContext = e.container;
     119            this.CtrPanel.Children.Add(e.container.OptionPanel);
     120            this.PrstPanel.Children.Add(e.container.ViewPanel);
     121            this.ProgressbarPanel.Children.Add(e.container.ProgressbarParent);
    116122            this.currentFullViewContainer = e.container;
    117123        }
     
    187193        #region Controls
    188194
    189         void WorkSpaceEditorView_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
    190         {
    191             if (!e.Handled)
    192             {
    193                 PluginChangedEventArgs args = new PluginChangedEventArgs(this.model.WorkspaceManagerEditor, "WorkspaceManager", DisplayPluginMode.Normal);
    194                 this.Model.WorkspaceManagerEditor.onSelectedPluginChanged(args);
    195             }
    196         }
     195        //void WorkSpaceEditorView_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
     196        //{
     197        //    UserContentWrapper.SelectedItem = null;
     198        //    PluginChangedEventArgs args = new PluginChangedEventArgs(this.model.WorkspaceManagerEditor, "WorkspaceManager", DisplayPluginMode.Normal);
     199        //    this.Model.WorkspaceManagerEditor.onSelectedPluginChanged(args);
     200        //    e.Handled = false;
     201        //}
    197202
    198203        void shape_OnConnectorMouseLeftButtonDown(object sender, ConnectorViewEventArgs e)
     
    221226        void WorkSpaceEditorView_PreviewMouseRightButtonDown(object sender, MouseButtonEventArgs e)
    222227        {
     228            UserContentWrapper.SelectedItem = null;
     229
    223230            if (this.State == EditorState.READY)
    224231            {
     
    315322        #endregion
    316323
    317         private void CloseSettingsButton_Click(object sender, RoutedEventArgs e)
     324        private void CloseButton_Click(object sender, RoutedEventArgs e)
    318325        {
    319326            this.InformationPanel.Visibility = Visibility.Collapsed;
    320             this.FullPresentation.Children.Clear();
    321             this.currentFullViewContainer.PresentationPanel.Child = currentFullViewContainer.Model.PluginPresentation;
     327            this.CtrPanel.Children.Clear();
     328            this.PrstPanel.Children.Clear();
     329            this.ProgressbarPanel.Children.Clear();
     330            this.currentFullViewContainer.Reset();
    322331            this.currentFullViewContainer = null;
     332            this.CtrPanel.DataContext = null;
     333            this.PrstPanel.DataContext = null;
    323334        }
    324335
     
    326337        {
    327338            this.Model = WorkspaceModel;
    328             this.UserControlWrapper.Children.Clear();
    329             UserContentWrapper UserContentWrapper = new UserContentWrapper(WorkspaceModel);
    330             this.UserControlWrapper.Children.Add(UserContentWrapper);           
     339            this.UserContentWrapper = new UserContentWrapper(WorkspaceModel, (BottomBoxParent.Child as BottomBox));
     340            this.UserControlWrapperParent.Children.Clear();
     341            this.UserControlWrapperParent.Children.Add(UserContentWrapper);           
    331342
    332343            foreach (PluginModel model in this.Model.AllPluginModels)
     
    382393            }
    383394        }
     395
     396        private void root_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
     397        {
     398            if (!e.Handled)
     399            {
     400                PluginChangedEventArgs args = new PluginChangedEventArgs(this.model.WorkspaceManagerEditor, "WorkspaceManager", DisplayPluginMode.Normal);
     401                this.Model.WorkspaceManagerEditor.onSelectedPluginChanged(args);
     402            }
     403        }
     404
     405        private void Button_Click_Full_inc(object sender, RoutedEventArgs e)
     406        {
     407            FullScreenScaleSlider.Value += 0.3;
     408        }
     409
     410        private void Button_Click_Full_dec(object sender, RoutedEventArgs e)
     411        {
     412            FullScreenScaleSlider.Value -= 0.3;
     413        }
    384414    }
    385415}
Note: See TracChangeset for help on using the changeset viewer.