// ============================================
        // PRIVATE Methods
        // ============================================
        private void InitializeMenuBar()
        {
            MenuItem item;

            // File Menu
            Menu fileMenu = new Gtk.Menu();

            item = new ImageMenuItem("Proxy Settings");
            ((ImageMenuItem)item).Image = StockIcons.GetImage("Proxy", 20);
            item.Activated += new EventHandler(OnProxySettings);
            fileMenu.Append(item);

            item = new SeparatorMenuItem();
            fileMenu.Append(item);

            item            = new ImageMenuItem(Gtk.Stock.Quit, null);
            item.Activated += new EventHandler(OnQuit);
            fileMenu.Append(item);

            item         = new MenuItem("_File");
            item.Submenu = fileMenu;
            this.menuBar.Append(item);

            // Help Menu
            Menu helpMenu = new Gtk.Menu();

            item            = new ImageMenuItem(Gtk.Stock.About, null);
            item.Activated += new EventHandler(OnAbout);
            helpMenu.Append(item);

            item         = new MenuItem("_Help");
            item.Submenu = helpMenu;
            this.menuBar.Append(item);
        }
        // ============================================
        // PUBLIC Constructors
        // ============================================
        /// Create New Login Dialog
        public Login()
        {
            SetDefaultSize(240, 355);
            DefaultIcon = StockIcons.GetPixbuf("NyFolderIcon");

            // Initialize Dialog Options
            Title = Info.Name + " Login";
            Logo  = StockIcons.GetPixbuf("NyFolderLogo", 240, 140);

            // Remember Password (CheckButton)
            checkRememberPassword.Image = new Gtk.Image(Stock.Save, IconSize.Button);

            // Secure Authentication (CheckButton)
            checkSecureAuth          = new CheckButton("Use Secure Authentication");
            checkSecureAuth.Active   = true;
            checkSecureAuth.Image    = StockIcons.GetImage("Lock", 22);
            checkSecureAuth.Toggled += new EventHandler(OnCheckSecureAuthToggled);
            VBox.PackStart(checkSecureAuth, false, false, 2);

            // Initialize MenuBar
            this.menuBar = new Gtk.MenuBar();
            VBox.PackStart(this.menuBar, false, false, 0);
            this.VBox.ReorderChild(this.menuBar, 0);
            InitializeMenuBar();

            // Initialize Dialog Buttons
            AddButton(Gtk.Stock.Ok, ResponseType.Ok);
            AddButton(Gtk.Stock.Quit, ResponseType.Close);

            ShowAll();
        }
        // ============================================
        // PUBLIC Constructors
        // ============================================
        public TopBar() : base(false, 2)
        {
            // Initialize Search Logo
            this.imageLogo        = StockIcons.GetImage("Search");
            this.imageLogo.Xalign = 0.1f;
            this.imageLogo.Yalign = 0.1f;
            this.imageLogo.Xpad   = 2;
            this.PackStart(this.imageLogo, false, false, 2);

            // Initialize Top VBox
            this.table = new Gtk.Table(3, 2, false);
            this.table.ColumnSpacing = 6;
            this.table.RowSpacing    = 2;
            this.PackStart(this.table, true, true, 2);

            Gtk.Label label;

            // Initialize Search Label
            label           = new Gtk.Label("<b>Search:</b>");
            label.UseMarkup = true;
            label.Xalign    = 1.0f;
            this.table.Attach(label, 0, 1, 0, 1);

            // Initialize Entry Search
            this.entrySearch = new Gtk.Entry();
            this.table.Attach(this.entrySearch, 1, 2, 0, 1);

            // Initialize Search By
            label           = new Gtk.Label("<b>By:</b>");
            label.UseMarkup = true;
            label.Xalign    = 1.0f;
            this.table.Attach(label, 0, 1, 1, 2);

            // Initialize Combo Search Type
            this.comboSearchType = ComboBox.NewText();
            AddSearchType();
            this.comboSearchType.Active = 0;
            this.table.Attach(this.comboSearchType, 1, 2, 1, 2);

            // Initialize Search By
            label           = new Gtk.Label("<b>User:</b>");
            label.UseMarkup = true;
            label.Xalign    = 1.0f;
            table.Attach(label, 0, 1, 2, 3);

            // Initialize Combo Search Type
            this.comboSearchUser = ComboBox.NewText();
            AddSearchUsers();
            this.comboSearchUser.Active = 0;
            this.table.Attach(this.comboSearchUser, 1, 2, 2, 3);

            this.ShowAll();
        }
