Example #1
0
        bool RefreshSettings()
        {
            logger.write("Refreshing settings..");

            bool settingsWrited = settings.write();

            if (!settingsWrited)
            {
                logger.write("Couldn't write settings");
            }
            else
            {
                bool netMonStarted = NetFilterWrap.NetMonIsStarted(netMon);
                if (NetFilterWrap.NetMonIsStarted(netMon))
                {
                    NetFilterWrap.NetMonRefreshSetting(netMon);
                    logger.write("Settings has been refreshed..");
                }
                else
                {
                    logger.write("Netfilter is not started..");
                }
            }

            return(settingsWrited);
        }
Example #2
0
        void StopNetfilter()
        {
            if (NetFilterWrap.NetMonIsStarted(netMon))
            {
                NetFilterWrap.NetMonStop(netMon);
                updateFormItems(NetFilterStatus.Stopped);

                logger.write("Netfilter has been stopped..");
            }
            else
            {
                logger.write("Netfilter is not started..");
            }
        }