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));
        }