Ejemplo n.º 1
0
 public ThreadsUI(PluginMain pluginMain, ImageList imageList)
 {
     this.AutoKeyHandling = true;
     this.pluginMain      = pluginMain;
     lv = new ListViewEx();
     lv.ShowItemToolTips          = true;
     this.imageColumnHeader       = new ColumnHeader();
     this.imageColumnHeader.Text  = string.Empty;
     this.imageColumnHeader.Width = 20;
     this.frameColumnHeader       = new ColumnHeader();
     this.frameColumnHeader.Text  = string.Empty;
     lv.Columns.AddRange(new ColumnHeader[] {
         this.imageColumnHeader,
         this.frameColumnHeader
     });
     lv.FullRowSelect     = true;
     lv.BorderStyle       = BorderStyle.None;
     lv.Dock              = System.Windows.Forms.DockStyle.Fill;
     lv.SmallImageList    = imageList;
     runningImageIndex    = imageList.Images.IndexOfKey("StartContinue");
     suspendedImageIndex  = imageList.Images.IndexOfKey("Pause");
     lv.View              = System.Windows.Forms.View.Details;
     lv.MouseDoubleClick += new MouseEventHandler(lv_MouseDoubleClick);
     lv.KeyDown          += new KeyEventHandler(lv_KeyDown);
     lv.SizeChanged      += new EventHandler(lv_SizeChanged);
     this.Controls.Add(lv);
     ScrollBarEx.Attach(lv);
 }
