Ejemplo n.º 1
0
        static public void Initialize()
        {
            _textManager = new MTTextMgrModel();

            _wAutoTestWorker = new BackgroundWorker();
            _wAutoTestWorker.WorkerSupportsCancellation = true;
            _lstTest = new ObservableCollection <MTTestModel>();
            string appPath = System.Reflection.Assembly.GetExecutingAssembly().Location;

            _LibraryPath = System.IO.Path.GetDirectoryName(appPath) + "\\Library\\";
            _UserPath    = System.IO.Path.GetDirectoryName(appPath) + "\\Users\\";

            if (!Directory.Exists(_UserPath))
            {
                Directory.CreateDirectory(_UserPath);
            }

            InitializeLibrary();
            string sSettingsPath = _UserPath + "Settings.xml";

            MTParser.Read(sSettingsPath);
            MTParser.ReadAllInFolder(PatchPath);

            MTClassificator.UpdateAllPatches();

            _dlgPositTest = new DialogPositioner();

            //Show Main Dialog
            _dlgMainView = new MTMainView();
            _dlgMainView.Show();
            InitializeNotificationIcon();
            _dlgTest = new MTTestView();
        }
Ejemplo n.º 2
0
        public static void ShowLstDlgTest()
        {
            if (_lstTest.Count == 0)
            {
                LstTest.Add((_dlgMainView.lvTexts.Items[0] as MTPatchModel).NextTest);
            }

            if (!_dlgTest.IsLoaded)
            {
                Size siz = _dlgTest.RenderSize;
                _dlgTest.Close();
                _dlgTest            = new MTTestView();
                _dlgTest.RenderSize = siz;
                _dlgTest.LstTests   = LstTest;
                DlgTest.Show();
            }
        }