Exemplo n.º 1
0
        public Form1()
        {
            string startServer      = ConfigurationManager.AppSettings["startServer"].ToString();
            string automaticBackups = ConfigurationManager.AppSettings["automaticBackups"].ToString();

            Lists lists = new Lists();

            AppDomain.CurrentDomain.ProcessExit += new EventHandler(OnProcessExit);
            fpTextBoxCallback = new fpTextBoxCallback_t(AddTextToOutputTextBox);
            InitializeComponent();
            _Form1 = this;


            System.Windows.Forms.Timer timer = new System.Windows.Forms.Timer();
            timer.Tick    += new EventHandler(timer_Tick);
            timer.Interval = (5000) * (1);
            timer.Enabled  = true;
            timer.Start();

            //dateTimePicker1.Text = date;

            //Fill Listboxes on form
            List <string> weatherList  = lists.WeatherList();
            List <string> gameRuleList = lists.GameRuleList();


            if (startServer == "true")
            {
                startServerCheckbox.Checked = true;
            }

            if (automaticBackups == "true")
            {
                int backupInterval = Convert.ToInt32(ConfigurationManager.AppSettings["backupInterval"]);
                automaticBackupsCheckBox.Checked = true;
                //SetUpTimer();
                backupLabel.Text = "Backup Interval: " + backupInterval + " Minutes";
                BackupTimer(backupInterval);
            }

            weatherComboBox.DataSource = weatherList;

            gameRuleComboBox.DataSource = gameRuleList;

            if (startServer == "true")
            {
                startServerButton_Click(null, EventArgs.Empty);
            }
        } // End Constructor
Exemplo n.º 2
0
        public Form1()
        {
            string startServer      = ConfigurationManager.AppSettings["startServer"].ToString();
            string automaticBackups = ConfigurationManager.AppSettings["automaticBackups"].ToString();
            string date             = ConfigurationManager.AppSettings["dateTime"].ToString();

            //DateTime dt = Convert.ToDateTime(DateTime.Now, System.Globalization.CultureInfo.CreateSpecificCulture("en-us").DateTimeFormat);



            CheckForIllegalCrossThreadCalls      = false;
            AppDomain.CurrentDomain.ProcessExit += new EventHandler(OnProcessExit);
            fpTextBoxCallback = new fpTextBoxCallback_t(AddTextToOutputTextBox);
            InitializeComponent();

            System.Windows.Forms.Timer timer = new System.Windows.Forms.Timer();
            timer.Tick    += new EventHandler(timer_Tick);
            timer.Interval = (5000) * (1);
            timer.Enabled  = true;
            timer.Start();

            dateTimePicker1.Text = date;
            List <string> weatherList = new List <string>();

            weatherList.Add("clear");
            weatherList.Add("rain");
            weatherList.Add("thunder");

            List <string> gameRuleList = new List <string>();

            gameRuleList.Add("commandblockoutput");
            gameRuleList.Add("commandblocksenabled");
            gameRuleList.Add("dodaylightcycle");
            gameRuleList.Add("doentitydrops");
            gameRuleList.Add("dofiretick");
            gameRuleList.Add("doimmediaterespawn");
            gameRuleList.Add("doinsomnia");
            gameRuleList.Add("domobloot");
            gameRuleList.Add("domobspawning");
            gameRuleList.Add("dotiledrops");
            gameRuleList.Add("doweathercycle");
            gameRuleList.Add("drowningdamage");
            gameRuleList.Add("falldamage");
            gameRuleList.Add("firedamage");
            //gameRuleList.Add("functioncommandlimit");
            gameRuleList.Add("keepinventory");
            //gameRuleList.Add("maxcommandchainlength");
            gameRuleList.Add("mobgriefing");
            gameRuleList.Add("naturalregeneration");
            gameRuleList.Add("pvp");
            //gameRuleList.Add("randomtickspeed");
            gameRuleList.Add("sendcommandfeedback");
            gameRuleList.Add("showcoordinates");
            gameRuleList.Add("showdeathmessages");
            gameRuleList.Add("tntexplodes");

            if (startServer == "true")
            {
                startServerCheckbox.Checked = true;
            }

            if (automaticBackups == "true")
            {
                automaticBackupsCheckBox.Checked = true;
                SetUpTimer();
            }

            weatherComboBox.DataSource = weatherList;

            gameRuleComboBox.DataSource = gameRuleList;

            if (startServer == "true")
            {
                startServerButton_Click(null, EventArgs.Empty);
            }
        } // End Constructor
Exemplo n.º 3
0
 public Form1()
 {
     fpTextBoxCallback = new fpTextBoxCallback_t(AddTextToOutputTextBox);
     InitializeComponent();
 }
Exemplo n.º 4
0
 public Form1()
 {
     fpTextBoxCallback = new fpTextBoxCallback_t(AddTextToOutputTextBox);
     InitializeComponent();
 }