Пример #1
0
        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
        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");
            // fallback for old settings
            XMLSettings.UseUPnP = bool.Parse((!string.IsNullOrEmpty(XMLSettings.ReadValue("UseUPnP"))) ? XMLSettings.ReadValue("UseUPnP") : "False");

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