Ejemplo n.º 1
0
        private void Landing_Load(object sender, EventArgs e)
        {
            // Create a new configuration for NLog
            LoggingConfiguration NewConfig = new LoggingConfiguration();

            // Add new rules for logging into specific places
            NewConfig.AddRule(LogLevel.Debug, LogLevel.Fatal, new TextBoxTarget()
            {
                Layout = "[${date}] [${level}] ${message}"
            });
            NewConfig.AddRule(LogLevel.Info, LogLevel.Fatal, new BottomStripTarget()
            {
                Layout = "${message}"
            });
            // Set the already created configuration
            LogManager.Configuration = NewConfig;
            // Update the list of builds, folders and resources
            BuildManager.Refresh();
            DataFolderManager.Refresh();
            ResourceManager.Refresh();
            // And filll the Builds and Data folders
            BuildsListBox.Fill(BuildManager.Builds, true);
            DataBox.Fill(DataFolderManager.Folders, true);
            InstallerListBox.Fill(ResourceManager.Resources);
            // Set the elements to unlocked
            Locked = false;
            // Load the RTF text
            AboutRichTextBox.Rtf = Resources.About;

            // Tell the Web Clients to use TLS 1.2 instead of SSL3
            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
        }
Ejemplo n.º 2
0
        private async void CreateItem_Click(object sender, EventArgs e)
        {
            // Create the new form
            Creator CreatorForm = new Creator();

            // Show the form as a dialog
            CreatorForm.ShowDialog();
            // Finally, dispose the dialog
            CreatorForm.Dispose();

            // If there is a valid server data folder
            if (CreatorForm.NewDataFolder != null)
            {
                // Lock the fields
                Locked = true;
                // Task the Data Folder to recreate itself
                await CreatorForm.NewDataFolder.Recreate(CreatorForm.RCONTextBox.Text, CreatorForm.SHVCheckBox.Checked);

                // Update the fields
                DataFolderManager.Refresh();
                DataBox.Fill(DataFolderManager.Folders);
                // And select the new item
                DataBox.SelectedItem = CreatorForm.NewDataFolder;
                // Then unlock the fields
                Locked = false;
            }
        }
Ejemplo n.º 3
0
 private void FolderRefreshButton_Click(object sender, EventArgs e)
 {
     // Refresh the folders of data
     DataFolderManager.Refresh();
     DataBox.Fill(DataFolderManager.Folders);
 }