Пример #1
0
        public ViewModel()
        {
            CmdLoaded         = new CmdLoadedImpl();
            CmdLoaded.Loaded += CmdLoaded_Loaded;

            CmdStart              = new CmdStartImpl();
            CmdStart.StartImport += CmdStart_StartImport;

            CmdImport         = new CmdImportImpl();
            CmdImport.Import += CmdImport_Import;
        }
Пример #2
0
        public ViewModel()
        {
            #region Load Language Dictionary
            var dictionaryFiles = new List <string>
            {
                "Tabs/Import/Language/language.xaml",
                "Tabs/Import/Language/language.de-DE.xaml",
                "Tabs/Import/Language/language.es-ES.xaml",
                "Tabs/Import/Language/language.fr-FR.xaml",
                "Tabs/Import/Language/language.it-IT.xaml",
                "Tabs/Import/Language/language.nl-NL.xaml",
                "Tabs/Import/Language/language.pl-PL.xaml",
                "Tabs/Import/Language/language.ru-RU.xaml",
                "Tabs/Import/Language/language.zh-CN.xaml",
                "Tabs/Import/Language/language.cs-CZ.xaml",
                "Tabs/Import/Language/language.ar-SA.xaml",
                "Tabs/Import/Language/language.bg-BG.xaml",
                "Tabs/Import/Language/language.dk-DK.xaml",
                "Tabs/Import/Language/language.el-GR.xaml",
                "Tabs/Import/Language/language.fa-IR.xaml",
                "Tabs/Import/Language/language.fi-FI.xaml",
                "Tabs/Import/Language/language.he-IL.xaml",
                "Tabs/Import/Language/language.hi-IN.xaml",
                "Tabs/Import/Language/language.hr-HR.xaml",
                "Tabs/Import/Language/language.hu-HU.xaml",
                "Tabs/Import/Language/language.ko-KR.xaml",
                "Tabs/Import/Language/language.nn-NO.xaml",
                "Tabs/Import/Language/language.se-SE.xaml",
                "Tabs/Import/Language/language.tr-TR.xaml",
                "Tabs/Import/Language/language.zh-CN.xaml"
            };

            foreach (var aLangfile in dictionaryFiles)
            {
                _LangDictionary.MergedDictionaries.Add(new ResourceDictionary {
                    Source = new Uri(aLangfile, UriKind.Relative)
                });
            }

            #endregion

            #region Command initialisation
            CmdBrowse    = new CmdBrowseImpl();
            CmdCancel    = new CmdCancelImpl();
            CmdImport    = new CmdImportImpl();
            CmdTabLoaded = new CmdTabLoadedImpl();

            CmdImport.StartImport   += CmdImport_StartImport;
            CmdTabLoaded.TabLoaded  += CmdTabLoaded_TabLoaded;
            CmdBrowse.StartBrowsing += CmdBrowse_StartBrowsing;
            #endregion
        }