public void ShowAutocomplete(IEnumerable <AutocompleteSymbol> symbols) { var ed = App.Editor(); if (ed != null) { symbols = symbols.Distinct(Comparer.Instance).OrderBy(s => s.Name); var sci = ed.Control as ScintillaControl; if (sci != null) { if (!scis.ContainsKey(sci)) { sci.RegisterAutocompleteImage(1, Pixmap.FromBitmap((Bitmap)Bitmaps.Load <NS>("PixmapVariable"))); sci.RegisterAutocompleteImage(2, Pixmap.FromBitmap((Bitmap)Bitmaps.Load <NS>("PixmapModule"))); sci.RegisterAutocompleteImage(3, Pixmap.FromBitmap((Bitmap)Bitmaps.Load <NS>("PixmapMember"))); sci.RegisterAutocompleteImage(4, Pixmap.FromBitmap((Bitmap)Bitmaps.Load <NS>("PixmapType"))); sci.RegisterAutocompleteImage(5, Pixmap.FromBitmap((Bitmap)Bitmaps.Load <NS>("PixmapKeyword"))); scis.Add(sci, null); } var words = String.Join(" ", symbols.Select(SymbolToString).ToArray()); sci.ShowAutocompleteList(0, words); } } }
public void SetStatusString(StatusType type, string text, params object[] args) { var t = WB.Form.ActiveToolbar; t.Invoke(() => { t.HighlightStatusString = true; t.StatusString = args != null && args.Length > 0 ? String.Format(text, args) : text; t.StatusImage = type == StatusType.Error ? Bitmaps.Load("Error") : type == StatusType.Warning ? Bitmaps.Load("Warning") : Bitmaps.Load("Message"); if (type == StatusType.Error) { SystemSounds.Exclamation.Play(); } if (type == StatusType.Warning) { SystemSounds.Beep.Play(); } t.Refresh(); }); }
internal void Initialize(IApp app) { this.app = app; contextMenu = new ContextMenuStrip(); contextMenu.Items.Add("Remove Bookmark", null, (o, e) => RemoveBookmark(lastNodeClick)); MenuRenderer.ApplySkin(contextMenu); this.sciMap = new Dictionary <ScintillaControl, Object>(); this.nodeMap = new Dictionary <Document, TreeNode>(); this.treeView = new BufferedTreeView(); this.treeView.Font = Fonts.Text; this.treeView.BorderStyle = BorderStyle.None; this.treeView.ShowLines = false; this.treeView.BeforeExpand += TreeViewBeforeExpand; this.treeView.NodeMouseClick += NodeMouseClick; this.treeView.ItemHeight = Dpi.ScaleY(18); var img = new ImageList(); img.ColorDepth = ColorDepth.Depth32Bit; img.TransparentColor = Color.Magenta; img.ImageSize = new Size(16, 16); img.Images.Add("Folder", Bitmaps.Load <NS>("Folder")); img.Images.Add("Bookmark", Bitmaps.Load <NS>("Bookmark")); treeView.ImageList = img; var srv = app.GetService <IDocumentService>(); srv.EnumerateDocuments().ForEach(d => AddDocument(d as TextDocument)); srv.DocumentAdded += DocumentAdded; srv.DocumentRemoved += DocumentRemoved; }
public TaskManager(IApp app, TaskListService service) { this.app = app; this.service = service; this.sciMap = new Dictionary <ScintillaControl, Object>(); this.nodeMap = new Dictionary <CodeDocument, TreeNode>(); this.treeView = new BufferedTreeView(); this.treeView.Font = Fonts.Text; this.treeView.BorderStyle = BorderStyle.None; this.treeView.ShowLines = false; this.treeView.BeforeExpand += TreeViewBeforeExpand; this.treeView.NodeMouseClick += NodeMouseClick; var img = new ImageList(); img.ColorDepth = ColorDepth.Depth32Bit; img.TransparentColor = Color.Magenta; img.ImageSize = new Size(16, 16); img.Images.Add("Folder", Bitmaps.Load <NS>("Folder")); img.Images.Add("Task", Bitmaps.Load <NS>("Task")); treeView.ImageList = img; var srv = app.GetService <IDocumentService>(); srv.EnumerateDocuments().ForEach(d => AddDocument(d as CodeDocument)); srv.DocumentAdded += DocumentAdded; srv.DocumentRemoved += DocumentRemoved; }
public OpenFilesControl() { InitializeComponent(); treeView.ImageList = imageList; treeView.ImageList.Images.Add("Folder", Bitmaps.Load <NS>("Folder")); treeView.ImageList.Images.Add("Flag", Bitmaps.Load <NS>("Flag")); FlaggedDocuments = new List <String>(); }
internal CodeSampleTreeBuilder(IApp app, SamplesControl control) { this.app = app; this.control = control; this.treeView = control.TreeView; this.treeView.ImageList.Images.Add("Folder", Bitmaps.Load <NS>("Folder")); this.treeView.BeforeExpand += BeforeExpand; this.treeView.NodeMouseClick += NodeMouseClick; this.treeView.NodeMouseDoubleClick += NodeMouseDoubleClick; }
internal DocTreeBuilder(IApp app, DocControl control) { this.app = app; this.control = control; this.treeView = control.TreeView; this.treeView.ImageList.Images.Add("Book", Bitmaps.Load<NS>("Book")); this.treeView.ImageList.Images.Add("Article", Bitmaps.Load<NS>("Article")); this.treeView.BeforeExpand += BeforeExpand; this.treeView.NodeMouseDoubleClick += NodeMouseDoubleClick; }
private void WelcomePageView_Load(object sender, EventArgs e) { BackColor = Color.White; BackgroundImage = Bitmaps.Load <NS>("WelcomePage"); BackgroundImageLayout = ImageLayout.None; version.Text = String.Format(version.Text, ElideInfo.Version, ElideInfo.VersionType); dontShow.Checked = !App.Config <WorkbenchConfig>().ShowWelcomePage; App.GetService <IConfigService>().ConfigUpdated += (o, ev) => { dontShow.Checked = !App.Config <WorkbenchConfig>().ShowWelcomePage; }; }
public ExplorerView() { extMap = new Dictionary <String, String>(); control = new ExplorerControl(); treeView = control.TreeView; imageList = new ImageList(); imageList.ImageSize = new Size(16, 16); imageList.ColorDepth = ColorDepth.Depth32Bit; imageList.TransparentColor = Color.Magenta; treeView.ImageList = imageList; imageList.Images.Add("Drive", Bitmaps.Load <NS>("Drive")); imageList.Images.Add("Folder", Bitmaps.Load <NS>("Folder")); imageList.Images.Add("File", Bitmaps.Load <NS>("File")); imageList.Images.Add("Computer", Bitmaps.Load <NS>("Computer")); imageList.Images.Add("Favorite", Bitmaps.Load <NS>("Favorite")); imageList.Images.Add("FilterFolder", Bitmaps.Load <NS>("FilterFolder")); }
public ObjectFileViewer() { InitializeComponent(); ImageList = new ImageList(); ImageList.ColorDepth = ColorDepth.Depth32Bit; ImageList.ImageSize = new Size(16, 16); ImageList.TransparentColor = Color.Magenta; ImageList.Images.Add("Folder", Bitmaps.Load <NS>("Folder")); ImageList.Images.Add("Literal", Bitmaps.Load <NS>("Literal")); ImageList.Images.Add("Module", Bitmaps.Load <NS>("Module")); ImageList.Images.Add("Variable", Bitmaps.Load <NS>("Variable")); ImageList.Images.Add("PrivateVariable", Bitmaps.Load <NS>("PrivateVariable")); ImageList.Images.Add("Symbol", Bitmaps.Load <NS>("Symbol")); ImageList.Images.Add("Layout", Bitmaps.Load <NS>("Layout")); ImageList.Images.Add("Op", Bitmaps.Load <NS>("Op")); ImageList.Images.Add("Member", Bitmaps.Load <NS>("Member")); ImageList.Images.Add("Interface", Bitmaps.Load <NS>("Interface")); ImageList.Images.Add("Instance", Bitmaps.Load <NS>("Instance")); ImageList.Images.Add("Type", Bitmaps.Load <NS>("Type")); }
public AstControl() { InitializeComponent(); treeView.Font = Fonts.Menu; treeView.ShowLines = false; treeView.BackColor = UserColors.Window; treeView.Dock = DockStyle.Fill; treeView.BorderStyle = BorderStyle.None; imageList.ColorDepth = ColorDepth.Depth32Bit; imageList.ImageSize = new Size(16, 16); imageList.TransparentColor = Color.Magenta; imageList.Images.Add("Folder", Bitmaps.Load <NS>("Folder")); imageList.Images.Add("Literal", Bitmaps.Load <NS>("Literal")); imageList.Images.Add("Module", Bitmaps.Load <NS>("Module")); imageList.Images.Add("Functon", Bitmaps.Load <NS>("Function")); imageList.Images.Add("Field", Bitmaps.Load <NS>("Field")); imageList.Images.Add("Arrow", Bitmaps.Load <NS>("Arrow")); treeView.ImageList = imageList; }
public OutlineControl() { InitializeComponent(); treeView.Font = Fonts.ControlText; var imageList = new ImageList(); imageList.ColorDepth = ColorDepth.Depth32Bit; imageList.ImageSize = new Size(16, 16); imageList.TransparentColor = Color.Magenta; imageList.Images.Add("Folder", Bitmaps.Load <NS>("Folder")); imageList.Images.Add("References", Bitmaps.Load <NS>("References")); imageList.Images.Add("Reference", Bitmaps.Load <NS>("Reference")); imageList.Images.Add("Variable", Bitmaps.Load <NS>("Variable")); imageList.Images.Add("PrivateVariable", Bitmaps.Load <NS>("PrivateVariable")); imageList.Images.Add("Module", Bitmaps.Load <NS>("Module")); imageList.Images.Add("Interface", Bitmaps.Load <NS>("Interface")); imageList.Images.Add("Type", Bitmaps.Load <NS>("Type")); imageList.Images.Add("Instance", Bitmaps.Load <NS>("Instance")); imageList.Images.Add("Member", Bitmaps.Load <NS>("Member")); treeView.ImageList = imageList; }
private Image GetImage(MessageItemType type) { return(type == MessageItemType.Error ? Bitmaps.Load("Error") : type == MessageItemType.Warning ? Bitmaps.Load("Warning") : Bitmaps.Load("Message")); }
internal static string FromResource(string key) { return(new Pixmap((Bitmap)Bitmaps.Load(key)).GetPixmap()); }