Ejemplo n.º 1
0
        // ============================================
        // PUBLIC Constructors
        // ============================================
        /// Create New Proxy Settings Dialog
        public AcceptUser(PeerSocket peer) :
            base("dialog", "AcceptUserDialog.glade")
        {
            // Get UserInfo
            UserInfo userInfo = peer.Info as UserInfo;

            // Initialize GUI
            this.labelTitle.Text = "<span size='x-large'><b>Accept User</b> (";
            if (userInfo.SecureAuthentication == true)
            {
                this.image.Pixbuf     = StockIcons.GetPixbuf("SecureAuth");
                this.labelTitle.Text += "Secure";
                this.Dialog.Title    += " (Secure Authentication)";
            }
            else
            {
                this.image.Pixbuf     = StockIcons.GetPixbuf("InsecureAuth");
                this.labelTitle.Text += "Insecure";
                this.Dialog.Title    += " (Insecure Authentication)";
            }
            this.labelTitle.Text     += ")</span>";
            this.labelTitle.UseMarkup = true;

            entryName.Text = userInfo.Name;
            entryIP.Text   = peer.GetRemoteIP().ToString();
        }
Ejemplo n.º 2
0
        // ============================================
        // 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();
        }
Ejemplo n.º 3
0
        // ============================================
        // PUBLIC Constructors
        // ============================================
        /// Create New P2P Port Dialog
        public SetPort() : base("dialog", "SetPortDialog.glade")
        {
            // Set Current Default P2PManager Port
            Port = P2PManager.Port;

            // Initialize Dialog Image
            this.image.Pixbuf = StockIcons.GetPixbuf("Channel", 48);
        }
Ejemplo n.º 4
0
        // ============================================
        // PUBLIC Constructors
        // ============================================
        /// Create New Proxy Settings Dialog
        public ProxySettings() : base("dialog", "ProxySettingsDialog.glade")
        {
            // Add Proxy Settings Box
            proxy = new Niry.GUI.Gtk2.ProxySettings();
            this.vbox.PackStart(proxy, true, true, 2);
            proxy.ShowAll();

            // Initialize Dialog Image
            this.image.Pixbuf = StockIcons.GetPixbuf("Proxy", 48);
        }
Ejemplo n.º 5
0
        public LoadWebImage()
        {
            XML xml = new XML(null, "LoadWebImageDialog.glade", "dialog", null);

            xml.Autoconnect(this);

            this.image.Pixbuf = StockIcons.GetPixbuf("NyIVImage");

            this.dialog.ShowAll();
        }
Ejemplo n.º 6
0
        /// Create new Dialog
        public SetPort()
        {
            XML xml = new XML(null, "SetPortDialog.glade", "dialog", null);

            xml.Autoconnect(this);

            Port = P2PManager.Port;

            this.image.Pixbuf = StockIcons.GetPixbuf("Channel");
            this.dialog.ShowAll();
        }
        // ============================================
        // PUBLIC Constructors
        // ============================================
        /// Create New Registration Dialog
        public RegistrationDialog() :
            base("dialog", new Glade.XML(null, "RegistrationDialog.glade", "dialog", null))
        {
            // Initialize Dialog Image
            this.image.Pixbuf = StockIcons.GetPixbuf("Registration");

            // Initialize Events
            entryPassword.Changed           += new EventHandler(OnPasswordChanged);
            entryPasswordCheck.Changed      += new EventHandler(OnPasswordCheckChanged);
            buttonCheckAvailability.Clicked += new EventHandler(OnCheckAvailability);
        }
Ejemplo n.º 8
0
        public ProxySettings()
        {
            XML xml = new XML(null, "ProxySettingsDialog.glade", "dialog", null);

            xml.Autoconnect(this);
            this.image.Pixbuf = StockIcons.GetPixbuf("NyIVProxy");

            proxy = new Niry.GUI.Gtk2.ProxySettings();
            this.vbox.PackStart(proxy, true, true, 2);

            this.dialog.ShowAll();
        }
