    ﻿using Nikse.SubtitleEdit.Core;
    using Nikse.SubtitleEdit.Logic;
    using System;
    using System.Windows.Forms;

    namespace Nikse.SubtitleEdit.Forms
    {
        public partial class ChooseResolution : Form
        {
            public int VideoWidth { get; set; }
            public int VideoHeight { get; set; }

            public ChooseResolution()
            {
                UiUtil.PreInitialize(this);
                InitializeComponent();
                UiUtil.FixFonts(this);
                buttonOK.Text = Configuration.Settings.Language.General.Ok;
                buttonCancel.Text = Configuration.Settings.Language.General.Cancel;
                Text = Configuration.Settings.Language.ExportPngXml.VideoResolution;
                labelVideoResolution.Text = Configuration.Settings.Language.ExportPngXml.VideoResolution;
            }

            private void button1_Click(object sender, EventArgs e)
            {
                openFileDialog1.Title = Configuration.Settings.Language.General.OpenVideoFileTitle;
                openFileDialog1.FileName = string.Empty;
                openFileDialog1.Filter = Utilities.GetVideoFileFilter(false);
                openFileDialog1.FileName = string.Empty;
                if (openFileDialog1.ShowDialog() == DialogResult.OK)
                {
                    VideoInfo info = UiUtil.GetVideoInfo(openFileDialog1.FileName);
                    if (info != null && info.Success)
                    {
                        numericUpDownVideoWidth.Value = info.Width;
                        numericUpDownVideoHeight.Value = info.Height;
                    }
                }
            }

            private void buttonOK_Click(object sender, EventArgs e)
            {
                DialogResult = DialogResult.OK;
                VideoWidth = (int)numericUpDownVideoWidth.Value;
                VideoHeight = (int)numericUpDownVideoHeight.Value;
            }

            private void buttonCancel_Click(object sender, EventArgs e)
            {
                DialogResult = DialogResult.Cancel;
            }

            private void ChooseResolution_KeyDown(object sender, KeyEventArgs e)
            {
                if (e.KeyCode == Keys.Escape)
                    DialogResult = DialogResult.Cancel;
            }

        }
    }

↑ V3063 A part of conditional expression is always true if it is evaluated: info != null.