// ============================================
        // 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);
            }
        }
示例#2
0
 private void InitCloseTabButton()
 {
     this.button = new Gtk.Button();
     this.button.Add(StockIcons.GetImage("Close"));
     this.button.Relief = Gtk.ReliefStyle.None;
     this.button.SetSizeRequest(18, 18);
     this.PackEnd(this.button, false, false, 2);
 }
示例#3
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"));
        }
示例#4
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();
        }
        // ============================================
        // 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);
        }
示例#6
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);
            }
        }
示例#7
0
        /// Add File
        public void AddFile(string path)
        {
            FileInfo fileInfo = new FileInfo(path);
            string   ext      = GetIconTypeName(fileInfo);

            Gdk.Pixbuf pixbuf = StockIcons.GetFileIconPixbuf(ext);

            Gtk.TreeIter iter;
            iter = InsertData(path, fileInfo.Name, pixbuf, false);

            // File Added Event
            if (FileAdded != null)
            {
                FileAdded(this, iter);
            }
        }