コード例 #1
0
ファイル: ProjectPanel.cs プロジェクト: zcnet4/lua-tilde
		public ProjectPanel(IManager manager)
		{
			InitializeComponent();

			m_manager = manager;
			m_mainWindow = (MainWindow) manager.MainWindow;
			m_manager.PropertyChange += new PropertyChangeEventHandler(Manager_PropertyChange);

			manager.ProjectOpened += new ProjectOpenedEventHandler(Manager_ProjectOpened);

			m_systemImageList = new SystemImageList();
			m_systemImageList.SetImageList(projectView);

			m_italicFont = new Font(projectView.Font, FontStyle.Italic);
			m_boldFont = new Font(projectView.Font, FontStyle.Bold);

			UpdateTree();

			foreach (Type docType in m_manager.GetPluginImplementations(typeof(Document)))
			{
				DocumentClassAttribute docAttr = DocumentClassAttribute.ForType(docType);
				if(docAttr != null)
				{
					ToolStripMenuItem item = new ToolStripMenuItem();
					item.Text = "New " + docAttr.Name;
					item.Click += new EventHandler(AddNewDocument_Click);
					item.Tag = docType;
					addToolStripMenuItem.DropDownItems.Insert(0, item);
				}
			}
		}
コード例 #2
0
ファイル: Program.cs プロジェクト: zcnet4/lua-tilde
		static void Main(string [] args)
		{
			Thread.CurrentThread.Name = "Main Thread";
			Application.EnableVisualStyles();
			Application.SetCompatibleTextRenderingDefault(false);

			// Check for the .NET Framework 2.0 Service Pack 1
			RegistryKey regkey = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v2.0.50727");
			if (regkey == null || regkey.GetValue("Increment") == null)
			{
				MessageBox.Show(
					"Tilde requires the .NET Framework 2.0 to be installed. Please install:\r\n\r\n"
					+ "\t" + "http://www.microsoft.com/downloads/details.aspx?FamilyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5&displaylang=en" + "\r\n"
					+ "\t" + "http://www.microsoft.com/downloads/details.aspx?familyid=79BC3B77-E02C-4AD3-AACF-A7633F706BA5&displaylang=en",
					".NET Framework Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				return;
			}
			else if(Int32.Parse(regkey.GetValue("Increment").ToString()) < 1433)
			{
				MessageBox.Show(
					"Tilde requires the .NET Framework 2.0 Service Pack 1 to be installed. Please install:\r\n\r\n"
					+ "\t" + "http://www.microsoft.com/downloads/details.aspx?familyid=79BC3B77-E02C-4AD3-AACF-A7633F706BA5&displaylang=en",
					".NET Framework Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
				return;
			}

			CommandLineArguments param = new CommandLineArguments(args);
			Manager manager = new Manager(param);
			MainWindow mainWindow = new MainWindow(manager);
			mainWindow.CreateToolWindows();

			Application.Run(mainWindow);
		}
コード例 #3
0
		public FindFileInProjectWindow(MainWindow mainWindow)
		{
			InitializeComponent();

			((MyTextBox) textBoxSearchString).WndProcMessage += new WndProcMessageHandler(textBoxSearchString_WndProcMessage);

			this.DoubleBuffered = true;

			mMainWindow = mainWindow;

			mFileItems = new List<ListViewItem>();
			mFilteredItems = new List<ListViewItem>();

			mMainWindow.Manager.ProjectOpened += new Tilde.Framework.Controller.ProjectOpenedEventHandler(Manager_ProjectOpened);
		}
コード例 #4
0
ファイル: OptionsWindow.cs プロジェクト: zcnet4/lua-tilde
		public OptionsWindow(MainWindow mainWindow)
		{
			InitializeComponent();

			mMainWindow = mainWindow;
			mCurrentPanel = null;
			mOptionsPanels = new List<OptionsPanel>();

			foreach(IOptions options in mMainWindow.Manager.OptionsManager.Options)
			{
				OptionsCollectionAttribute attr = OptionsCollectionAttribute.ForType(options.GetType());
				OptionsPanel panel = Activator.CreateInstance(attr.Editor, new object[] { mMainWindow.Manager, options }) as OptionsPanel;

				AddPanel(panel, attr.Path);
			}
		}
コード例 #5
0
		public DocumentSwitchWindow(MainWindow window)
		{
			InitializeComponent();

			mMainWindow = window;
			mSelectedContent = null;

			//SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, true);

			mButtonSettings = new ButtonSettings();
			mButtonSettings.mLabelBrush = new SolidBrush(Button.DefaultForeColor);

			mButtonSettings.mLabelFormat = new StringFormat(StringFormatFlags.NoWrap);
			mButtonSettings.mLabelFormat.Trimming = StringTrimming.EllipsisCharacter;
			mButtonSettings.mLabelFormat.Alignment = StringAlignment.Near;
			mButtonSettings.mLabelFormat.LineAlignment = StringAlignment.Center;
		}
コード例 #6
0
ファイル: PluginsWindow.cs プロジェクト: zcnet4/lua-tilde
		public PluginsWindow(MainWindow mainWindow)
		{
			InitializeComponent();

			mMainWindow = mainWindow;
		}