Exemple #1
0
        void AyarKaydet()
        {
            Ayarlar a = new Ayarlar();

            a.RenkOne = RenkOne;
            a.RenkZero = RenkZero;
            a.RenkQuestion = RenkQuestion;

            a.W0 = txtW0.Text;
            a.W1 = txtW1.Text;
            a.W2 = txtW2.Text;
            a.W3 = txtW3.Text;

            a.O0 = txtO0.Text;
            a.O1 = txtO1.Text;
            a.O2 = txtO2.Text;
            a.O3 = txtO3.Text;

            a.RotW = nupRotW.Value;
            a.RotO = nupRotO.Value;
            a.SBox = nupSbox.Value;

            a.AOT = chkAOT.Checked;

            a.Log = dbg.ReadAllDebug();

            string[] strAutoOpList = new string[lstAutoOpList.Items.Count];
            for (int i = 0; i < strAutoOpList.Length; i++)
                strAutoOpList[i] = lstAutoOpList.Items[i].ToString();

            a.AutoOpList = strAutoOpList;

            AyarlarTools.DosyayaAyarKaydet(a);
        }
Exemple #2
0
        void AyarYukle()
        {
            Ayarlar a = AyarlarTools.DosyadanAyarYukle();

            RenkOne      = a.RenkOne;
            RenkZero     = a.RenkZero;
            RenkQuestion = a.RenkQuestion;

            txtW0.Text = a.W0;
            txtW1.Text = a.W1;
            txtW2.Text = a.W2;
            txtW3.Text = a.W3;

            txtO0.Text = a.O0;
            txtO1.Text = a.O1;
            txtO2.Text = a.O2;
            txtO3.Text = a.O3;

            nupRotW.Value = a.RotW;
            nupRotO.Value = a.RotO;
            nupSbox.Value = a.SBox;

            chkAOT.Checked = a.AOT;

            lstAutoOpList.Items.Clear();
            for (int i = 0; i < a.AutoOpList.Length; i++)
            {
                lstAutoOpList.Items.Add(a.AutoOpList[i]);
            }


            dbg.ClearDebug();
            dbg.Write(a.Log);
        }
Exemple #3
0
        public static bool DosyayaAyarKaydet(Ayarlar a)
        {
            FileStream fs = new FileStream(Dosya, FileMode.Create);

            try
            {
                bf.Serialize(fs, a);
                fs.Close();
                return(true);
            }
            catch
            {
                fs.Close();
                return(false);
            }
        }
Exemple #4
0
        void AyarKaydet()
        {
            Ayarlar a = new Ayarlar();

            a.RenkOne      = RenkOne;
            a.RenkZero     = RenkZero;
            a.RenkQuestion = RenkQuestion;

            a.W0 = txtW0.Text;
            a.W1 = txtW1.Text;
            a.W2 = txtW2.Text;
            a.W3 = txtW3.Text;

            a.O0 = txtO0.Text;
            a.O1 = txtO1.Text;
            a.O2 = txtO2.Text;
            a.O3 = txtO3.Text;

            a.RotW = nupRotW.Value;
            a.RotO = nupRotO.Value;
            a.SBox = nupSbox.Value;

            a.AOT = chkAOT.Checked;

            a.Log = dbg.ReadAllDebug();

            string[] strAutoOpList = new string[lstAutoOpList.Items.Count];
            for (int i = 0; i < strAutoOpList.Length; i++)
            {
                strAutoOpList[i] = lstAutoOpList.Items[i].ToString();
            }

            a.AutoOpList = strAutoOpList;

            AyarlarTools.DosyayaAyarKaydet(a);
        }
Exemple #5
0
 public static bool DosyayaAyarKaydet(Ayarlar a)
 {
     FileStream fs = new FileStream(Dosya, FileMode.Create);
     try
     {
         bf.Serialize(fs, a);
         fs.Close();
         return true;
     }
     catch
     {
         fs.Close();
         return false;
     }
 }