This action will force synchronization from wxd_tony1984/DevelopAssistant, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
using DevelopAssistant.Service;using ICSharpCode.TextEditor;using ICSharpCode.TextEditor.Document;using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace DevelopAssistant.AddIn.JavaProject{public partial class ProjectCodeForm : ICSharpCode.WinFormsUI.Docking.DockContent{private string WindowTheme;private string EditorTheme;private MainForm MainForm;private bool Folding = true;public ProjectCodeForm(MainForm mainForm,string windowTheme,string editorTheme){InitializeComponent();InitializeControls();this.MainForm = mainForm;this.WindowTheme = windowTheme;this.EditorTheme = editorTheme;}private void InitializeControls(){nTabControl1.Radius = 1;nTabControl1.ShowClose = false;nTabControl1.TabCaptionLm = 4;nTabControl1.ItemSize = new System.Drawing.Size(94, 26);nTabControl1.BorderColor = SystemColors.ControlDark;nTabControl1.ArrowColor = Color.White;nTabControl1.BaseColor = SystemColors.Control;nTabControl1.BackColor = SystemColors.Control;nTabControl1.SelectedColor = SystemColors.Control;nTabControl1.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;nTabControl1.TabPages.Clear();}private void TextEditorControlFormat(TextEditorControl textEditorControl1, string HighlightingName){textEditorControl1.Document.FormattingStrategy = new DefaultFormattingStrategy();if (Folding && AppSettings.FoldingStrategyEnable){textEditorControl1.Document.FoldingManager.ClearFoldings();switch (HighlightingName){case "Java":case "JavaScript":textEditorControl1.Document.FoldingManager.FoldingStrategy = new HtmlFoldingStrategy();break;case "XML":textEditorControl1.Document.FoldingManager.FoldingStrategy = new XmlFoldingStrategy();break;}textEditorControl1.Document.FoldingManager.UpdateFoldings();}textEditorControl1.ShowGuidelines = true;}private void OnCodeSnipperListChanged(List<ResultEntity> codeSnipperList){this.nTabControl1.TabPages.Clear();if (codeSnipperList != null){foreach (var codeSnipper in codeSnipperList){TabPage tabPage = new TabPage();tabPage.Padding = new Padding(4, 6, 4, 4);tabPage.Text = codeSnipper.TypeName; //codeSnipper.Name + "" +tabPage.ImageIndex = 0;string HighlightingName = "Java";switch (codeSnipper.TypeName){case "Entity":tabPage.ImageIndex = 0;HighlightingName = "Java";break;case "Mapper":tabPage.ImageIndex = 1;HighlightingName = "XML";break;case "DAO":case "Dao":tabPage.ImageIndex = 2;HighlightingName = "Java";break;case "IService":tabPage.ImageIndex = 3;HighlightingName = "Java";break;case "Service":tabPage.ImageIndex = 4;HighlightingName = "Java";break;case "Controller":tabPage.ImageIndex = 4;HighlightingName = "Java";break;}ICSharpCode.TextEditor.TextEditorControl textEditorControl = new ICSharpCode.TextEditor.TextEditorControl();textEditorControl.Dock = DockStyle.Fill;textEditorControl.Font = AppSettings.EditorSettings.EditorFont;textEditorControl.SetHighlighting(this.EditorTheme, HighlightingName);tabPage.Controls.Add(textEditorControl);textEditorControl.Text = codeSnipper.SnippetCode;TextEditorControlFormat(textEditorControl, HighlightingName);//textEditorControl.TextAreaTextChanged += TextEditorControl_TextAreaTextChanged;this.nTabControl1.TabPages.Add(tabPage);System.Threading.Thread.Sleep(200);}}this.MainForm.Close();GC.Collect();}private void TextEditorControl_TextAreaTextChanged(object sender, EventArgs e){ICSharpCode.TextEditor.TextEditorControl textEditorControl = (ICSharpCode.TextEditor.TextEditorControl)sender;textEditorControl.Document.FoldingManager.UpdateFoldings();}public void StartShowSnipperList(List<ResultEntity> codeSnipperList){System.Threading.Tasks.Task.WaitAll(new System.Threading.Tasks.Task[] {System.Threading.Tasks.Task.Run(() => {string path= Application.StartupPath+"\\Template";System.IO.DirectoryInfo directoryInfo=new System.IO.DirectoryInfo(path);System.IO.FileInfo[] templates=directoryInfo.GetFiles();System.Threading.Thread.Sleep(400);})});OnCodeSnipperListChanged(codeSnipperList);}}}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。