Ejemplo n.º 1
0
        public void RestoreState()
        {
            try {
                // ---- LanguageDirection ----
                // CF.


                CF.AssignValues("MainForm", this, new Point(100, 100), new Size(871, 712));

                string _LessonFileName = CF.GetValue("LessonFileName", CF.GetFolderForUserFiles() + @"\Video.EN.srt.lesson");
                _LessonFileName = FileManager.FindPath(_LessonFileName, @"\my_video\my_movie.lesson - specify a file with your lesson");


                if (string.IsNullOrEmpty(this.tutorList1.FileName) && File.Exists(_LessonFileName))
                {
                    this.LessonFileName = _LessonFileName;
                }

                //               CurrentLangInfo.InitLanguagesMenu(this.toolStrip1);
                CurrentLangInfo.InitLanguagesMenu(this.miLanguages);
                CurrentLangInfo.LanguageDirection = CF.GetValue("LanguageDirection", CurrentLangInfo.DefaultLangDir);

                this.menuForSelected.LastDictName = CF.GetValue("LastDictionary", GoogleDictionary.MainTitle);

                this.menuForSelected.miHideTranslation.Checked = CF.GetValue("IsHidedTranslation", false);
                this.itemShowHidePreviousScore.Checked         = CF.GetValue("ShowPreviousScore", false);
                item_CheckStateChanged(null, EventArgs.Empty);
            }
            catch (Exception ex) {
                Messages.ErrorOnRestoringApp(ex);
            }
        }
Ejemplo n.º 2
0
        public void RestoreState()
        {
            try
            {
                // ---- LanguageDirection ----
                CF.AssignValues("MainForm", this, new Point(50, 50), new Size(850, 920));
                this.btTopMost.Checked = CF.GetValue("TopMost", false);
                CurrentLangInfo.InitLanguagesMenu(this.miLanguages);
//                 CurrentLangInfo.InitLanguagesMenu(this.toolStripMainMenu);
                CurrentLangInfo.LanguageDirection = CF.GetValue("LanguageDirection", CurrentLangInfo.DefaultLangDir);
                AssignLastUsedDict(CF.GetValue("LastUsedDict", GoogleDictionary.MainTitle));

                string history = CF.GetValue("HistoryList", "WELCOME");
                if (!string.IsNullOrEmpty(history))
                {
                    this.comboBox.Items.AddRange(history.Split(';'));
                    this.comboBox.SelectedIndex = 0;
                }
                CheckButtonsPrevNext();
                UpdateFormCaption();
            }
            catch (Exception ex) {
                Messages.ErrorOnRestoringApp(ex);
            }
        }
Ejemplo n.º 3
0
        public FileSelector()
        {
            InitializeComponent();
            CurrentLangInfo.InitLanguagesMenu(this.miLanguages);
            CurrentLangInfo.ChangedLanguageDirection += CurrentLangInfo_ChangedLanguageDirection;

            if (T.splash != null)
            {
                T.splash.Hide();
            }

            tabControl.Selected += new TabControlEventHandler(tabControl1_Selected);

            // TODO: what is this tedBrowser1.IsOfflineMode?
            // if(tedBrowser1.IsOfflineMode)
            this.tabControl.SelectedIndex = this.tabControl.TabPages.IndexOf(this.tpVideoFiles);
            AdjustForm();

            this.btDownloadfromURL.Click      += new System.EventHandler(this.button1_Click);
            this.txURLforDownload.TextChanged += new System.EventHandler(this.URLforDownload_TextChanged);

            btVideoOpen.Click    += new EventHandler(btVideoOpen_Click);
            btSubtitleOpen.Click += new EventHandler(btSubtitleOpen_Click);
            this.btRun.Click     += btRun_Click;

            this.FormClosed  += FileSelector_FormClosed;
            this.FormClosing += FileSelector_FormClosing;
        }
Ejemplo n.º 4
0
 public void RestoreState()
 {
     try
     {
         // ---- LanguageDirection ----
         CF.AssignValues("MainForm", this);
         CurrentLangInfo.LanguageDirection = CF.GetValue("LanguageDirection", CurrentLangInfo.DefaultLangDir);
         CurrentLangInfo.InitLanguagesMenu(this.miLanguages);
     }
     catch
     { //TODO: add mesage for detail about urestored state
     }
 }