コード例 #1
0
        public MainForm()
        {
            InitializeComponent();
            FormHolder.MainForm  = this;
            _historyPresentation = new HistoryPresentation();
            _historyPresentation.Deserialize();
            _manuButtons = new Dictionary <Label, Panel>
            {
                { encodersLabel, encodersPanel },
                { theoryLabel, theoryPanel },
                { aboutLabel, aboutPanel },
                { exitLabel, exitPanel }
            }.ToList();

            _manuButtons.ForEach(x =>
            {
                x.Value.Hide();

                x.Key.MouseEnter += (s, e) => LabelMouseEnter(x);

                x.Key.MouseLeave += (s, e) => LabelMouseLeave(x);
            });

            label3.Text = GlobalConfigurations.Version;

            label2.Visible = GlobalConfigurations.VersionType == VersionType.Beta;
        }
コード例 #2
0
        public HistoryAnswerControl(string name, Guid guid, IHistoryPresentation historyPresentation)
        {
            InitializeComponent();

            _name = name;
            _guid = guid;
            _historyPresentation = historyPresentation;

            Init();
        }
コード例 #3
0
        public HistoryCoddingControl(string name, IHistoryPresentation historyPresentation, EncodersForm encodersForm)
        {
            InitializeComponent();

            _name                = name;
            _encodersForm        = encodersForm;
            _historyPresentation = historyPresentation;

            Init();
        }
コード例 #4
0
 public CaesarControl(CodingType codingType, DecodeEncodeControl encodersForm)
 {
     InitializeComponent();
     _guid = Guid.NewGuid();
     _historyPresentation  = new HistoryPresentation();
     _questionCount        = 0;
     _correctQuestionCount = 0;
     _codingType           = codingType;
     _mainPresentation     = new MainPresentation();
     _encodersForm         = encodersForm;
     Init();
 }
コード例 #5
0
        public SHA1Control(EncodersForm encodersForm)
        {
            InitializeComponent();
            _guid = Guid.NewGuid();
            _historyPresentation  = new HistoryPresentation();
            _questionCount        = 0;
            _correctQuestionCount = 0;

            _mainPresentation = new MainPresentation();
            _encodersForm     = encodersForm;
            Init();
        }
コード例 #6
0
        //  private static Random _random = new Random();

        public DiffiHelmanControl(EncodersForm encodersForm)
        {
            InitializeComponent();
            _historyPresentation = new HistoryPresentation();
            _guid                 = Guid.NewGuid();
            _countQuestion        = 0;
            _countCorrectQuestion = 0;
            //  _codingType = codingType;
            _mainPresentation = new MainPresentation();
            _encodersForm     = encodersForm;

            Init();
        }
コード例 #7
0
        //  private static Random _random = new Random();

        public RSAControl(CodingType codingType, DecodeEncodeControl encodersForm)
        {
            InitializeComponent();
            _historyPresentation = new HistoryPresentation();
            _guid                 = Guid.NewGuid();
            _countQuestion        = 0;
            _countCorrectQuestion = 0;
            _codingType           = codingType;
            tbE.Text              = "5";
            _mainPresentation     = new MainPresentation();
            _encodersForm         = encodersForm;

            Init();
        }
コード例 #8
0
        public EncodersForm()
        {
            InitializeComponent();
            _currentTask = 0;
            FormClosing += SwitсhToMain;
            splitContainer1.SplitterMoved += ChangeSize;
            Resize += ChangeSize;
            _historyPresentation = new HistoryPresentation();
            _historyPresentation.Deserialize();
            Init();
            var year = DateTime.Now.Year;

            yearLbl.Text = year.ToString();

            Load += ChangeSize;
            tabControl1.Click += ChangeSize;
            comboBoxEncoding.SelectedIndexChanged += ChangeSize;
        }