コード例 #1
0
ファイル: Form1.cs プロジェクト: Darooks/BSK-Serpent-RSA
        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);
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: Darooks/BSK-Serpent-RSA
        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);
        }