示例#1
0
        public ChannelMapper(EventSequence sequence)
        {
            _sourceSequence = sequence;
            _useCheckmark = Preference2.GetInstance().GetBoolean("UseCheckmark");

            InitializeComponent();

            _sourceProfile = new ChannelMapperProfile(_sourceSequence.Profile.FileName);
            //_sourceNatural = new ChannelMapperProfile(sourceSequence.Profile.FileName);
            _sourceChannelCount = _sourceProfile.GetChannelCount();
            InitializeDropDownList();
            InitializeScrollbar();

            GetDestinationProfile();

            BuildDynamicComponents();
            InitializeDynamicComponents();
            IsMapValid = false;
            MouseWheel += MapperMouseWheel;
            _previewButtonToolTip = toolTips.GetToolTip(btnPreviewEdit);
            _previewButtonText = btnPreviewEdit.Text;
            TogglePreviewElements(true);
        }
示例#2
0
        private void GetDestinationProfile()
        {
            using (var openProfile = new OpenFileDialog()) {
                openProfile.Filter = Resources.Profile + @"|*" + Vendor.ProfileExtension;
                openProfile.DefaultExt = Vendor.ProfileExtension.Replace(".", "");
                openProfile.CheckFileExists = true;
                openProfile.Title = @"Select a destination profile";
                openProfile.InitialDirectory = Paths.ProfilePath;
                openProfile.FileName = string.Empty;
                if (openProfile.ShowDialog() != DialogResult.OK) {
                    return;
                }

                _destinationProfile = new ChannelMapperProfile(openProfile.FileName);
                _destinationNatural = new ChannelMapperProfile(openProfile.FileName);
                PopulateDestinationList();
            }
        }