Exemplo n.º 1
0
        private void frmCamera_Load(object sender, EventArgs e)
        {
            // Init GUI

            // reset button colors
            foreach (var b in _btIndex)
            {
                b.BackColor = c_vPassive;
            }
            foreach (var b in _btMode)
            {
                b.Value.Button.BackColor = c_vPassive;
            }
            foreach (var b in _btSlotFolder)
            {
                b.ForeColor = c_sfPassive;
            }

            // Load AppSettings A..F - clumsy but the settings are by SlotFolder and not all in one
            SlotCat.SlotFolders[0].AppSettingString = AppSettings.Instance.CameraSlotFolder0;
            SlotCat.SlotFolders[1].AppSettingString = AppSettings.Instance.CameraSlotFolder1;
            SlotCat.SlotFolders[2].AppSettingString = AppSettings.Instance.CameraSlotFolder2;
            SlotCat.SlotFolders[3].AppSettingString = AppSettings.Instance.CameraSlotFolder3;
            SlotCat.SlotFolders[4].AppSettingString = AppSettings.Instance.CameraSlotFolder4;
            SlotCat.SlotFolders[5].AppSettingString = AppSettings.Instance.CameraSlotFolder5;
            // Enable SlotFolder A
            SlotCat.SetActiveSlotFolder(0);
            _btSlotFolder[SlotCat.CurrentSlotFolder.SlotFolderNo].ForeColor = c_sfActive;

            lblSaveStar.Visible = false;
        }
Exemplo n.º 2
0
        // Make a SlotFolder current
        private void btSlotFolder_Click(object sender, EventArgs e)
        {
            if (!(sender is Button))
            {
                return;
            }

            var bt    = sender as Button;
            var index = _btSlotFolder.FindIndex(x => x.Name == bt.Name);

            if (index >= 0)
            {
                _btSlotFolder[SlotCat.CurrentSlotFolder.SlotFolderNo].ForeColor = c_sfPassive;
                SlotCat.SetActiveSlotFolder((uint)index);
                _btSlotFolder[SlotCat.CurrentSlotFolder.SlotFolderNo].ForeColor = c_sfActive;
            }
        }