示例#1
0
        private void Settings_Load(object sender, EventArgs e)
        {
            sc = ((Form1)Owner).sc;
            om = ((Form1)Owner).om;

            LoadHotKey(Shortcuts.SC_Type.SC_Type_Reset, cbScReset, txtReset);
            LoadHotKey(Shortcuts.SC_Type.SC_Type_Hit, cbScHit, txtHit);
            LoadHotKey(Shortcuts.SC_Type.SC_Type_HitUndo, cbScHitUndo, txtHitUndo);
            LoadHotKey(Shortcuts.SC_Type.SC_Type_WayHit, cbScWayHit, txtWayHit);
            LoadHotKey(Shortcuts.SC_Type.SC_Type_WayHitUndo, cbScWayHitUndo, txtWayHitUndo);
            LoadHotKey(Shortcuts.SC_Type.SC_Type_Split, cbScNextSplit, txtNextSplit);
            LoadHotKey(Shortcuts.SC_Type.SC_Type_SplitPrev, cbScPrevSplit, txtPrevSplit);
            LoadHotKey(Shortcuts.SC_Type.SC_Type_PB, cbScPB, txtPB);

            radioHotKeyMethod_sync.Checked  = (sc.NextStart_Method == Shortcuts.SC_HotKeyMethod.SC_HotKeyMethod_Sync);
            radioHotKeyMethod_async.Checked = (sc.NextStart_Method == Shortcuts.SC_HotKeyMethod.SC_HotKeyMethod_Async);

            if (!sc.IsGlobalHotKeySupported)
            {
                tab_globalshortcuts.Text    = tab_globalshortcuts.Text + " (OS not supported)";
                tab_globalshortcuts.Enabled = false;
            }

            // Style
            numStyleDesiredWidth.Value   = om.StyleDesiredWidth;
            cbHighContrast.Checked       = om.StyleUseHighContrast;
            cbHighContrastNames.Checked  = om.StyleUseHighContrastNames;
            cbUseRoman.Checked           = om.StyleUseRoman;
            cbProgressBarColored.Checked = !om.StyleProgressBarColored;
            cbSuperscriptPB.Checked      = om.StyleSuperscriptPB;
            cbApCustomCss.Checked        = om.StyleUseCustom;
            txtCssUrl.Text   = om.StyleCssUrl;
            txtFontUrl.Text  = om.StyleFontUrl;
            txtFontName.Text = om.StyleFontName;

            // Behavior
            cbShowAttempts.Checked           = om.ShowAttemptsCounter;
            cbShowHeadline.Checked           = om.ShowHeadline;
            cbShowFooter.Checked             = om.ShowFooter;
            cbShowSessionProgress.Checked    = om.ShowSessionProgress;
            cbShowProgressBar.Checked        = om.ShowProgressBar;
            numShowSplitsCountFinished.Value = om.ShowSplitsCountFinished;
            numShowSplitsCountUpcoming.Value = om.ShowSplitsCountUpcoming;
            cbShowHitsCombined.Checked       = om.ShowHitsCombined;
            cbShowNumbers.Checked            = om.ShowNumbers;
            cbShowPB.Checked = om.ShowPB;
            radioPurposeChecklist.Checked        = (om.Purpose == OutModule.OM_Purpose.OM_Purpose_Checklist);
            radioPurposeDeathCounter.Checked     = (om.Purpose == OutModule.OM_Purpose.OM_Purpose_DeathCounter);
            radioPurposeSplitCounter.Checked     = (om.Purpose == OutModule.OM_Purpose.OM_Purpose_SplitCounter);
            radioSeverityBossHitCritical.Checked = (om.Severity == OutModule.OM_Severity.OM_Severity_BossHitCritical);
            radioSeverityComparePB.Checked       = (om.Severity == OutModule.OM_Severity.OM_Severity_ComparePB);
            radioSeverityAnyHitCritical.Checked  = (om.Severity == OutModule.OM_Severity.OM_Severity_AnyHitsCritical);

            // Filepaths
            txtInput.Text  = om.FilePathIn;
            txtOutput.Text = om.FilePathOut;

            ApplyAppearance(sender, null);
            IsFormLoaded = true;
        }
示例#2
0
        public Form1()
        {
            InitializeComponent();
            pi = DataGridView1; // for better capsulation
            om = new OutModule(pi);
            sc = new Shortcuts(Handle);

            ServicePointManager.Expect100Continue = true;
            ServicePointManager.SecurityProtocol  = SecurityProtocolType.Tls12;
            ServicePointManager.ServerCertificateValidationCallback += (sender2, certificate, chain, errors) => { return(true); };
        }
