Esempio n. 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(textBox1.Text) && !string.IsNullOrWhiteSpace(textBox1.Text) &&
                !string.IsNullOrEmpty(textBox2.Text) && !string.IsNullOrWhiteSpace(textBox2.Text))
            {
                udbc class1 = new udbc();

                ID0  = class1.Auth(textBox1.Text, textBox2.Text);
                Role = class1.Auth2(textBox1.Text, textBox2.Text);
                if (ID0 == true)
                {
                    Form MDI = new MDI();
                    MDI.Show();
                    this.Hide();
                }
                else
                {
                    MessageBox.Show("Ошибка входа!", "WARNING, CRITICAL ERROR!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
            else
            {
                MessageBox.Show("Fill all fields", "WARNING, CRITICAL ERROR!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Esempio n. 2
0
        private void button9_Click(object sender, EventArgs e)
        {
            int    wSize  = this.Size.Width;
            int    hSize  = this.Size.Height;
            int    tVal   = trackBar1.Value;
            string lText  = openedFile;
            udbc   class1 = new udbc();

            class1.IniAdd(wSize, hSize, tVal, lText);
        }
Esempio n. 3
0
        private void button10_Click(object sender, EventArgs e)
        {
            udbc   class1 = new udbc();
            int    wSizeL = class1.ReadWidth();
            int    hSizeL = class1.ReadHeight();
            int    tValL  = class1.ReadLen();
            string lTextL = class1.ReadText();

            Width           = wSizeL;
            Height          = hSizeL;
            trackBar1.Value = tValL;
            string content = class1.OpenText(lTextL);

            richTextBox1.Text = content;
        }
Esempio n. 4
0
 private void button8_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(domainUpDown1.Text) && !string.IsNullOrWhiteSpace(domainUpDown1.Text))
     {
         try
         {
             udbc class1 = new udbc();
             openedFile = domainUpDown1.Text;
             string content = class1.OpenText(openedFile);
             richTextBox1.Text = content;
         }
         catch
         {
             MessageBox.Show("Ошибка!", "WARNING, CRITICAL ERROR!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
             richTextBox1.Text = "";
         }
     }
     else
     {
         MessageBox.Show("Выбирите текст!", "WARNING, CRITICAL ERROR!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }