Exemplo n.º 1
0
        // ============================================
        // PUBLIC Methods
        // ============================================
        /// Add New Peer
        public void Add(UserInfo userInfo)
        {
            Remove(userInfo);

            // Setup Pixbuf
            Gdk.Pixbuf pixbuf;
            if (userInfo.SecureAuthentication == true)
            {
                if (userInfo.IsOnline == true)
                {
                    pixbuf = StockIcons.GetPixbuf("Network", 74);
                }
                else
                {
                    pixbuf = StockIcons.GetPixbuf("NetworkOffline", 74);
                }
            }
            else
            {
                pixbuf = StockIcons.GetPixbuf("NetworkInsecure", 74);
            }

            lock (this) {
                AppendValues(userInfo, userInfo.GetName(), pixbuf);
            }
        }
Exemplo n.º 2
0
        // ============================================
        // PUBLIC Methods
        // ============================================
        /// Set Online Status and Change Status Image
        public void SetOnlineStatusIcon(bool online)
        {
            bool secure = myInfo.SecureAuthentication;

            FolderImage = StockIcons.GetPixbuf("MyFolder" +
                                               ((online) ? "Online" : "Offline") +
                                               ((secure) ? "" : "Insecure"));
        }
Exemplo n.º 3
0
        // ============================================
        // PUBLIC Constructors
        // ============================================
        /// Create New NyFolder Window
        public Window() : base(Info.Name + " " + Info.Version)
        {
            // Initialize Window
            this.SetDefaultSize(620, 320);
            DefaultIcon       = StockIcons.GetPixbuf("NyFolderIcon");
            this.DeleteEvent += new DeleteEventHandler(OnWindowDelete);

            // Initialize VBox
            this.vboxMain = new Gtk.VBox(false, 2);
            this.Add(this.vboxMain);

            // Initialize Menu Manager
            this.menuManager            = new MenuManager();
            this.menuManager.Activated += new EventHandler(OnMenuActivated);
            this.AddAccelGroup(this.menuManager.AccelGroup);

            // Initialize HBox Menu
            this.hboxMenu = new Gtk.HBox(false, 0);
            this.vboxMain.PackStart(hboxMenu, false, false, 0);

            // Initialize MenuBar
            Gtk.MenuBar menuBar = this.MenuBar;
            this.hboxMenu.PackStart(menuBar, false, false, 0);

            // Initialize HBox
            this.hbox = new Gtk.HBox();
            this.vboxMain.PackStart(this.hbox, true, true, 2);

            // Initialize Left VBox
            this.vboxLeft = new Gtk.VBox(false, 2);
            this.hbox.PackStart(this.vboxLeft, false, false, 2);

            // Initialize User Panel
            this.userPanel = new UserPanel();
            this.vboxLeft.PackStart(this.userPanel, false, false, 2);

            // Initialize Right VBox
            this.vboxRight = new Gtk.VBox(false, 2);
            this.hbox.PackStart(this.vboxRight, true, true, 2);

            // Initialize ToolBar
            Gtk.Toolbar toolBar = this.ToolBar;
            toolBar.ShowArrow    = true;
            toolBar.IconSize     = Gtk.IconSize.LargeToolbar;
            toolBar.ToolbarStyle = ToolbarStyle.Both;
            this.vboxRight.PackStart(toolBar, false, false, 2);

            // Initialize Notebook Viewer
            this.notebookViewer = new NotebookViewer();
            this.vboxRight.PackStart(this.notebookViewer, true, true, 2);

            // Initialize Status Bar
            this.statusBar = new Gtk.Statusbar();
            this.vboxMain.PackEnd(this.statusBar, false, false, 0);

            // Window Show All
            this.ShowAll();
        }
Exemplo n.º 4
0
        // ============================================
        // PUBLIC Methods
        // ============================================
        /// Add New Peer
        public void Add(UserInfo userInfo)
        {
            // Setup Pixbuf
            Gdk.Pixbuf pixbuf;
            if (userInfo.SecureAuthentication == true)
            {
                pixbuf = StockIcons.GetPixbuf("Network", 74);
            }
            else
            {
                pixbuf = StockIcons.GetPixbuf("NetworkInsecure", 74);
            }

            this.AppendValues(userInfo, userInfo.Name, pixbuf);
        }
Exemplo n.º 5
0
        /// Add Directory
        public void AddDirectory(string path)
        {
            DirectoryInfo dirInfo = new DirectoryInfo(path);

            Gdk.Pixbuf pixbuf = StockIcons.GetPixbuf("Directory");

            Gtk.TreeIter iter;
            iter = InsertData(path, dirInfo.Name, pixbuf, true);

            // Directory Added Event
            if (DirectoryAdded != null)
            {
                DirectoryAdded(this, iter);
            }
        }