示例#3
0
        public ProfilesControl()
        {
            InitializeComponent();

            // Workaround: Should be done by designer but...
            //   - event is not showing up in the event list
            //   - when added by hand: changing anything in the designer a non-compileable method gets created (unspecified Tuple):
            //        public void ProfileTabPermuting(object sender, Tuple e)
            // Solution here: add event handler after the designer's code manually
            ptc.ProfileTabPermuting += ProfileTabPermuting;

            om = new OutModule(this);

            gpSuccession_Height = gpSuccession.Height; // remember expanded size from designer settings
            ShowSuccessionMenu(false);                 // start collapsed

            ptc.InitializeProfileTabControl();
        }
示例#4
0
        public Form1()
        {
            // The designer sometimes orders the control creation in an order
            // that would call event handlers already during initialization.
            // But not all variables are available yet, so we prevent access to them.
            gpSuccession_ValueChangedSema = true;
            InitializeComponent();
            gpSuccession_ValueChangedSema = false;

            gpSuccession_Height = gpSuccession.Height; // remember expanded size from designer settings

            pi = DataGridView1;                        // for better capsulation
            om = new OutModule(pi);
            sc = new Shortcuts(Handle);

            pi.ProfileChanged += DataGridView1_ProfileChanged;

            ServicePointManager.Expect100Continue = true;
            ServicePointManager.SecurityProtocol  = SecurityProtocolType.Tls12;
            ServicePointManager.ServerCertificateValidationCallback += (sender2, certificate, chain, errors) => { return(true); };
        }
