Exemplo n.º 1
0
        public static void Init()
        {
            history = new AutoSavingFixedSizeQueue <string>(Settings.Default.HistorySize);

            history.Path = Path.Combine(IDEUtils.GetStartupProjectDirectory(), "DockableCLArgsHistory.user");
            history.Load();
        }
Exemplo n.º 2
0
        private void Init()
        {
            lang = IDEUtils.LANG;

            CmdArgs.FontFamily = new FontFamily(Properties.Settings.Default.Font.FontFamily.Name);
            CmdArgs.FontSize   = Properties.Settings.Default.Font.SizeInPoints;

            EnvDTE.Properties props = IDEUtils.GetDtePropertiesFromHierarchy();
            if (props == null)
            {
                runChangedHandler = false;
                CmdArgs.Text      = DockableCLArgs.Resources.StartupMessage;
                runChangedHandler = true;
            }
            else
            {
                if (lang != IDEUtils.ProjLang.UNKNOWN)
                {
                    runChangedHandler = false;
                    CmdArgs.Text      = IDEUtils.GetCommandArgs();
                    runChangedHandler = true;

                    CmdArgs.IsEnabled = true;

                    History.Init();

                    savedArgs.Path = Path.Combine(IDEUtils.GetStartupProjectDirectory(), "DockableCLArgsSavedArgs.user");
                    savedArgs.Load();
                }
                else
                {
                    runChangedHandler = false;
                    CmdArgs.Text      = DockableCLArgs.Resources.UnsupportedProjectType;
                    runChangedHandler = true;
                }
            }

            SetTextBoxProperties();
        }