Ejemplo n.º 9
0
        // ============================================
        // PUBLIC Constructors
        // ============================================
        /// Create New "Add Peer" Dialog
        public AddPeer() : base("dialog", "AddPeerDialog.glade")
        {
            checkSecureAuth.Toggled += new EventHandler(OnCheckSecureAuthToggled);

            this.Dialog.Response += new ResponseHandler(OnResponse);

            // Widget.Sensitive
            OnCheckSecureAuthToggled(checkSecureAuth, null);

            // Initialize Dialog Image
            this.image.Pixbuf = StockIcons.GetPixbuf("Network", 96);
        }
Ejemplo n.º 10
0
        /// Create New Add Peer Dialog
        public AddPeer()
        {
            XML xml = new XML(null, "AddPeerDialog.glade", "dialog", null);

            xml.Autoconnect(this);

            this.image.Pixbuf        = StockIcons.GetPixbuf("Network");
            checkSecureAuth.Toggled += new EventHandler(OnCheckSecureAuthToggled);

            this.dialog.Response += new ResponseHandler(OnResponse);
            this.dialog.ShowAll();

            // Widget.Sensitive
            OnCheckSecureAuthToggled(checkSecureAuth, null);
        }
Ejemplo n.º 11
0
        // ============================================
        // PUBLIC Constructors
        // ============================================
        /// Create New "Remove Peer" Dialog
        public RemovePeer() : base("dialog", "RemovePeerDialog.glade")
        {
            this.comboPeers = ComboBox.NewText();
            this.vboxMain.PackStart(this.comboPeers, false, false, 2);

            // Add Peers
            if (P2PManager.KnownPeers != null)
            {
                foreach (UserInfo userInfo in P2PManager.KnownPeers.Keys)
                {
                    this.comboPeers.AppendText(userInfo.Name);
                }
            }
            this.comboPeers.ShowAll();

            // Initialize Dialog Image
            this.image.Pixbuf = StockIcons.GetPixbuf("Network", 96);
        }
Ejemplo n.º 12
0
        public TalkWithDialog() :
            base("dialog", new XML(null, "TalkWithDialog.glade", "dialog", null))
        {
            this.comboPeers = ComboBox.NewText();
            this.vboxMain.PackStart(this.comboPeers, false, false, 2);

            // Add Peers
            if (P2PManager.KnownPeers != null)
            {
                foreach (UserInfo userInfo in P2PManager.KnownPeers.Keys)
                {
                    this.comboPeers.AppendText(userInfo.Name);
                }
            }

            this.image.Pixbuf = StockIcons.GetPixbuf("TalkBubble");
            this.dialog.ShowAll();
        }
Ejemplo n.º 13
0
        /// Create New Remove Peer Dialog
        public RemovePeer()
        {
            XML xml = new XML(null, "RemovePeerDialog.glade", "dialog", null);

            xml.Autoconnect(this);

            this.comboPeers = ComboBox.NewText();
            this.vboxMain.PackStart(this.comboPeers, false, false, 2);

            // Add Peers
            if (P2PManager.KnownPeers != null)
            {
                foreach (UserInfo userInfo in P2PManager.KnownPeers.Keys)
                {
                    this.comboPeers.AppendText(userInfo.Name);
                }
            }

            this.image.Pixbuf = StockIcons.GetPixbuf("Network");
            this.dialog.ShowAll();
        }
Ejemplo n.º 14
0
 // ============================================
 // PUBLIC Constructors
 // ============================================
 /// Create New "Add Peer" Dialog
 public AccountDetails() : base("dialog", new XML(null, "AccountDetails.glade", "dialog", null))
 {
     // Initialize Dialog Image
     this.image.Pixbuf = StockIcons.GetPixbuf("Network", 96);
 }