示例#5
0
        private void Settings_Load(object sender, EventArgs e)
        {
            sc = ((Form1)Owner).sc;
            om = ((Form1)Owner).om;

            ShortcutsKey key;

            key = sc.Key_Get(Shortcuts.SC_Type.SC_Type_Reset);
            cbScReset.Checked = key.used;
            if (key.valid)
            {
                txtReset.Text = key.GetDescriptionString();
            }
            key             = sc.Key_Get(Shortcuts.SC_Type.SC_Type_Hit);
            cbScHit.Checked = key.used;
            if (key.valid)
            {
                txtHit.Text = key.GetDescriptionString();
            }
            key = sc.Key_Get(Shortcuts.SC_Type.SC_Type_HitUndo);
            cbScHitUndo.Checked = key.used;
            if (key.valid)
            {
                txtHitUndo.Text = key.GetDescriptionString();
            }
            key = sc.Key_Get(Shortcuts.SC_Type.SC_Type_Split);
            cbScNextSplit.Checked = key.used;
            if (key.valid)
            {
                txtNextSplit.Text = key.GetDescriptionString();
            }
            key = sc.Key_Get(Shortcuts.SC_Type.SC_Type_SplitPrev);
            cbScPrevSplit.Checked = key.used;
            if (key.valid)
            {
                txtPrevSplit.Text = key.GetDescriptionString();
            }

            txtInput.Text  = om.FilePathIn;
            txtOutput.Text = om.FilePathOut;

            radioHotKeyMethod_sync.Checked  = (sc.NextStart_Method == Shortcuts.SC_HotKeyMethod.SC_HotKeyMethod_Sync);
            radioHotKeyMethod_async.Checked = (sc.NextStart_Method == Shortcuts.SC_HotKeyMethod.SC_HotKeyMethod_Async);

            cbShowAttempts.Checked           = om.ShowAttemptsCounter;
            cbShowHeadline.Checked           = om.ShowHeadline;
            cbShowSessionProgress.Checked    = om.ShowSessionProgress;
            numShowSplitsCountFinished.Value = om.ShowSplitsCountFinished;
            numShowSplitsCountUpcoming.Value = om.ShowSplitsCountUpcoming;
            cbApCustomCss.Checked            = om.StyleUseCustom;
            txtCssUrl.Text             = om.StyleCssUrl;
            txtFontUrl.Text            = om.StyleFontUrl;
            txtFontName.Text           = om.StyleFontName;
            numStyleDesiredWidth.Value = om.StyleDesiredWidth;
            cbApHighContrast.Checked   = om.StyleUseHighContrast;

            if (!sc.IsGlobalHotKeySupported)
            {
                tab_globalshortcuts.Text    = tab_globalshortcuts.Text + " (OS not supported)";
                tab_globalshortcuts.Enabled = false;
            }

            IsFormLoaded = true;
        }
        private void Settings_Load(object sender, EventArgs e)
        {
            sc        = ((Form1)Owner).sc;
            om        = ((Form1)Owner).profCtrl.om;
            _settings = om.Settings;

            LoadHotKey(Shortcuts.SC_Type.SC_Type_Reset, cbScReset, txtReset);
            LoadHotKey(Shortcuts.SC_Type.SC_Type_Hit, cbScHit, txtHit);
            LoadHotKey(Shortcuts.SC_Type.SC_Type_HitUndo, cbScHitUndo, txtHitUndo);
            LoadHotKey(Shortcuts.SC_Type.SC_Type_WayHit, cbScWayHit, txtWayHit);
            LoadHotKey(Shortcuts.SC_Type.SC_Type_WayHitUndo, cbScWayHitUndo, txtWayHitUndo);
            LoadHotKey(Shortcuts.SC_Type.SC_Type_Split, cbScNextSplit, txtNextSplit);
            LoadHotKey(Shortcuts.SC_Type.SC_Type_SplitPrev, cbScPrevSplit, txtPrevSplit);
            LoadHotKey(Shortcuts.SC_Type.SC_Type_PB, cbScPB, txtPB);
            LoadHotKey(Shortcuts.SC_Type.SC_Type_TimerStart, cbScTimerStart, txtTimerStart);
            LoadHotKey(Shortcuts.SC_Type.SC_Type_TimerStop, cbScTimerStop, txtTimerStop);

            radioHotKeyMethod_sync.Checked  = (sc.NextStart_Method == Shortcuts.SC_HotKeyMethod.SC_HotKeyMethod_Sync);
            radioHotKeyMethod_async.Checked = (sc.NextStart_Method == Shortcuts.SC_HotKeyMethod.SC_HotKeyMethod_Async);
            radioHotKeyMethod_llkb.Checked  = (sc.NextStart_Method == Shortcuts.SC_HotKeyMethod.SC_HotKeyMethod_LLKb);

            if (!sc.IsGlobalHotKeySupported)
            {
                tab_globalshortcuts.Text    = tab_globalshortcuts.Text + " (OS not supported)";
                tab_globalshortcuts.Enabled = false;
            }

            // Style
            numStyleDesiredWidth.Value      = _settings.StyleDesiredWidth;
            cbHighContrast.Checked          = _settings.StyleUseHighContrast;
            cbHighContrastNames.Checked     = _settings.StyleUseHighContrastNames;
            cbUseRoman.Checked              = _settings.StyleUseRoman;
            cbHighlightCurrentSplit.Checked = _settings.StyleHightlightCurrentSplit;
            cbProgressBarColored.Checked    = !_settings.StyleProgressBarColored;
            cbSuperscriptPB.Checked         = _settings.StyleSuperscriptPB;
            cbApCustomCss.Checked           = _settings.StyleUseCustom;
            txtCssUrl.Text   = _settings.StyleCssUrl;
            txtFontUrl.Text  = _settings.StyleFontUrl;
            txtFontName.Text = _settings.StyleFontName;

            // Behavior
            cbShowAttempts.Checked            = _settings.ShowAttemptsCounter;
            cbShowHeadline.Checked            = _settings.ShowHeadline;
            cbShowFooter.Checked              = _settings.ShowFooter;
            cbShowSessionProgress.Checked     = _settings.ShowSessionProgress;
            cbShowProgressBar.Checked         = _settings.ShowProgressBar;
            cbSuccessionToProgressBar.Checked = _settings.Succession.IntegrateIntoProgressBar;
            numShowSplitsCountFinished.Value  = _settings.ShowSplitsCountFinished;
            numShowSplitsCountUpcoming.Value  = _settings.ShowSplitsCountUpcoming;
            cbShowHits.Checked                   = _settings.ShowHits;
            cbShowHitsCombined.Checked           = _settings.ShowHitsCombined;
            cbShowNumbers.Checked                = _settings.ShowNumbers;
            cbShowPB.Checked                     = _settings.ShowPB;
            cbShowDiff.Checked                   = _settings.ShowDiff;
            cbShowTimeCurrent.Checked            = _settings.ShowTimeCurrent;
            cbShowTimePB.Checked                 = _settings.ShowTimePB;
            cbShowTimeDiff.Checked               = _settings.ShowTimeDiff;
            cbShowTimeFooter.Checked             = _settings.ShowTimeFooter;
            radioPurposeChecklist.Checked        = (om.Purpose == OutModule.OM_Purpose.OM_Purpose_Checklist);
            radioPurposeDeathCounter.Checked     = (om.Purpose == OutModule.OM_Purpose.OM_Purpose_DeathCounter);
            radioPurposeSplitCounter.Checked     = (om.Purpose == OutModule.OM_Purpose.OM_Purpose_SplitCounter);
            radioPurposeNoDeath.Checked          = (om.Purpose == OutModule.OM_Purpose.OM_Purpose_NoDeath);
            radioPurposeResetCounter.Checked     = (om.Purpose == OutModule.OM_Purpose.OM_Purpose_ResetCounter);
            radioSeverityBossHitCritical.Checked = (om.Severity == OutModule.OM_Severity.OM_Severity_BossHitCritical);
            radioSeverityComparePB.Checked       = (om.Severity == OutModule.OM_Severity.OM_Severity_ComparePB);
            radioSeverityAnyHitCritical.Checked  = (om.Severity == OutModule.OM_Severity.OM_Severity_AnyHitsCritical);

            // Update
            lblVersionCurrent.Text = Application.ProductVersion.ToString();
            CheckForUpdates(sender, null);
            cbCheckUpdatesOnStartup.Checked = _settings.CheckUpdatesOnStartup;

            ApplyAppearance(sender, null);
            this.UpdateDarkMode();
            IsFormLoaded = true;
        }