Example #1
0
        private void zapisdoinstall()
        {
            //zapis do install.bat
            string[] lines     = System.IO.File.ReadAllLines(form.pracovnislozka + @"\konfigurace\install.bat");
            string   allString = "";
            string   v         = @"net use a: \\" + Ulti.GetLocalIPAddress() + @"\windows /user:"******" " + '"' + textBox3 + '"';

            lines[17] = v;
            for (int i = 0; i < lines.Length; i++)
            {
                allString += lines[i] + "\n";
            }
            System.IO.File.WriteAllText(form.pracovnislozka + @"\konfigurace\install.bat", allString);
        }
Example #2
0
 private void button3_Click(object sender, EventArgs e)
 {
     if (debug == true)
     {
         label9.Text       = Ulti.GetLocalIPAddress();
         this.Size         = new Size(980, 500);//Proc
         groupBox1.Visible = true;
         debug             = false;
         NastaveniBuhviceho();
     }
     else
     {
         this.Size         = new Size(980, 350);//???????
         groupBox1.Visible = false;
         debug             = true;
     }
 }
Example #3
0
        public Form1()
        {
            InitializeComponent();
            label1.Text     = pracovnislozka;
            label12.Text    = $@"\\{Ulti.GetLocalIPAddress()}\windows";
            textBox1.Text   = Ulti.GetLocalIPAddress();
            label19.Visible = false;
            ulti            = new Ulti(this);

            path1 = @"./programy";  //adressa pro .bat kopirovani start
            path2 = @"./programy2"; //adressa pro kopirovani konec-cil
            string[] dirs = Directory.GetFiles(@"./programy", "*.bat");
            checkedListBox1.Items.Clear();
            foreach (string item in dirs)
            {
                string va = Path.GetFileName(item);
                checkedListBox1.Items.Add(va);
            }
        }
Example #4
0
 private void NastaveniBuhviceho()//prejmenovat a zkontrolovat mezery
 {
     label16.Text = $@"net share windows={pracovnislozka}\soubory\files\windows /grant:{textBox2.Text},READ /users:{numericUpDown1.Value}";
     label18.Text = $@"net use a: \\{Ulti.GetLocalIPAddress()}\windows /user:{textBox2.Text}" + '"' + "<vaseheslo>" + '"';
 }
Example #5
0
 private void button4_Click(object sender, EventArgs e)
 {
     label9.Text = Ulti.GetLocalIPAddress();
     NastaveniBuhviceho();
 }
Example #6
0
 private void button6_Click(object sender, EventArgs e)
 {
     textBox1.Text = Ulti.GetLocalIPAddress();
 }
Example #7
0
 private void button5_Click(object sender, EventArgs e)
 {
     label12.Text = @"\\" + Ulti.GetLocalIPAddress() + @"\windows";
 }