bool Check()
        {
            if ((RouteDescriptionToDirection(GuiUtils.GetSelected(CboRoutesOtherwise)) == "out") && (TableRoutingController.Items.Count == 0))
            {
                if (GuiUtils.MessageYesNo(Messages.WindowsSettingsRouteOutEmptyList) == false)
                {
                    return(false);
                }
            }

            if (GuiUtils.GetCheck(ChkLockAllowDNS) == false)
            {
                bool hostNameUsed = false;
                foreach (TableRoutingControllerItem item in TableRoutingController.Items)
                {
                    if (IpAddress.IsIP(item.Ip) == false)
                    {
                        hostNameUsed = true;
                        break;
                    }
                }

                if (hostNameUsed)
                {
                    if (Engine.Instance.OnAskYesNo(Messages.WindowsSettingsRouteWithHostname) == false)
                    {
                        return(false);
                    }
                }
            }

            return(true);
        }
Пример #2
0
        public override bool OnAskYesNo(string message)
        {
            bool answer = false;

            new NSObject().InvokeOnMainThread(() =>
            {
                answer = GuiUtils.MessageYesNo(message);
            });
            return(answer);
        }
Пример #3
0
        bool Check()
        {
            if ((RouteDescriptionToDirection(GuiUtils.GetSelected(CboRoutesOtherwise)) == "out") && (TableRoutingController.Items.Count == 0))
            {
                if (GuiUtils.MessageYesNo(Messages.WindowsSettingsRouteOutEmptyList) == false)
                {
                    return(false);
                }
            }

            return(true);
        }
Пример #4
0
        public override bool OnAskYesNo(string message)
        {
            bool result = false;

            if (MainWindow != null)
            {
                new NSObject().InvokeOnMainThread(() =>
                {
                    result = GuiUtils.MessageYesNo(message);
                });
            }

            return(result);
        }
        public bool Shutdown()
        {
            if (Engine.Instance.Storage.GetBool("gui.exit_confirm") == true)
            {
                bool result = GuiUtils.MessageYesNo(Messages.ExitConfirm);
                if (result == false)
                {
                    return(false);
                }
            }
            ShutdownConfirmed = true;
            if (windowAbout != null)
            {
                windowAbout.Close();
            }
            if (windowPreferences != null)
            {
                windowPreferences.Close();
            }

            Engine.Instance.RequestStop();
            return(true);
        }
Пример #6
0
        public bool Shutdown()
        {
            if (Engine.AskExitConfirm())
            {
                bool result = GuiUtils.MessageYesNo(LanguageManager.GetText("ExitConfirm"));
                if (result == false)
                {
                    Engine.Instance.OnExitRejected();
                    return(false);
                }
            }
            ShutdownConfirmed = true;
            if (windowAbout != null)
            {
                windowAbout.Close();
            }
            if (windowPreferences != null)
            {
                windowPreferences.Close();
            }

            Engine.Instance.RequestStop();
            return(true);
        }
Пример #7
0
        public bool NetworkLockKnowledge()
        {
            string msg = LanguageManager.GetText("NetworkLockWarning");

            return(GuiUtils.MessageYesNo(msg));
        }
Пример #8
0
        public bool NetworkLockKnowledge()
        {
            string msg = Messages.NetworkLockWarning;

            return(GuiUtils.MessageYesNo(msg));
        }