Beispiel #1
0
        public PluginForm(Subtitle subtitle)
        {
            InitializeComponent();

            _subtitle = subtitle;

            // Save user-configuartions on form-close.
            FormClosing += delegate
            {
                _configs.SaveConfigurations();
            };

            linkLabelGithub.Click += (sender, e) => System.Diagnostics.Process.Start(linkLabelGithub.Tag.ToString());

            // donate handler
            pictureBoxDonate.Click += (s, e) =>
            {
                System.Diagnostics.Process.Start(StringUtils.DonateUrl);
            };

            // disable triggerer controls
            ChangeControlsState(false);

            LoadConfigurations();
            _lineUnbreakerController = new LinesUnbreakerController(subtitle.Paragraphs, _configs);
            _lineUnbreakerController.TextUnbreaked += LineUnbreakerControllerTextUnbreaked;

            // restore trigger states
            ChangeControlsState(true);
            GeneratePreview();
        }
Beispiel #2
0
        public PluginForm(Subtitle subtitle)
        {
            InitializeComponent();

            _subtitle = subtitle;

            // Save user-configuartions on form-close.
            FormClosing += delegate
            {
                _configs.SaveConfigurations();
            };

            LoadConfigurations();
            _lineUnbreakerController = new LinesUnbreakerController(subtitle.Paragraphs, _configs);
            _lineUnbreakerController.TextUnbreaked += LineUnbreakerControllerTextUnbreaked;
            _isLoading = false;
            GeneratePreview();
        }