Ejemplo n.º 1
0
        public static OneWayUpdater <String> BindTextAsSource(this Control textBox, PropertyLink <String> destinationPropertyLink)
        {
            EventLink textChangeEventLinks = new EventLink(textBox, _ControlTextChangedEventInfo);
            OneWayUpdater <String> binding = new OneWayUpdater <String>(() => textBox.Text, destinationPropertyLink.Set, textChangeEventLinks);

            return(binding);
        }
Ejemplo n.º 2
0
        public void ThenCheckSingleModelTransformation(SingleModelTransformationTestModel model)
        {
            Assert.AreEqual(1, model.Data);
            Assert.AreEqual(3, model.Value2);

            Assert.IsFalse(PropertyLink.From(() => model.Value3).Enabled);
        }
Ejemplo n.º 3
0
        public void DisabledAttributeTest()
        {
            var model    = new DisabledAttributeTestModel();
            var property = PropertyLink.From(() => model.Value);

            Assert.IsFalse(property.Enabled);
        }
Ejemplo n.º 4
0
 public MainWindowViewModel()
 {
     InventoryTotalItemView = new ObservableCollection <InventoryItemTotalQuantity>();
     PropertyLink.OnObject(this)
     .Link(vm => vm.NewInventoryItemDescription, "CanExecuteCreateNewInventoryItem")
     .Link(vm => vm.NewInventoryItemSku, "CanExecuteCreateNewInventoryItem")
     .Link(vm => vm.SelectedInventoryTotalItemView, "CanExecuteAddQuantity")
     .Link(vm => vm.QuantityToAddToSelectedItem, "CanExecuteAddQuantity");
 }
