示例#1
0
文件: frmMain.cs 项目: cr4ck32/xRAT
        public frmMain()
        {
            XMLSettings.WriteDefaultSettings();

            XMLSettings.ListenPort = ushort.Parse(XMLSettings.ReadValue("ListenPort"));
            XMLSettings.AutoListen = bool.Parse(XMLSettings.ReadValue("AutoListen"));
            XMLSettings.ShowPopup  = bool.Parse(XMLSettings.ReadValue("ShowPopup"));
            XMLSettings.Password   = XMLSettings.ReadValue("Password");

            if (bool.Parse(XMLSettings.ReadValue("ShowToU")))
            {
                using (var frm = new frmTermsOfUse())
                {
                    frm.ShowDialog();
                }
                Thread.Sleep(300);
            }

            InitializeComponent();

            this.Menu = mainMenu;

            lvwColumnSorter = new ListViewColumnSorter();
            lstClients.ListViewItemSorter = lvwColumnSorter;

            ListViewExtensions.removeDots(lstClients);
            ListViewExtensions.changeTheme(lstClients);
        }
示例#2
0
        private void ReadSettings(bool writeIfNotExist = true)
        {
            if (writeIfNotExist)
            {
                XMLSettings.WriteDefaultSettings();
            }

            XMLSettings.ListenPort = ushort.Parse(XMLSettings.ReadValue("ListenPort"));
            XMLSettings.ShowToU    = bool.Parse(XMLSettings.ReadValue("ShowToU"));
            XMLSettings.AutoListen = bool.Parse(XMLSettings.ReadValue("AutoListen"));
            XMLSettings.ShowPopup  = bool.Parse(XMLSettings.ReadValue("ShowPopup"));
            XMLSettings.UseUPnP    = bool.Parse(XMLSettings.ReadValue("UseUPnP"));
            XMLSettings.Password   = XMLSettings.ReadValue("Password");
        }
示例#3
0
文件: FrmMain.cs 项目: yhz9999/xRAT
        private void ReadSettings(bool writeIfNotExist = true)
        {
            if (writeIfNotExist)
            {
                XMLSettings.WriteDefaultSettings();
            }

            XMLSettings.ListenPort  = ushort.Parse(XMLSettings.ReadValue("ListenPort"));
            XMLSettings.ShowToU     = bool.Parse(XMLSettings.ReadValue("ShowToU"));
            XMLSettings.AutoListen  = bool.Parse(XMLSettings.ReadValue("AutoListen"));
            XMLSettings.ShowPopup   = bool.Parse(XMLSettings.ReadValue("ShowPopup"));
            XMLSettings.UseUPnP     = bool.Parse(XMLSettings.ReadValue("UseUPnP"));
            XMLSettings.ShowToolTip =
                bool.Parse(!string.IsNullOrEmpty(XMLSettings.ReadValue("ShowToolTip"))
                    ? XMLSettings.ReadValue("ShowToolTip")
                    : "False"); //fallback
            XMLSettings.Password = XMLSettings.ReadValue("Password");
        }
示例#4
0
        private void ReadSettings(bool writeIfNotExist = true)
        {
            if (writeIfNotExist)
            {
                XMLSettings.WriteDefaultSettings();
            }

            XMLSettings.ListenPort = ushort.Parse(XMLSettings.ReadValue("ListenPort"));
            XMLSettings.ShowToU    = bool.Parse(XMLSettings.ReadValue("ShowToU"));
            XMLSettings.AutoListen = bool.Parse(XMLSettings.ReadValue("AutoListen"));
            XMLSettings.ShowPopup  = bool.Parse(XMLSettings.ReadValue("ShowPopup"));
            XMLSettings.UseUPnP    = bool.Parse(XMLSettings.ReadValue("UseUPnP"));

            XMLSettings.ShowToolTip   = bool.Parse(XMLSettings.ReadValueSafe("ShowToolTip", "False"));
            XMLSettings.IntegrateNoIP = bool.Parse(XMLSettings.ReadValueSafe("EnableNoIPUpdater", "False"));
            XMLSettings.NoIPHost      = XMLSettings.ReadValueSafe("NoIPHost");
            XMLSettings.NoIPUsername  = XMLSettings.ReadValueSafe("NoIPUsername");
            XMLSettings.NoIPPassword  = XMLSettings.ReadValueSafe("NoIPPassword");

            XMLSettings.Password = XMLSettings.ReadValue("Password");
        }