You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.5 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace RecognitionTools
{
public partial class keySet : Form
{
public keySet()
{
InitializeComponent();
}
private bool isMoreOpen = false;
private void button1_Click(object sender, EventArgs e)
{
ServerHandler.WriteAppConfig("apikey", txtApiKey.Text);
ServerHandler.WriteAppConfig("secretkey", txtSecrit.Text);
}
private void keySet_Load(object sender, EventArgs e)
{
this.btnShowMore.Hide();
this.Size = new Size(346,142);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
txtApiKey.Text = ServerHandler.ReadAppConfig("apikey");
txtSecrit.Text = ServerHandler.ReadAppConfig("secretkey");
}
private void button2_Click(object sender, EventArgs e)
{
this.Close();
}
private void btnShowMore_Click(object sender, EventArgs e)
{
if (isMoreOpen)
{
Size s = this.Size;
this.Size = new Size(336, 132);
}
else
{
Size s = this.Size;
this.Size = new Size(336, 328);
}
isMoreOpen = !isMoreOpen;
}
}
}