Ejemplo n.º 5
0
        public void NameAttributeTest()
        {
            var model     = new NameAttributeTestModel();
            var property1 = PropertyLink.From(() => model.Data);
            var property2 = PropertyLink.From(() => model.Value2);

            Assert.AreEqual("value", property1.Name);
            Assert.AreEqual("Value2", property2.Name);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Binds the <see cref="Control.Text"/> property to a given <paramref name="property2"/> in both directions (as a target and destination).
        /// </summary>
        /// <param name="textBox"></param>
        /// <param name="property2"></param>
        /// <param name="obj2ChangeEvent"></param>
        /// <returns></returns>
        public static UpdateLock <String> BindText(this Control textBox, PropertyLink <String> property2, EventLink obj2ChangeEvent)
        {
            PropertyLink <String> property1            = new PropertyLink <String>(() => textBox.Text, x => textBox.Text = x);
            EventLink             textChangeEventLinks = new EventLink(textBox, _ControlTextChangedEventInfo);

            UpdateLock <String> binding = new UpdateLock <String>(property1, textChangeEventLinks, property2, obj2ChangeEvent);

            return(binding);
        }
Ejemplo n.º 7
0
        public void NestedModelsTest()
        {
            var model     = new NestedModelsTestTopModel();
            var property1 = PropertyLink.From(() => model.Value1);
            var property2 = PropertyLink.From(() => model.NestedModel.Value2);

            Assert.AreEqual(1, property1.Value);
            Assert.AreEqual(2, property2.Value);
        }
        public UpdateLock(PropertyLink <T> obj1PropertyLink
                          , EventLink obj1EventLink
                          , PropertyLink <T> obj2PropertyLink
                          , EventLink obj2EventLink
                          )
        {
            _Obj1PropertyLink = obj1PropertyLink;
            _Obj1EventLink    = obj1EventLink;

            _Obj2PropertyLink = obj2PropertyLink;
            _Obj2EventLink    = obj2EventLink;

            _Obj1EventProxy = _Obj1EventLink?.AddHandler(this.UpdateObj1To2);
            _Obj2EventProxy = _Obj2EventLink?.AddHandler(this.UpdateObj2To1);
        }
Ejemplo n.º 9
0
        public BasicMultiplayerMainVM(CommandContainer commandContainer,
                                      IEndTurn mainGame,
                                      IViewModelData viewModel,
                                      BasicData basicData,
                                      TestOptions test,
                                      IGamePackageResolver resolver
                                      )
        {
            CommandContainer              = commandContainer;
            CommandContainer.IsExecuting  = true; //has to be proven false.
            CommandContainer.ManuelFinish = true;
            _mainGame  = mainGame;
            _viewModel = viewModel;
            _basicData = basicData;
            _test      = test;
            _resolver  = resolver;
            _viewModel.PropertyChanged += ViewModelPropertyChange;
            if (_basicData.MultiPlayer)
            {
                _network = Resolve <INetworkMessages>();
            }
            Type type          = GetType();
            var  ourProperties = type.GetPropertiesWithAttribute <VMAttribute>().ToCustomBasicList();

            if (ourProperties.Count == 0)
            {
                throw new BasicBlankException("There has to be at least one property on the list.  Rethink");
            }
            type = _viewModel.GetType();
            var vmProperties = type.GetPropertiesWithAttribute <VMAttribute>().ToCustomBasicList();

            vmProperties.ForEach(p =>
            {
                var o = ourProperties.Where(x => x.Name == p.Name).SingleOrDefault();
                var v = p;

                if (o != null)
                {
                    PropertyLink link = new PropertyLink();
                    link.VMProperty   = v;
                    link.OurProperty  = o;
                    _properties.Add(link);
                    //set the values as well.
                    o.SetValue(this, v.GetValue(_viewModel));
                }
            });
        }
Ejemplo n.º 10
0
        public void EnabledDisableAttributeTest()
        {
            var model    = new EnabledDisableAttributeTestModel();
            var property = PropertyLink.From(() => model.Value);

            property.Enabled = true;
            Assert.IsTrue(property.Enabled);

            property.Enabled = true;
            Assert.IsTrue(property.Enabled);

            property.Enabled = false;
            Assert.IsFalse(property.Enabled);

            property.Enabled = false;
            Assert.IsFalse(property.Enabled);
        }
Ejemplo n.º 11
0
        public void TestDisable()
        {
            //---------------Set up test pack-------------------
            MyBO.LoadDefaultClassDef();
            MyBO   bo        = new MyBO();
            string testValue = TestUtil.GetRandomString();
            PropertyLink <string, string> link = new PropertyLink <string, string>(bo, "TestProp", "TestProp2",
                                                                                   delegate(string input) { return(input); });

            bo.TestProp = testValue;
            //---------------Assert PreConditions---------------
            Assert.AreEqual(testValue, bo.TestProp2);
            //---------------Execute Test ----------------------
            link.Disable();
            bo.TestProp = TestUtil.GetRandomString();
            //---------------Test Result -----------------------
            Assert.AreEqual(testValue, bo.TestProp2);
        }
Ejemplo n.º 12
0
        public void ComparatorModelArrayNegativeTest()
        {
            var modelComparator = new ModelComparator();

            var expected = new ModelComparatorTestModel()
            {
                Value1 = 1,
                Value2 = "2"
            };
            var actual = new ModelComparatorTestModel()
            {
                Value1 = 2,
                Value2 = "3"
            };

            PropertyLink.From(() => expected.Value2).Enabled = false;

            Assert.IsFalse(modelComparator.Compare(new[] { expected }, new[] { actual }));
        }
Ejemplo n.º 13
0
        public void ComparatorNegativeTest()
        {
            var modelComparator = new ModelComparator();

            var expected = new ModelComparatorTestModel()
            {
                Value1 = 1,
                Value2 = "2"
            };
            var actual = new ModelComparatorTestModel()
            {
                Value1 = 1,
                Value2 = "3"
            };

            PropertyLink.From(() => expected.Value1).Enabled = false;

            Assert.IsFalse(modelComparator.Compare(expected, actual));
        }
Ejemplo n.º 14
0
        public void SelectProperty()
        {
            Actions actions = new Actions(_driver);

            actions.MoveToElement(PropertyDropDown);
            actions.Click();
            actions.Build().Perform();

            System.Threading.Thread.Sleep(200);

            PropertyLink.Click();

            System.Threading.Thread.Sleep(200);


            // actions.MoveToElement(PropertyLink);
            // actions.Click();
            //  actions.Build().Perform();



            // actions.SendKeys("247A Great North Road Henderson Auckland");
        }
Ejemplo n.º 15
0
        public static OneWayUpdater <String> BindTextAsDestination(this Control textBox, PropertyLink <String> property2, EventLink obj2ChangeEvent)
        {
            OneWayUpdater <String> binding = new OneWayUpdater <String>(property2.Get, x => textBox.Text = x, obj2ChangeEvent);

            return(binding);
        }
Ejemplo n.º 16
0
        public static UpdateLock <T> Bind <T>(PropertyLink <T> property1, EventLink obj1ChangeEvent, PropertyLink <T> property2, EventLink obj2ChangeEvent)
        {
            UpdateLock <T> binding = new UpdateLock <T>(property1, obj1ChangeEvent, property2, obj2ChangeEvent);

            return(binding);
        }
Ejemplo n.º 17
0
 public void TestEnable()
 {
     //---------------Set up test pack-------------------
     MyBO.LoadDefaultClassDef();
     MyBO bo = new MyBO();
     string testValue = TestUtil.GetRandomString();
     string testValue2 = TestUtil.GetRandomString();
     PropertyLink<string, string> link = new PropertyLink<string, string>(bo, "TestProp", "TestProp2",
                                                                          delegate(string input) { return input; });
     link.Disable();
     bo.TestProp = testValue;
     //---------------Assert PreConditions---------------      
     Assert.AreNotEqual(testValue, bo.TestProp2);
     //---------------Execute Test ----------------------
     bo.TestProp2 = testValue;
     link.Enable();
     bo.TestProp = testValue2;
     //---------------Test Result -----------------------
     Assert.AreEqual(testValue2, bo.TestProp2);
 }
Ejemplo n.º 18
0
        void AddEventHandlers()
        {
            //Binding to Encoding converter core:
            EncodingConverterCore ECC = Program.ECC;

            //Bind 'ECC.AutoDetectInputEncoding' to 'chkAutoDetect.Checked':
            WinFormsHelpers.Bind(new PropertyLink <bool>(() => chkAutoDetect.Checked, x => chkAutoDetect.Checked = x)
                                 , new EventLink(chkAutoDetect, nameof(CheckBox.CheckedChanged))
                                 , new PropertyLink <bool>(() => ECC.AutoDetectInputEncoding, x => ECC.AutoDetectInputEncoding = x)
                                 , new EventLink(ECC, nameof(ECC.AutoDetectInputEncodingChanged)))
            .UpdateObj2To1();
            //Bind 'ECC.PreferredInputEncoding' to 'txtPreferredInputEncoding':
            txtPreferredInputEncoding.BindText(new PropertyLink <string>(() => ECC.PreferredInputEncoding, x => ECC.PreferredInputEncoding = x)
                                               , new EventLink(ECC, nameof(ECC.PreferredInputEncodingChanged)))
            .UpdateObj2To1();
            //Bind 'ECC.InputFilePath' to 'txtInputPath':
            txtInputPath.BindText(new PropertyLink <string>(() => ECC.InputFilePath, x => ECC.InputFilePath = x)
                                  , new EventLink(ECC, nameof(ECC.InputFilePathChanged)))
            .UpdateObj2To1();
            //Bind 'ECC.OutputFilePath' to 'txtOutputPath':
            txtOutputPath.BindText(new PropertyLink <string>(() => ECC.OutputFilePath, x => ECC.OutputFilePath = x)
                                   , new EventLink(ECC, nameof(ECC.OutputFilePathChanged)))
            .UpdateObj2To1();
            //Bind 'ECC.InputText' to 'tbInputText':
            _InputTextLink = tbInputText.BindTextAsDestination(
                () => (!splitContainer1.Panel2Collapsed && File.Exists(ECC.InputFilePath)) ? ECC.InputText : null
                , new EventLink(ECC, nameof(ECC.InputTextChanged)));
            _InputTextLink.Update();

            //ECC.InputTextChanged += ECC_InputTextChanged; //One way update.
            //if (File.Exists(ECC.InputFilePath))
            //{
            //    tbInputText.Text = ECC.InputText;
            //}

            var text = File.Exists(ECC.InputFilePath) ? ECC.InputText : null;

            var inputEncodingEventLink = new EventLink(ECC, nameof(ECC.InputEncodingChanged));

            //Bind 'ECC.InputEncoding' to 'evInputEncoding.SelectedEncodingInfo':
            WinFormsHelpers.Bind(new PropertyLink <EncodingInfo>(() => evInputEncoding.SelectedEncodingInfo, x => evInputEncoding.SelectedEncodingInfo = x)
                                 , new EventLink(evInputEncoding, nameof(evInputEncoding.SelectedEncodingInfoChanged))
                                 , new PropertyLink <EncodingInfo>(() => encodingInfos?.FirstOrDefault(x => x.CodePage == ECC.InputEncoding.CodePage), x => ECC.InputEncoding = x?.GetEncoding())
                                 , inputEncodingEventLink)
            .UpdateObj2To1();
            //Bind 'ECC.InputEncoding' to 'lblInputEncoding':
            tsddInputEncoding.BindTextAsDestination(() => ECC.InputEncoding?.EncodingName, inputEncodingEventLink).Update();

            //Bind 'ECC.OutputEncoding' to 'evOutputEncoding.SelectedEncodingInfo':
            var outputEncodingEventLink = new EventLink(ECC, nameof(ECC.OutputEncodingChanged));

            WinFormsHelpers.Bind(new PropertyLink <EncodingInfo>(() => evOutputEncoding.SelectedEncodingInfo, x => evOutputEncoding.SelectedEncodingInfo = x)
                                 , new EventLink(evOutputEncoding, nameof(evOutputEncoding.SelectedEncodingInfoChanged))
                                 , new PropertyLink <EncodingInfo>(() => encodingInfos?.FirstOrDefault(x => x.CodePage == ECC.OutputEncoding.CodePage), x => ECC.OutputEncoding = x?.GetEncoding())
                                 , outputEncodingEventLink)
            .UpdateObj2To1();
            //Bind 'ECC.OutputEncoding' to 'lblOutputEncoding':
            tsddOutputEncoding.BindTextAsDestination(() => ECC.OutputEncoding?.EncodingName, outputEncodingEventLink).Update();


            txtOutputPathFormat.BindText(new PropertyLink <string>(() => _OFF.FormatString, x => _OFF.FormatString = x)
                                         , new EventLink(_OFF, nameof(_OFF.FormatStringChanged))).UpdateObj2To1();
            txtCompanionFileSearchPattern.BindText(new PropertyLink <string>(() => _OFF.CompanionFileSearchPattern, x => _OFF.CompanionFileSearchPattern = x)
                                                   , new EventLink(_OFF, nameof(_OFF.CompanionFileSearchPatternChanged))).UpdateObj2To1();

            txtCompanionFile.BindText(new PropertyLink <string>(() => _OFF.CompanionFile, x => _OFF.CompanionFile = x)
                                      , new EventLink(_OFF, nameof(_OFF.CompanionFileChanged))).UpdateObj2To1();


            //Bind favorite encoding of OutputEncodingsViewer to favorite encoding of InputEncodingsViewer
            var OutputEncodingFavsPropLink = new PropertyLink <EncodingInfo[]>(() => evOutputEncoding.FavoriteEncodingInfos, x => evOutputEncoding.FavoriteEncodingInfos = x);
            var evLink = new EventLink(evOutputEncoding, nameof(evOutputEncoding.FavoriteEncodingInfosChanged));

            WinFormsHelpers.Bind(OutputEncodingFavsPropLink
                                 , evLink
                                 , new PropertyLink <EncodingInfo[]>(() => evInputEncoding.FavoriteEncodingInfos, x => evInputEncoding.FavoriteEncodingInfos = x)
                                 , new EventLink(evInputEncoding, nameof(evInputEncoding.FavoriteEncodingInfosChanged)))
            ;

            //WinFormsHelpers.Bind(OutputEncodingFavsPropLink
            //    , evLink
            //    , new PropertyLink<EncodingsCollection>(() => evInputEncoding.FavoriteEncodingInfos, x => evInputEncoding.FavoriteEncodingInfos = x)
            //    , new EventLink(evInputEncoding, nameof(evInputEncoding.FavoriteEncodingInfosChanged)))
            //    ;

            //this.gbInput.DragEnter += InputControl_DragEnter;
            //this.gbInput.DragDrop += InputControl_DragDrop;

            this.splitContainer1.DragEnter += InputControl_DragEnter;
            this.splitContainer1.DragDrop  += InputControl_DragDrop;


            this.linkAbout.LinkClicked          += this.linkAbout_LinkClicked;
            this.btnChangeOutputFile.Click      += this.btnChangeOutputFile_Click;
            this.linkLabel1.LinkClicked         += this.linkLabel1_LinkClicked;
            this.btnSave.Click                  += this.btnSave_Click;
            this.btnOpen.Click                  += BtnOpen_Click;
            this.btnApplyOutputFormatting.Click += BtnApplyOutputFormatting_Click;
            this.splitContainer1.SplitterMoved  += SplitContainer1_SplitterMoved;
            this.btnTogleSidePanel.Click        += BtnTogleSidePanel_Click;
            this.splitContainer1.Resize         += SplitContainer1_Resize;

            this.Load       += MainForm3_Load;
            this.FormClosed += FormMain_FormClosed;
        }
Ejemplo n.º 19
0
        void AddEventHandlers()
        {
            EncodingConverterCore ECC = Program.ECC;

            #region Bindings

            //Binding to Encoding converter core:
            //Bind 'ECC.AutoDetectInputEncoding' to 'chkAutoDetect.Checked':
            WinFormsHelpers.Bind(new PropertyLink <bool>(() => chkAutoDetect.Checked, x => chkAutoDetect.Checked = x)
                                 , new EventLink(chkAutoDetect, nameof(CheckBox.CheckedChanged))
                                 , new PropertyLink <bool>(() => ECC.AutoDetectInputEncoding, x => ECC.AutoDetectInputEncoding = x)
                                 , new EventLink(ECC, nameof(ECC.AutoDetectInputEncodingChanged)))
            .UpdateObj2To1();
            //Bind 'ECC.PreferredInputEncoding' to 'txtPreferredInputEncoding':
            txtPreferredInputEncoding.BindText(new PropertyLink <string>(() => ECC.PreferredInputEncoding, x => ECC.PreferredInputEncoding = x)
                                               , new EventLink(ECC, nameof(ECC.PreferredInputEncodingChanged)))
            .UpdateObj2To1();
            //Bind 'ECC.InputFilePath' to 'txtInputPath':
            txtInputPath.BindText(new PropertyLink <string>(() => ECC.InputFilePath, x => ECC.InputFilePath = x)
                                  , new EventLink(ECC, nameof(ECC.InputFilePathChanged)))
            .UpdateObj2To1();


            //Bind 'ECC.OutputFilePath' to 'txtOutputPath':
            txtOutputPath.BindText(new PropertyLink <string>(() => ECC.OutputFilePath, (x) => { ECC.OutputFilePath = x; })
                                   , new EventLink(ECC, nameof(ECC.OutputFilePathChanged)))
            .UpdateObj2To1();
            //Bind 'ECC.InputText' to 'tbInputText':
            _InputTextLink = tbInputText.BindTextAsDestination(
                () => (!splitContainer1.Panel2Collapsed && File.Exists(ECC.InputFilePath)) ? ECC.InputText : null
                , new EventLink(ECC, nameof(ECC.InputTextChanged)));
            _InputTextLink.Update();

            //ECC.InputTextChanged += ECC_InputTextChanged; //One way update.
            //if (File.Exists(ECC.InputFilePath))
            //{
            //    tbInputText.Text = ECC.InputText;
            //}

            var text = File.Exists(ECC.InputFilePath) ? ECC.InputText : null;

            var inputEncodingEventLink = new EventLink(ECC, nameof(ECC.InputEncodingChanged));
            //Bind 'ECC.InputEncoding' to 'evInputEncoding.SelectedEncodingInfo':
            WinFormsHelpers.Bind(new PropertyLink <EncodingInfo>(() => evInputEncoding.SelectedEncodingInfo, x => evInputEncoding.SelectedEncodingInfo = x)
                                 , new EventLink(evInputEncoding, nameof(evInputEncoding.SelectedEncodingInfoChanged))
                                 , new PropertyLink <EncodingInfo>(() => encodingInfos?.FirstOrDefault(x => x.CodePage == ECC.InputEncoding?.CodePage), x => ECC.InputEncoding = x?.GetEncoding())
                                 , inputEncodingEventLink)
            .UpdateObj2To1();
            //Bind 'ECC.InputEncoding' to 'lblInputEncoding':
            tsddInputEncoding.BindTextAsDestination(() => ECC.InputEncoding?.EncodingName, inputEncodingEventLink).Update();

            //Bind 'ECC.OutputEncoding' to 'evOutputEncoding.SelectedEncodingInfo' and 'Settings.LastOutputEncoding':
            Properties.Settings defSet = Properties.Settings.Default;
            //1- Setup PropertyLink to 'ECC.OutputEncoding':
            var ECCOutputEncodingPropertyLink = new PropertyLink <Encoding>
                                                    (() => ECC.OutputEncoding       //getter
                                                    , x => ECC.OutputEncoding = x); //setter

            //2- Setup EventLink of 'OutputEncodingChanged':
            var ECCOutputEncodingEventLink = new EventLink(ECC, nameof(ECC.OutputEncodingChanged));
            //3- Now make the Bindings:
            //  Bind 'ECC.OutputEncoding' to 'Settings.LastOutputEncoding':
            WinFormsHelpers.Bind(new PropertyLink <Encoding>
                                     (() => encodingInfos?.FirstOrDefault(x => x.CodePage == defSet.LastOutputEncoding)?.GetEncoding()
                                     , x => defSet.LastOutputEncoding = x.CodePage)
                                 , new EventLink(evOutputEncoding, nameof(evOutputEncoding.SelectedEncodingInfoChanged))
                                 , ECCOutputEncodingPropertyLink
                                 , ECCOutputEncodingEventLink)
            .UpdateObj1To2();    //Update Settings to ECC.

            //  Bind 'ECC.OutputEncoding' to 'evOutputEncoding.SelectedEncodingInfo':
            //WinFormsHelpers.Bind(new PropertyLink<EncodingInfo>(() => evOutputEncoding.SelectedEncodingInfo, x => evOutputEncoding.SelectedEncodingInfo = x)
            //    , new EventLink(evOutputEncoding, nameof(evOutputEncoding.SelectedEncodingInfoChanged))
            //    , new PropertyLink<EncodingInfo>(() => encodingInfos?.FirstOrDefault(x => x.CodePage == ECC.OutputEncoding.CodePage), x => ECC.OutputEncoding = x?.GetEncoding())
            //    , ECCOutputEncodingEventLink)
            //    .UpdateObj2To1();
            WinFormsHelpers.Bind(new PropertyLink <Encoding>(
                                     () => evOutputEncoding.SelectedEncodingInfo.GetEncoding()
                                     , x => evOutputEncoding.SelectedEncodingInfo = encodingInfos?.FirstOrDefault(ei => x?.CodePage == ei.CodePage))
                                 , new EventLink(evOutputEncoding, nameof(evOutputEncoding.SelectedEncodingInfoChanged))
                                 , ECCOutputEncodingPropertyLink
                                 , ECCOutputEncodingEventLink)
            .UpdateObj2To1();

            //  Bind 'ECC.OutputEncoding' to 'lblOutputEncoding':
            tsddOutputEncoding.BindTextAsDestination(() => ECC.OutputEncoding?.EncodingName, ECCOutputEncodingEventLink).Update();


            txtOutputPathFormat.BindText(new PropertyLink <string>(() => _OPF.FormatString, x => _OPF.FormatString = x)
                                         , new EventLink(_OPF, nameof(_OPF.FormatStringChanged))).UpdateObj2To1();
            txtCompanionFileSearchPattern.BindText(new PropertyLink <string>(() => _OPF.CompanionFileSearchPattern, x => _OPF.CompanionFileSearchPattern = x)
                                                   , new EventLink(_OPF, nameof(_OPF.CompanionFileSearchPatternChanged))).UpdateObj2To1();

            txtCompanionFile.BindText(new PropertyLink <string>(() => _OPF.CompanionFile, x => _OPF.CompanionFile = x)
                                      , new EventLink(_OPF, nameof(_OPF.CompanionFileChanged))).UpdateObj2To1();


            //Bind favorite encoding of OutputEncodingsViewer to favorite encoding of InputEncodingsViewer
            var OutputEncodingFavsPropLink = new PropertyLink <EncodingInfo[]>(() => evOutputEncoding.FavoriteEncodingInfos, x => evOutputEncoding.FavoriteEncodingInfos = x);
            var evLink = new EventLink(evOutputEncoding, nameof(evOutputEncoding.FavoriteEncodingInfosChanged));

            WinFormsHelpers.Bind(OutputEncodingFavsPropLink
                                 , evLink
                                 , new PropertyLink <EncodingInfo[]>(() => evInputEncoding.FavoriteEncodingInfos, x => evInputEncoding.FavoriteEncodingInfos = x)
                                 , new EventLink(evInputEncoding, nameof(evInputEncoding.FavoriteEncodingInfosChanged)))
            ;

            //WinFormsHelpers.Bind(OutputEncodingFavsPropLink
            //    , evLink
            //    , new PropertyLink<EncodingsCollection>(() => evInputEncoding.FavoriteEncodingInfos, x => evInputEncoding.FavoriteEncodingInfos = x)
            //    , new EventLink(evInputEncoding, nameof(evInputEncoding.FavoriteEncodingInfosChanged)))
            //    ;
            #endregion//Bindings

            ECC.OutputFilePathChanged += ECC_OutputFilePathChanged;

            this.splitContainer1.AllowDrop  = true;
            this.splitContainer1.DragEnter += InputControl_DragEnter;
            this.splitContainer1.DragDrop  += InputControl_DragDrop;

            this.linkAbout.LinkClicked     += this.linkAbout_LinkClicked;
            this.btnChangeOutputFile.Click += this.btnChangeOutputFile_Click;
            this.linkLabelDetectInputEncoding.LinkClicked += this.linkLabelDetectInputEncoding_LinkClicked;
            this.btnSave.Click += this.btnSave_Click;
            this.btnOpen.Click += BtnOpen_Click;
            this.btnApplyOutputFormatting.Click += BtnApplyOutputFormatting_Click;

            this.Load       += MainForm_Load;
            this.FormClosed += FormMain_FormClosed;

            this.txtInputPath.TextChanged     += TxtPath_TextChanged;
            this.txtOutputPath.TextChanged    += TxtPath_TextChanged;
            this.txtCompanionFile.TextChanged += TxtPath_TextChanged;

            ECC.DetectedEncodingsChanged += ECC_DetectedEncodingsChanged;
            ECC.InputEncodingChanged     += ECC_InputEncodingChanged;
        }