Ejemplo n.º 2
0
 public ImmediateUI()
 {
     this.AutoKeyHandling = true;
     this.InitializeComponent();
     this.contextMenuStrip.Renderer = new DockPanelStripRenderer(false);
     this.history = new List <string>();
     ScrollBarEx.Attach(textBox);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Apply theming properties to the controls
 /// </summary>
 private void ApplyTheming()
 {
     PluginBase.MainForm.SetUseTheme(this, this.UseTheme);
     if (this.UseTheme)
     {
         ScrollBarEx.Attach(this, true);
         PluginBase.MainForm.ThemeControls(this);
     }
 }
Ejemplo n.º 4
0
 public PluginUI(PluginMain pluginMain)
 {
     this.AutoKeyHandling = true;
     this.pluginMain      = pluginMain;
     this.InitializeComponent();
     this.InitializeContextMenu();
     this.InitializeGraphics();
     this.InitializeTexts();
     ScrollBarEx.Attach(layoutsListView);
 }
Ejemplo n.º 5
0
 public StackframeUI(PluginMain pluginMain, ImageList imageList)
 {
     this.AutoKeyHandling = true;
     this.pluginMain      = pluginMain;
     wholeFrameStack      = new List <ListViewItem>();
     InitializeComponents(imageList);
     InitializeContextMenu();
     InitializeLocalization();
     ScrollBarEx.Attach(lv);
 }
Ejemplo n.º 6
0
 public PluginUI(PluginMain pluginMain)
 {
     this.AutoKeyHandling = true;
     this.InitializeComponent();
     this.pluginMain = pluginMain;
     this.InitializeTimers();
     this.InitializeGraphics();
     this.InitializeLayout();
     this.InitializeTexts();
     this.UpdateSettings();
     ScrollBarEx.Attach(listView);
 }
Ejemplo n.º 7
0
 public PluginUI(PluginMain pluginMain)
 {
     this.AutoKeyHandling = true;
     this.Font            = PluginBase.Settings.DefaultFont;
     this.pluginMain      = pluginMain;
     this.InitializeSettings();
     this.InitializeComponent();
     this.InitializeContextMenu();
     this.InitializeGraphics();
     this.InitializeControls();
     this.UpdateMainRegexes();
     ScrollBarEx.Attach(logTextBox);
 }
Ejemplo n.º 8
0
 private void OnFormLoad(Object sender, EventArgs e)
 {
     ScrollBarEx.Attach(this, true);
     ScrollBarEx.Attach(this.dataGridViewEx);
     PluginBase.MainForm.ThemeControls(this);
     this.BackColor = Globals.MainForm.GetThemeColor("Form.BackColor", SystemColors.Control);
     for (var i = 0; i < 30; i++)
     {
         var msg = "Hello from the other side of the moon " + i;
         this.dataGridViewEx.Rows.Add(msg);
         this.listBoxEx.Items.Add(msg);
     }
     this.treeViewEx.ExpandAll();
 }
Ejemplo n.º 9
0
 public ModelsExplorer()
 {
     instance = this;
     InitializeComponent();
     InitializeLocalization();
     this.toolStrip.Font                   = PluginBase.Settings.DefaultFont;
     this.toolStrip.Renderer               = new DockPanelStripRenderer();
     this.outlineContextMenuStrip.Font     = PluginBase.Settings.DefaultFont;
     this.outlineContextMenuStrip.Renderer = new DockPanelStripRenderer();
     searchButton.Image         = PluginBase.MainForm.FindImage("251");
     refreshButton.Image        = PluginBase.MainForm.FindImage("24");
     rebuildButton.Image        = PluginBase.MainForm.FindImage("153");
     toolStrip.ImageScalingSize = ScaleHelper.Scale(new Size(16, 16));
     ScrollBarEx.Attach(outlineTreeView);
 }
Ejemplo n.º 10
0
 public PluginUI(PluginMain pluginMain)
 {
     this.InitializeTimers();
     this.scrolling  = false;
     this.pluginMain = pluginMain;
     this.logCount   = TraceManager.TraceLog.Count;
     this.InitializeComponent();
     this.InitializeContextMenu();
     this.InitializeLayout();
     this.toggleButtonImagePause   = PluginBase.MainForm.FindImage("146");
     this.toggleButtonImagePlay    = PluginBase.MainForm.FindImage("147");
     this.toggleButtonImagePlayNew = PluginBase.MainForm.FindImage("147|17|5|4");
     this.ToggleButtonClick(this, new EventArgs());
     ScrollBarEx.Attach(textLog);
 }
Ejemplo n.º 11
0
 public PluginUI(PluginMain pluginMain)
 {
     this.AutoKeyHandling   = true;
     this.pluginMain        = pluginMain;
     this.autoShow          = new Timer();
     this.autoShow.Interval = 300;
     this.autoShow.Tick    += this.AutoShowPanel;
     this.logCount          = TraceManager.TraceLog.Count;
     this.ignoredEntries    = new Dictionary <String, Boolean>();
     this.InitializeComponent();
     this.InitializeContextMenu();
     this.InitializeGraphics();
     this.InitializeTexts();
     this.InitializeLayout();
     this.ApplySettings();
     ScrollBarEx.Attach(entriesView);
 }
Ejemplo n.º 12
0
        public PluginUI(PluginMain pluginMain)
        {
            this.InitializeComponent();
            this.InitializeContextMenu();
            this.InitializeLocalization();
            this.InitializeLayout();
            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>();
            EventManager.AddEventHandler(this, EventType.Keys); // Listen Esc
            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;
            ScrollBarEx.Attach(listView);
        }
Ejemplo n.º 13
0
        public PluginUI(PluginMain plugin, FDMenus menus, FileActions fileActions, ProjectActions projectActions)
        {
            this.menus           = menus;
            this.AutoKeyHandling = true;
            this.Text            = TextHelper.GetString("Title.PluginPanel");

            #region Build TreeView and Toolbar

            menu = new ProjectContextMenu();
            menu.Rename.Click += RenameNode;

            treeBar = new TreeBar(menus, menu);

            tree                    = new ProjectTreeView();
            tree.BorderStyle        = BorderStyle.None;
            tree.Dock               = DockStyle.Fill;
            tree.ImageIndex         = 0;
            tree.ImageList          = Icons.ImageList;
            tree.LabelEdit          = true;
            tree.SelectedImageIndex = 0;
            tree.ShowRootLines      = false;
            tree.HideSelection      = false;
            tree.ContextMenuStrip   = menu;
            tree.AfterLabelEdit    += tree_AfterLabelEdit;
            tree.BeforeLabelEdit   += tree_BeforeLabelEdit;
            tree.BeforeSelect      += tree_BeforeSelect;
            tree.AfterSelect       += tree_AfterSelect;

            Panel panel = new Panel();
            panel.Dock = DockStyle.Fill;
            panel.Controls.Add(tree);
            panel.Controls.Add(treeBar);

            menu.ProjectTree = tree;
            ScrollBarEx.Attach(tree);

            #endregion

            #region Instructions

            help = new LinkLabel();
            string[] helpParts   = String.Format(TextHelper.GetString("Info.NoProjectsOpenLink"), "\n").Split('|');
            string[] helpActions = { "create", "open", "import" };
            string   helpText    = "";
            int[]    linkStart   = { 0, 0, 0 };
            int[]    linkLength  = { 0, 0, 0 };
            for (int i = 0; i < 3; i++)
            {
                if (helpParts.Length > i * 2)
                {
                    helpText     += helpParts[i * 2];
                    linkStart[i]  = helpText.Length;
                    helpText     += helpParts[i * 2 + 1];
                    linkLength[i] = helpParts[i * 2 + 1].Length;
                }
            }
            help.Text = helpText + helpParts[helpParts.Length - 1];
            for (int i = 0; i < 3; i++)
            {
                help.Links.Add(linkStart[i], linkLength[i], helpActions[i]);
            }
            help.LinkClicked += link_LinkClicked;
            help.Dock         = DockStyle.Fill;
            help.TextAlign    = ContentAlignment.MiddleCenter;
            help.ContextMenu  = new ContextMenu();

            #endregion

            this.Controls.Add(help);
            this.Controls.Add(panel);

            #region Events

            fileActions.FileCreated        += NewFileCreated;
            fileActions.ProjectModified    += ProjectModified;
            projectActions.ProjectModified += ProjectModified;

            #endregion
        }
Ejemplo n.º 14
0
        private void init()
        {
            this.AutoKeyHandling     = true;
            this.dgv                 = new DataGridViewEx();
            this.dgv.Dock            = DockStyle.Fill;
            this.dgv.BorderStyle     = BorderStyle.None;
            this.dgv.BackgroundColor = SystemColors.Window;
            this.dgv.Font            = PluginBase.Settings.DefaultFont;
            if (ScaleHelper.GetScale() > 1)
            {
                this.dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            }
            else
            {
                this.dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
            }
            this.dgv.ColumnHeadersBorderStyle  = DataGridViewHeaderBorderStyle.None;
            this.dgv.AutoSizeColumnsMode       = DataGridViewAutoSizeColumnsMode.Fill;
            this.dgv.CellBorderStyle           = DataGridViewCellBorderStyle.Single;
            this.dgv.EnableHeadersVisualStyles = true;
            this.dgv.RowHeadersVisible         = false;
            DataGridViewCellStyle viewStyle = new DataGridViewCellStyle();

            viewStyle.Padding = new Padding(1);
            this.dgv.ColumnHeadersDefaultCellStyle = viewStyle;
            this.ColumnBreakPointEnable            = new DataGridViewCheckBoxColumn();
            this.ColumnBreakPointFilePath          = new DataGridViewTextBoxColumn();
            this.ColumnBreakPointFileName          = new DataGridViewTextBoxColumn();
            this.ColumnBreakPointLine = new DataGridViewTextBoxColumn();
            this.ColumnBreakPointExp  = new DataGridViewTextBoxColumn();
            this.ColumnBreakPointEnable.HeaderText   = TextHelper.GetString("Label.Enable");
            this.ColumnBreakPointEnable.Name         = "Enable";
            this.ColumnBreakPointEnable.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
            this.ColumnBreakPointEnable.Width        = 70;
            this.ColumnBreakPointFilePath.HeaderText = TextHelper.GetString("Label.Path");
            this.ColumnBreakPointFilePath.Name       = "FilePath";
            this.ColumnBreakPointFilePath.ReadOnly   = true;
            this.ColumnBreakPointFileName.HeaderText = TextHelper.GetString("Label.File");
            this.ColumnBreakPointFileName.Name       = "FileName";
            this.ColumnBreakPointFileName.ReadOnly   = true;
            this.ColumnBreakPointLine.HeaderText     = TextHelper.GetString("Label.Line");
            this.ColumnBreakPointLine.Name           = "Line";
            this.ColumnBreakPointLine.ReadOnly       = true;
            this.ColumnBreakPointExp.HeaderText      = TextHelper.GetString("Label.Exp");
            this.ColumnBreakPointExp.Name            = "Exp";
            this.dgv.AllowUserToAddRows = false;
            this.dgv.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[]
            {
                this.ColumnBreakPointEnable,
                this.ColumnBreakPointFilePath,
                this.ColumnBreakPointFileName,
                this.ColumnBreakPointLine,
                this.ColumnBreakPointExp
            });
            foreach (DataGridViewColumn column in dgv.Columns)
            {
                column.Width = ScaleHelper.Scale(column.Width);
            }
            defaultColor = dgv.Rows[dgv.Rows.Add()].DefaultCellStyle.BackColor;
            dgv.Rows.Clear();
            this.dgv.CellEndEdit     += new DataGridViewCellEventHandler(dgv_CellEndEdit);
            this.dgv.CellMouseUp     += new DataGridViewCellMouseEventHandler(dgv_CellMouseUp);
            this.dgv.CellDoubleClick += new DataGridViewCellEventHandler(dgv_CellDoubleClick);
            this.Controls.Add(this.dgv);
            InitializeComponent();
            tsbRemoveSelected.Image          = PluginBase.MainForm.FindImage("548|27|5|5");
            tsbRemoveFiltered.Image          = PluginBase.MainForm.FindImage("549|27|5|5");
            tsbAlternateFiltered.Image       = PluginBase.MainForm.FindImage("136|23|5|5");
            tsbExportFiltered.Image          = PluginBase.MainForm.FindImage("549|22|4|4");
            tsbImport.Image                  = PluginBase.MainForm.FindImage("549|8|4|4");
            this.tscbFilterColumns.FlatStyle = PluginBase.Settings.ComboBoxFlatStyle;
            this.tsActions.Renderer          = new DockPanelStripRenderer(false);
            ScrollBarEx.Attach(dgv);
        }