Exemple #4
0
        protected void CheckForUpdates(string version, string infos)
        {
            if (version == NyFolder.Info.Version)
            {
                return;
            }

            Gtk.Image  updateImage = StockIcons.GetImage("UpdateNotifier", 22);
            Gtk.Button updateBtn   = new Gtk.Button(updateImage);
            updateBtn.Relief   = ReliefStyle.None;
            updateBtn.Clicked += {
                UpdateInfo updateDialog = new UpdateInfo();
                updateDialog.Version = version;
                updateDialog.Version = infos;
            };
        // ============================================
        // PUBLIC Constructors
        // ============================================
        public ViewerWindow() : base("Download/Upload Viewer")
        {
            // Initialize Window
            SetDefaultSize(440, 300);

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

            // Initialize Notebook
            this.notebook            = new Gtk.Notebook();
            this.notebook.ShowTabs   = true;
            this.notebook.Scrollable = true;
            this.vbox.PackStart(this.notebook, true, true, 2);

            // Add Download Viewer
            this.tabDownloads = new TabLabel("<b>Downloads</b>", StockIcons.GetImage("Download", 22));
            this.tabDownloads.Button.Sensitive = false;
            this.downloadViewer = new DownloadViewer();
            this.notebook.AppendPage(this.downloadViewer, this.tabDownloads);

            // Add Uploads Viewer
            this.tabUploads = new TabLabel("<b>Uploads</b>", StockIcons.GetImage("Upload", 22));
            this.tabUploads.Button.Sensitive = false;
            this.uploadViewer = new UploadViewer();
            this.notebook.AppendPage(this.uploadViewer, this.tabUploads);

            // HButton Box
            this.hButtonBox             = new Gtk.HButtonBox();
            this.hButtonBox.Spacing     = 4;
            this.hButtonBox.Layout      = ButtonBoxStyle.End;
            this.hButtonBox.LayoutStyle = ButtonBoxStyle.End;
            this.vbox.PackStart(this.hButtonBox, false, false, 2);

            Gtk.Button button;

            button          = new Gtk.Button(Gtk.Stock.Clear);
            button.Clicked += new EventHandler(OnButtonClear);
            this.hButtonBox.PackStart(button, false, false, 2);

            // Show All
            this.ShowAll();
        }
Exemple #6
0
        public About() : base("About " + Info.Name)
        {
            // Initialize Dialog Window Options
            this.SetDefaultSize(320, 223);

            // Initialize VBox
            this.vbox = new Gtk.VBox(false, 0);
            this.Add(this.vbox);

            // Initialize Image Logo
            this.imageLogo = StockIcons.GetImage("NyIVLogo");
            this.vbox.PackStart(this.imageLogo, false, false, 0);

            // Initialize Credit ScollBox
            this.scrollBox = new ScrollBox(CreditText);
            this.scrollBox.SetSizeRequest(320, 95);
            this.vbox.PackStart(this.scrollBox, false, false, 0);

            this.ShowAll();
        }
        // ============================================
        // PRIVATE Methods
        // ============================================
        private void InitializeObject(bool download)
        {
            this.hbox = new Gtk.HBox(false, 2);
            this.Add(this.hbox);

            // Initialize Image Logo
            this.imageLogo = StockIcons.GetImage(((download == true) ? "Download": "Upload"));
            this.hbox.PackStart(this.imageLogo, false, false, 2);

            // Initialize Delete Button
            this.deleteButton          = new Gtk.Button(StockIcons.GetImage("DlTrash"));
            this.deleteButton.Relief   = ReliefStyle.None;
            this.deleteButton.Clicked += new EventHandler(OnDeleteClicked);
            this.hbox.PackEnd(this.deleteButton, false, false, 2);

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

            // Initialize Name
            this.labelName           = new Gtk.Label();
            this.labelName.UseMarkup = true;
            this.labelName.Xalign    = 0.0f;
            this.vbox.PackStart(this.labelName, false, false, 2);

            // Initialize Status "5.8Mb of 8.1Mb (at 316.1Kb/s)"
            this.labelStatus           = new Gtk.Label();
            this.labelStatus.UseMarkup = true;
            this.labelStatus.Xalign    = 0.0f;
            this.vbox.PackStart(this.labelStatus, false, false, 2);

            // Initialize ProgressBar
            this.progressBar = new Gtk.ProgressBar();
            this.vbox.PackStart(this.progressBar, false, false, 2);

            this.vbox.PackStart(new Gtk.HSeparator(), false, false, 2);

            this.ShowAll();
        }
Exemple #8
0
        // ============================================
        // PROTECTED Methods
        // ============================================

        // ============================================
        // PRIVATE Methods
        // ============================================
        private void InitializeObject()
        {
            // Initialize Image Logo
            this.imageLogo      = new Gtk.Image();
            this.imageLogo.Xpad = 5;
            this.PackStart(this.imageLogo, false, false, 2);

            // Initialize Delete Button
            this.deleteButton          = new Gtk.Button(StockIcons.GetImage("DlTrash"));
            this.deleteButton.Relief   = ReliefStyle.None;
            this.deleteButton.Clicked += new EventHandler(OnDeleteClicked);
            this.PackEnd(this.deleteButton, false, false, 2);

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

            // Initialize Name
            this.labelName           = new Gtk.Label();
            this.labelName.UseMarkup = true;
            this.labelName.Xalign    = 0.0f;
            this.vbox.PackStart(this.labelName, false, false, 2);

            // Initialize Status "6.1Mb of 10.1Mb (60%)"
            this.labelStatus           = new Gtk.Label();
            this.labelStatus.UseMarkup = true;
            this.labelStatus.Xalign    = 0.0f;
            this.vbox.PackStart(this.labelStatus, false, false, 2);

            // Initialize ProgressBar
            this.progressBar = new Gtk.ProgressBar();
            this.vbox.PackStart(this.progressBar, false, false, 2);

            this.vbox.PackStart(new Gtk.HSeparator(), false, false, 2);

            this.ShowAll();
        }
        // ============================================
        // PUBLIC Constructors
        // ============================================
        public UpdateInfo() : base("Update Informations", null, DialogFlags.Modal)
        {
            Gtk.HBox hbox = new Gtk.HBox(false, 4);
            this.VBox.PackStart(hbox, true, true, 4);

            // Add Close Button
            AddButton(Gtk.Stock.Close, ResponseType.Close);

            // Update Logo
            Gtk.Image updateLogo = StockIcons.GetImage("UpdateNotifier");
            updateLogo.Yalign = 0;
            updateLogo.Xpad   = 2;
            hbox.PackStart(updateLogo, false, false, 2);

            // Update Informations
            this.vbox = new Gtk.VBox(false, 2);
            hbox.PackStart(this.vbox, true, true, 2);

            // Title
            this.title           = new Gtk.Label("<span size='x-large'><b>Update Informations</b></span>");
            this.title.UseMarkup = true;
            this.vbox.PackStart(this.title, false, false, 2);

            // Version
            this.version           = new Gtk.Label();
            this.version.Xalign    = 0;
            this.version.UseMarkup = true;
            this.vbox.PackStart(this.version, false, false, 2);

            // Infos
            this.infos        = new Gtk.Label();
            this.infos.Xalign = 0;
            this.infos.Yalign = 0;
            this.vbox.PackStart(this.infos, true, true, 2);

            this.ShowAll();
        }
Exemple #10
0
        // ============================================
        // PUBLIC Constructors
        // ============================================
        public ProgressDialog(string password) :
            base(MyInfo.Name + " Login", null, DialogFlags.Modal)
        {
            // Initialize Dialog Options
            WindowPosition = Gtk.WindowPosition.Center;

            // Initialize Dialog Events
            Response += new ResponseHandler(OnResponse);

            // Initialize Dialog Components
            AddButton(Gtk.Stock.Close, ResponseType.Close);

            Gtk.HBox hbox = new Gtk.HBox(false, 2);
            Gtk.VBox vbox = new Gtk.VBox(false, 2);
            VBox.PackStart(hbox, true, true, 2);
            hbox.PackStart(StockIcons.GetImage("Channel"), false, false, 2);
            hbox.PackStart(vbox, true, true, 2);

            // Initialize Label
            labelMessage           = new Gtk.Label("<b>Waiting for " + MyInfo.Name + " Login...</b>");
            labelMessage.UseMarkup = true;
            vbox.PackStart(labelMessage, false, false, 2);

            // Initialize ProgressBar
            progressBar = new Gtk.ProgressBar();
            vbox.PackStart(progressBar, false, false, 2);

            // Initialize Timer
            timer = GLib.Timeout.Add(100, new GLib.TimeoutHandler(ProgressTimeout));

            // Initialize UserInfo
            MyInfo.LoginChecked += new LoginEventHandler(OnLoginChecked);
            MyInfo.Login(password);

            this.ShowAll();
        }