示例#1
0
        public void Initialize()
        {
            LocalOp local = new LocalOp();

            conf = local.LoadConfig();
            if (conf == null)
            {
                MessageBox.Show("New config will now be created.", "Failed to find config file.");
                local.DefaultConfig();
                conf = local.LoadConfig();
            }
        }
示例#2
0
 private void uxSubmit_Button_Click(object sender, EventArgs e)
 {
     if (!(uxUrl_TextBox.Text.Trim().Equals(conf.intServer.uri)) ||
         !(uxUsername_TextBox.Text.Trim().Equals(conf.intServer.username)) ||
         !(uxPassword_Textbox.Text.Trim().Equals(conf.intServer.password)))
     {
         MessageBox.Show("Change in settings detected, making adjustments now.");
         conf.intServer.uri      = uxUrl_TextBox.Text.Trim();
         conf.intServer.username = uxUsername_TextBox.Text.Trim();
         conf.intServer.password = uxPassword_Textbox.Text.Trim();
         LocalOp local = new LocalOp();
         local.SaveConfig(conf);
     }
     else
     {
         MessageBox.Show("No changes have been made.");
     }
     this.Close();
 }