Example #1
0
        void DnsServersAdd()
        {
            WindowPreferencesIpController.Ip = "";
            WindowPreferencesIpController dlg = new WindowPreferencesIpController();

            dlg.Window.ReleasedWhenClosed = true;
            NSApplication.SharedApplication.RunModalForWindow(dlg.Window);
            dlg.Window.Close();

            if (dlg.Accepted)
            {
                TableDnsServersController.Add(WindowPreferencesIpController.Ip);
                TableDnsServersController.RefreshUI();
            }

            this.EnableIde();
        }
Example #2
0
        void DnsServersEdit()
        {
            int i = TableDnsServers.SelectedRow;

            if (i != -1)
            {
                string dns = TableDnsServersController.Get(i);

                WindowPreferencesIpController.Ip = dns;
                WindowPreferencesIpController dlg = new WindowPreferencesIpController();
                dlg.Window.ReleasedWhenClosed = true;
                NSApplication.SharedApplication.RunModalForWindow(dlg.Window);
                dlg.Window.Close();

                if (dlg.Accepted)
                {
                    TableDnsServersController.Set(i, WindowPreferencesIpController.Ip);
                    TableDnsServersController.RefreshUI();
                }

                this.EnableIde();
            }
        }