NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
using System.Diagnostics;
using System.Runtime.InteropServices;

namespace smart
{

public partial class Form1 : Form
{
public const int WM_NCLBUTTONDOWN = 0xA1;
public const int HTCAPTION = 0x2;

[DllImport("User32.dll")]
public static extern bool ReleaseCapture();

[DllImport("User32.dll")]
public static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam);
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{
img_kontroller.Start();
img_kontroller.Start();
pictureBox1.Visible = (false);
dosyalar.Visible = (false);
bunifuCards2.Visible = (false);
port_kontroller.Start();
label4.Text = Properties.Settings.Default.kayit_yeri;
if (label4.Text == "")
{
label3.Visible = (true);
label4.Visible = (false);
}
else
{
label4.Visible = (true);
label3.Visible = (false);
label5.Visible = (true);
}
kullanici_ayarlari.Visible = (false);
this.TransparencyKey = Color.FromArgb(165, 165, 165);
this.BackColor = Color.FromArgb(165, 165, 165);
}

private void BunifuCards1_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
ReleaseCapture();
SendMessage(Handle, WM_NCLBUTTONDOWN, HTCAPTION, 0);
}
}

private void Label3_Click(object sender, EventArgs e)
{
FolderBrowserDialog kayit_yerisecim = new FolderBrowserDialog();
kayit_yerisecim.ShowDialog();
Properties.Settings.Default.kayit_yeri = kayit_yerisecim.SelectedPath;
Properties.Settings.Default.Save();
label3.Text = Properties.Settings.Default.kayit_yeri;
label4.Text = Properties.Settings.Default.kayit_yeri;
if (label4.Text == "")
{
label3.Visible = (true);
label4.Visible = (false);
}
else
{
label4.Visible = (true);
label3.Visible = (false);
label5.Visible = (true);
Directory.CreateDirectory(Properties.Settings.Default.kayit_yeri + "\STSYedekler");
}
}

private void BunifuCards1_Paint(object sender, PaintEventArgs e)
{

}

private void BunifuThinButton23_Click(object sender, EventArgs e)
{
kullanici_ayarlari.Visible = (true);
disk_bulma.Visible = (false);
}

private void BunifuThinButton22_Click(object sender, EventArgs e)
{
kullanici_ayarlari.Visible = (false);
disk_bulma.Visible = (true);
}

private void BunifuThinButton21_Click(object sender, EventArgs e)
{
kullanici_ayarlari.Visible = (false);
disk_bulma.Visible = (false);
}

private void FolderBrowserDialog1_HelpRequest(object sender, EventArgs e)
{

}

private void Label5_Click(object sender, EventArgs e)
{

FolderBrowserDialog kayit_yerisecim = new FolderBrowserDialog();
kayit_yerisecim.ShowDialog();
Properties.Settings.Default.kayit_yeri = kayit_yerisecim.SelectedPath;
Properties.Settings.Default.Save();
label3.Text = Properties.Settings.Default.kayit_yeri;
label4.Text = Properties.Settings.Default.kayit_yeri;
if (label4.Text == "")
{
label3.Visible = (true);
label4.Visible = (false);
}
else
{
label4.Visible = (true);
label3.Visible = (false);
label5.Visible = (true);
Directory.CreateDirectory(Properties.Settings.Default.kayit_yeri + "\STSYedekler");
}
}

private void Timer1_Tick(object sender, EventArgs e)
{
foreach (DriveInfo surucu in DriveInfo.GetDrives())
{
if (surucu.DriveType == DriveType.Removable)
{
bos_alan.Text = ("" + surucu.AvailableFreeSpace + " Byte");
disk_model.Text = surucu.Name;
}
}
}

private void BunifuThinButton24_Click(object sender, EventArgs e)
{
Application.Exit();
}

private void BunifuThinButton25_Click(object sender, EventArgs e)
{
bunifuCards2.Visible = (false);

}

private void BunifuThinButton26_Click(object sender, EventArgs e)
{
bunifuCards2.Visible = (true);
}
private void BunifuThinButton27_Click(object sender, EventArgs e)
{
if (disk_model.Text != "Sürücü Bulunamadı")
{
MessageBox.Show("Sürücü Bulundu, İçerisindekiler Çekiliyor...", "STSYedek");
dosyalar.Visible = (true);
string[] dizindekiKlasorler = Directory.GetDirectories(disk_model.Text + "\");
string[] dizindekiDosyalar = Directory.GetFiles(disk_model.Text + "\");

foreach (string klasor in dizindekiKlasorler)
{
DirectoryInfo dirInfo = new DirectoryInfo(klasor);
string klasorAdi = dirInfo.Name;
DateTime olsTarihi = dirInfo.CreationTime;
ListViewItem item = new ListViewItem(klasorAdi);
item.SubItems.Add("Klasör");
item.SubItems.Add("");
item.SubItems.Add(olsTarihi.ToString("dd.MM.yyyy HH:mm"));
dosyalar.Items.Add(item);
}
foreach (string dosya in dizindekiDosyalar)
{
DirectoryInfo dirinfo = new DirectoryInfo(dosya);
string dosyaadi = dirinfo.Name;
DateTime olsTarihi = dirinfo.CreationTime;
ListViewItem item = new ListViewItem(dosyaadi);
item.SubItems.Add("Dosya");
dosyalar.Items.Add(item);
}
}
else
{
MessageBox.Show("Takılı Bir Sürücü Yok !", "STSYedek");
}
}

private void İmg_kontroller_Tick(object sender, EventArgs e)
{
if (disk_model.Text == "D:\")
{
pictureBox1.Visible = (true);
}
}

private void Secileni_alma_Click(object sender, EventArgs e)
{
}

private void BunifuThinButton28_Click(object sender, EventArgs e)
{
if (disk_model.Text != "Sürücü Bulunamadı")
{
MessageBox.Show("Sürücüdeki Veriler Yedekleniyor...", "STSYedek");
if (disk_model.Text == "D:\")
{
Kopyala("D:\", label4.Text + "\STSYedekler", true);
}
if (disk_model.Text == "F:\")
{
Kopyala("F:\", label4.Text + "\STSYedekler", true);
}
if (disk_model.Text == "G:\")
{
Kopyala("G:\", label4.Text + "\STSYedekler", true);
}
}
else
{
MessageBox.Show("Takılı Bir Sürücü Bulunamadı !", "STSYedek");
}
}
protected void Kopyala(string Prmt1, string prmt2, bool prmt3)
{
DirectoryInfo DrInf = new DirectoryInfo(Prmt1);
DirectoryInfo[] DrInfLst = DrInf.GetDirectories();
if (!Directory.Exists(prmt2))
{
Directory.CreateDirectory(prmt2);
}
FileInfo[] dosya = DrInf.GetFiles();
string path1 = "";
foreach (FileInfo FFF in dosya)
{
path1 = Path.Combine(prmt2, FFF.Name);
FFF.CopyTo(path1, false);
}
if (true)
{
foreach (DirectoryInfo bilgi in DrInfLst)
{
path1 = Path.Combine(prmt2, bilgi.Name);
Kopyala(bilgi.FullName, path1, true);
}
}
}

private void dosyalar_SelectedValueChanged(object sender, EventArgs e)
{

}

private void Pb_islemleri_Tick(object sender, EventArgs e)
{
}

private void Pb_islemleri_islem_34_Tick(object sender, EventArgs e)
{
}

private void Reboot_Click(object sender, EventArgs e)
{

}
}
}




     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.