Exemple #1
0
        private void FormSetting_Load(object sender, EventArgs e)
        {
            YoponSetting.Load();

            var options = YoponSetting.I;

            checkBox1.Checked = options.HasBlockIllegalAction;
            checkBox2.Checked = options.HasSaveChatLog;
            checkBox3.Checked = options.HasSaveSlashMessage;
            checkBox4.Checked = options.HasProcessFormat;
            checkBox5.Checked = options.HideSandboxError;
            textBox1.Text     = options.LogFormat;
        }
Exemple #2
0
        public static void Load()
        {
            if (File.Exists(ConfigFile))
            {
                System.IO.Directory.CreateDirectory(Directory);
                var serializer = new XmlSerializer <YoponSetting>();
                I = serializer.Deserialize(ConfigFile);
            }

            if (I == null)
            {
                I = new YoponSetting();
            }
        }
Exemple #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            var options = YoponSetting.I;

            options.HasBlockIllegalAction = checkBox1.Checked;
            options.HasSaveChatLog        = checkBox2.Checked;
            options.HasSaveSlashMessage   = checkBox3.Checked;
            options.HasProcessFormat      = checkBox4.Checked;
            options.HideSandboxError      = checkBox5.Checked;
            options.LogFormat             = textBox1.Text;

            YoponSetting.Save();

            if (sender != null)
            {
                Close();
            }
        }
Exemple #4
0
 private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     YoponSetting.Save();
 }