Example #1
0
 // show the setup dialog
 public void ShowPlugin()
 {
     ConfigurationForm dialog = new ConfigurationForm();
     dialog.ShowDialog();
 }
Example #2
0
        public ConfigurationForm()
        {
            m_localControlForInvoke = new Control();
            m_localControlForInvoke.CreateControl();
#if DEBUG
            //    Debugger.Launch();
#endif
            InitializeComponent();
            MPTVSeriesLog.AddNotifier(ref listBox_Log);

            MPTVSeriesLog.Write("**** Plugin started in configuration mode ***");

            Translation.Init();

            // set height/width
            int height = DBOption.GetOptions(DBOption.cConfigSizeHeight);
            int width = DBOption.GetOptions(DBOption.cConfigSizeWidth);
            if (height > this.MinimumSize.Height && width > this.MinimumSize.Width)
            {
                System.Drawing.Size s = new Size(width, height);
                this.Size = s;
            }
            this.Resize += new EventHandler(ConfigurationForm_Resize);            

            load = new loadingDisplay();

            OnlineParsing.OnlineParsingCompleted += new OnlineParsing.OnlineParsingCompletedHandler(OnlineParsing_OnCompleted);
            
            InitSettingsTreeAndPanes();
            InitExtraTreeAndPanes();
            
            LoadImportPathes();
            LoadExpressions();
            LoadReplacements();
            
            initLoading = false;
            LoadTree();

            // Only Advanced Users / Skin Designers need to see these.
            // Tabs are visible if import="false" TVSeries.SkinSettings.xml
            if (SkinSettings.ImportFormatting) tabControl_Details.TabPages.Remove(tabFormattingRules);
            if (SkinSettings.ImportLogos) tabControl_Details.TabPages.Remove(tabLogoRules);
            
            if (load != null) load.Close();
            instance = this;

            this.aboutScreen.setUpMPInfo(Settings.Version.ToString(), Settings.BuildDate);
            this.aboutScreen.setUpPaths();
        }