/// <summary>
        /// Creates the Main Window for the Slice of Pie application
        /// </summary>
        public MainWindow()
        {
            InitializeComponent();
            CreateContextMenus();

            controller = Controller.Instance;

            //itemexplorer is "instantiated" in the xaml
            itemExplorer.ItemMouseLeftButtonUp += new EventHandler<ListableItemEventArgs>(ItemExplorerItemMouseLeftButtonUp);
            itemExplorer.ItemMouseRightButtonUp += new EventHandler<ListableItemEventArgs>(ItemExplorerItemMouseRightButtonUp);
            itemExplorer.ItemEnterKeyUp += new EventHandler<ListableItemEventArgs>(ItemExplorerItemEnterKeyUp);

            //ContainerContentViewWrapper
            containerContentViewWrapper = new ContentWrapper();
            containerContentViewWrapper.addMenuButton("Create document", "/Images/new-document.png", new RoutedEventHandler(OpenCreateDocumentWindow));
            containerContentViewWrapper.addMenuButton("Create folder", "/Images/new-folder.png", new RoutedEventHandler(OpenCreateFolderWindow));

            //Create the underlying containerContentView
            containerContentView = new ContainerContentView();
            containerContentView.ItemDoubleClicked += new EventHandler<ListableItemEventArgs>(ContainerContentView_DoubleClick);
            //Add to wrapper
            containerContentViewWrapper.Content = containerContentView;

            //TextEditorViewWrapper
            textEditorWrapper = new ContentWrapper();
            textEditorWrapper.addMenuButton("Save document", "/Images/save-document.png", new RoutedEventHandler(SaveDocumentButton_Click));
            textEditorWrapper.addMenuButton("Insert image", "/Images/insert-image.png", new RoutedEventHandler(OpenInsertImagePopUp));
            textEditorWrapper.addMenuButton("Show history", "/Images/show-history.png", new RoutedEventHandler(OpenHistoryPopUp));

            //Create the underlying text editor
            textEditor = new TextEditor();
            //Add to wrapper
            textEditorWrapper.Content = textEditor;

            RefreshLocalProjects();
        }
Exemple #2
0
        /// <summary>
        /// Creates the Main Window for the Slice of Pie application
        /// </summary>
        public MainWindow()
        {
            InitializeComponent();
            CreateContextMenus();

            controller = Controller.Instance;

            //itemexplorer is "instantiated" in the xaml
            itemExplorer.ItemMouseLeftButtonUp  += new EventHandler <ListableItemEventArgs>(ItemExplorerItemMouseLeftButtonUp);
            itemExplorer.ItemMouseRightButtonUp += new EventHandler <ListableItemEventArgs>(ItemExplorerItemMouseRightButtonUp);
            itemExplorer.ItemEnterKeyUp         += new EventHandler <ListableItemEventArgs>(ItemExplorerItemEnterKeyUp);

            //ContainerContentViewWrapper
            containerContentViewWrapper = new ContentWrapper();
            containerContentViewWrapper.addMenuButton("Create document", "/Images/new-document.png", new RoutedEventHandler(OpenCreateDocumentWindow));
            containerContentViewWrapper.addMenuButton("Create folder", "/Images/new-folder.png", new RoutedEventHandler(OpenCreateFolderWindow));

            //Create the underlying containerContentView
            containerContentView = new ContainerContentView();
            containerContentView.ItemDoubleClicked += new EventHandler <ListableItemEventArgs>(ContainerContentView_DoubleClick);
            //Add to wrapper
            containerContentViewWrapper.Content = containerContentView;

            //TextEditorViewWrapper
            textEditorWrapper = new ContentWrapper();
            textEditorWrapper.addMenuButton("Save document", "/Images/save-document.png", new RoutedEventHandler(SaveDocumentButton_Click));
            textEditorWrapper.addMenuButton("Insert image", "/Images/insert-image.png", new RoutedEventHandler(OpenInsertImagePopUp));
            textEditorWrapper.addMenuButton("Show history", "/Images/show-history.png", new RoutedEventHandler(OpenHistoryPopUp));

            //Create the underlying text editor
            textEditor = new TextEditor();
            //Add to wrapper
            textEditorWrapper.Content = textEditor;

            RefreshLocalProjects();
        }