// ============================================
        // PUBLIC Constructors
        // ============================================
        public ProtocolManager(NotebookViewer nv)
        {
            this.notebookViewer = nv;

            NetworkManager.AddProtocolEvent += new SetProtocolEventHandler(OnAddProtocolEvent);
            NetworkManager.DelProtocolEvent += new SetProtocolEventHandler(OnDelProtocolEvent);
        }
        // ============================================
        // PRIVATE (Methods) Event Handlers
        // ============================================
        private void OnMainWindowStarted(object sender)
        {
            // Initialize GUI Components
            InitializeMenu();

            // Initialize Notebook Viewer Events
            notebookViewer            = this.nyFolder.MainWindow.NotebookViewer;
            notebookViewer.FileAdded += new ObjectEventHandler(OnFileAdded);
        }
Exemple #3
0
        // ============================================
        // PRIVATE (Methods) Event Handlers
        // ============================================
        private void OnMainWindowStarted(object sender)
        {
            // Initialize GUI Components
            InitializeMenu();

            // Initialize Notebook Viewer
            notebookViewer = this.nyFolder.MainWindow.NotebookViewer;

            LoadSectionImages("customization/wallpaper/apple/");
        }
Exemple #4
0
        // ============================================
        // PUBLIC Constructors
        // ============================================
        public ProtocolManager(GUI.Window window)
        {
            // Initialize Components
            this.notebookViewer = window.NotebookViewer;
            this.networkViewer  = this.notebookViewer.NetworkViewer;

            // Add Events Handler
            CmdManager.AddProtocolEvent += new SetProtocolEventHandler(OnAddProtocolEvent);
            CmdManager.DelProtocolEvent += new SetProtocolEventHandler(OnDelProtocolEvent);
        }
Exemple #5
0
        // ============================================
        // PROTECTED (Methods) Event Handlers
        // ============================================
        protected void OnMainWindowStarted(object sender)
        {
            // Initialize GUI Components
            InitializeMenu();

            // Initialize Notebook Viewer Events
            this.notebookViewer            = this.nyFolder.Window.NotebookViewer;
            this.notebookViewer.FileAdded += new ObjectEventHandler(OnFileAdded);

            // Initialize Protocol Events
            P2PManager.StatusChanged += new BoolEventHandler(OnP2PStatusChanged);
        }
Exemple #6
0
        public static void Uninitialize()
        {
            foreach (UserInfo userInfo in talkFrames.Keys)
            {
                TalkFrame talkFrame = talkFrames[userInfo] as TalkFrame;

                // Remove Page From Notebook Viewer
                notebookViewer.RemoveCustom(talkFrame);
            }
            talkFrames.Clear();
            talkFrames = null;

            // Remove Events From NotebookViewer
            notebookViewer.TabRemoved -= new ObjectEventHandler(OnTalkFrameRemoved);
            notebookViewer             = null;
        }
        // ============================================
        // PUBLIC Constructors
        // ============================================
        public FolderManager(MenuManager menu, UserPanel userPanel, NotebookViewer nv)
        {
            this.userPanel      = userPanel;
            this.notebookViewer = nv;
            this.menuManager    = menu;

            // Network Viewer Displayed at Start...
            SetSensitiveGoUpMenu(false);
            SetSensitiveGoHomeMenu(false);

            // Add Event Handlers
            this.menuManager.Activated          += new EventHandler(OnMenuActivated);
            this.notebookViewer.SwitchPage      += new SwitchPageHandler(OnSwitchPage);
            this.notebookViewer.DirChanged      += new BoolEventHandler(OnBoolEventHandler);
            this.userPanel.FolderButton.Clicked += new EventHandler(OnMyFolderCliecked);
        }
        // ============================================
        // PUBLIC Constructors
        // ============================================
        public NetworkManager(MenuManager menu, UserPanel userPanel, NotebookViewer nv)
        {
            this.userPanel      = userPanel;
            this.notebookViewer = nv;
            this.menuManager    = menu;

            // Initialize P2PManager & CMD Manager
            this.p2pManager = P2PManager.GetInstance();
            this.cmdManager = CmdManager.GetInstance();

            // Network
            SetSensitiveNetworkMenu(P2PManager.IsListening());

            // Add Event Handlers
            this.menuManager.Activated += new EventHandler(OnMenuActivated);
            notebookViewer.NetworkViewer.ItemRemoved += new PeerSelectedHandler(OnPeerRemove);
        }
Exemple #9
0
        // ============================================
        // PUBLIC Constructors
        // ============================================
        public FolderManager(GUI.Window window)
        {
            // Initialize Components
            this.menuManager    = window.Menu;
            this.userPanel      = window.UserPanel;
            this.notebookViewer = window.NotebookViewer;

            // Network Viewer Displayed at Start...
            SetSensitiveGoUpMenu(false);
            SetSensitiveGoHomeMenu(false);

            // Add Event Handlers
            this.menuManager.Activated          += new EventHandler(OnMenuActivated);
            this.notebookViewer.SwitchPage      += new SwitchPageHandler(OnSwitchPage);
            this.notebookViewer.DirChanged      += new BoolEventHandler(OnDirChanged);
            this.userPanel.FolderButton.Clicked += new EventHandler(OnMyFolderCliecked);
        }
Exemple #10
0
        protected void OnMainAppQuit(object sender)
        {
            if (this.started == false)
            {
                return;
            }

            // Notebook Viewer Events
            this.notebookViewer.FileAdded -= new ObjectEventHandler(OnFileAdded);
            this.notebookViewer            = null;

            // Protocol Events
            P2PManager.StatusChanged -= new BoolEventHandler(OnP2PStatusChanged);
            if (P2PManager.IsListening() == true)
            {
                OnP2PStatusChanged(null, false);
            }
        }
        // ============================================
        // PUBLIC Constructors
        // ============================================
        public NetworkManager(GUI.Window window)
        {
            // Initialize Events (None)
            UserAccept = null;

            // Initialize Components
            this.menuManager    = window.Menu;
            this.userPanel      = window.UserPanel;
            this.notebookViewer = window.NotebookViewer;
            this.networkViewer  = this.notebookViewer.NetworkViewer;

            // Initialize P2PManager & CMD Manager
            this.p2pManager = P2PManager.GetInstance();

            // Network
            SetSensitiveNetworkMenu(P2PManager.IsListening());

            // Add Event Handlers
            menuManager.Activated       += new EventHandler(OnMenuActivated);
            networkViewer.ItemRemoved   += new PeerSelectedHandler(OnPeerRemove);
            CmdManager.AddProtocolEvent += new SetProtocolEventHandler(OnAddProtocolEvent);
            CmdManager.DelProtocolEvent += new SetProtocolEventHandler(OnDelProtocolEvent);
        }
Exemple #12
0
        private static Hashtable talkFrames          = null;    // [UserInfo] = TalkFrame

        // ============================================
        // PUBLIC Methods
        // ============================================
        public static void Initialize(INyFolder iNyFolder)
        {
            talkFrames                 = Hashtable.Synchronized(new Hashtable());
            notebookViewer             = iNyFolder.Window.NotebookViewer;
            notebookViewer.TabRemoved += new ObjectEventHandler(OnTalkFrameRemoved);
        }