Example #1
0
 public PluginUI(PluginMain pluginMain)
 {
     this.InitializeComponent();
     this.InitializeContextMenu();
     this.InitializeLocalization();
     this.pluginMain = pluginMain;
     this.groups = new List<String>();
     this.columnSorter = new ListViewSorter();
     this.listView.ListViewItemSorter = this.columnSorter;
     Settings settings = (Settings)pluginMain.Settings;
     this.filesCache = new Dictionary<String, DateTime>();
     try
     {
         if (settings.GroupValues.Length > 0)
         {
             this.groups.AddRange(settings.GroupValues);
             this.todoParser = BuildRegex(String.Join("|", settings.GroupValues));
             this.isEnabled = true;
             this.InitGraphics();
         }
         this.listView.ShowGroups = PluginBase.Settings.UseListViewGrouping;
         this.listView.GridLines = !PluginBase.Settings.UseListViewGrouping;
     }
     catch (Exception ex)
     {
         ErrorManager.ShowError(ex);
         this.isEnabled = false;
     }
     this.parseTimer = new System.Windows.Forms.Timer();
     this.parseTimer.Interval = 2000;
     this.parseTimer.Tick += delegate { this.ParseNextFile(); };
     this.parseTimer.Enabled = false;
     this.parseTimer.Tag = null;
 }
Example #2
0
        public PluginUI(PluginMain pluginMain)
        {
            this.InitializeComponent();
            this.InitializeContextMenu();
            this.InitializeLocalization();
            this.pluginMain   = pluginMain;
            this.groups       = new List <String>();
            this.columnSorter = new ListViewSorter();
            this.listView.ListViewItemSorter = this.columnSorter;
            Settings settings = (Settings)pluginMain.Settings;

            this.filesCache = new Dictionary <String, DateTime>();
            try
            {
                if (settings.GroupValues.Length > 0)
                {
                    this.groups.AddRange(settings.GroupValues);
                    this.todoParser = BuildRegex(String.Join("|", settings.GroupValues));
                    this.isEnabled  = true;
                    this.InitGraphics();
                }
                this.listView.ShowGroups = PluginBase.Settings.UseListViewGrouping;
                this.listView.GridLines  = !PluginBase.Settings.UseListViewGrouping;
            }
            catch (Exception ex)
            {
                ErrorManager.ShowError(ex);
                this.isEnabled = false;
            }
            this.parseTimer          = new System.Windows.Forms.Timer();
            this.parseTimer.Interval = 2000;
            this.parseTimer.Tick    += delegate { this.ParseNextFile(); };
            this.parseTimer.Enabled  = false;
            this.parseTimer.Tag      = null;
        }
Example #3
0
        public PluginUI(PluginMain pluginMain)
        {
            this.InitializeComponent();
            this.toolStripButton1.Image = PluginBase.MainForm.FindImage("24");
            this.toolStripButton2.Image = PluginBase.MainForm.FindImage("54");
            this.pluginMain = pluginMain;

            this.lvwColumnSorter = new ListViewColumnSorter();
            this.listView1.ListViewItemSorter = lvwColumnSorter;
            this.Groups = new List<string>();

            Settings settings = ((Settings)pluginMain.Settings);

            try
            {
                extensions = new List<string>();
                extensions.AddRange(settings.FileExtenions);
                if (settings.Groups.Length > 0)
                {
                    this.Groups.AddRange(settings.Groups);
                    string pattern = string.Join("|", settings.Groups);
                    this.todoParser = new Regex(@"(//|/\*\*?|\*)[\t ]*(" + pattern + ")[:|\t ]*([^\r|\n]*)", RegexOptions.Multiline);
                    is_enabled = true;
                    this.InitGraphics();
                }
            } catch(System.Exception err)
            {
                Debug.WriteLine("Error: " + err);
                is_enabled = false;
            }

            this.parseTimer = new Timer();
            this.parseTimer.Interval = 2000;
            this.parseTimer.Tick += delegate { this.parseNextFile(); };
            this.parseTimer.Tag   = null;
            this.parseTimer.Enabled = false;
        }