public void GetUI(ILuaEditDocumentProject prjDoc) { foreach (LuaEditPageControlPage page in projectPropertiesPageControl.Pages) { page.PageContent.SetDataFromUI(prjDoc); } }
public ProjectPropertiesDebug(HistoryStack historyStack, ILuaEditDocumentProject prjDoc) { _prjDoc = prjDoc; _historyStack = historyStack; InitializeComponent(); cboStartupFile.DisplayMember = "NodeText"; }
public void SetDataFromUI(object destination) { ILuaEditDocumentProject luaPrj = destination as ILuaEditDocumentProject; if (luaPrj != null) { ILuaEditProjectProperties luaPrjProps = luaPrj.ProjectProperties; if (luaPrjProps != null) { if (cboStartupFile.SelectedIndex == 0) { luaPrjProps.StartupFileName = string.Empty; } else if (cboStartupFile.SelectedIndex > 0) { luaPrjProps.StartupFileName = Win32Utils.GetRelativePath((cboStartupFile.Items[cboStartupFile.SelectedIndex] as ILuaEditDocumentEditable).FileName, Path.GetDirectoryName(_prjDoc.FileName)); } luaPrjProps.StartAction = radStartProject.Checked ? DebugStartAction.StartProject : DebugStartAction.StartExternalProgram; luaPrjProps.UseRemoteMachine = chkRemoteMachine.Checked; luaPrjProps.RemoteMachineName = txtRemoteMachine.Text; luaPrjProps.RemotePort = Convert.ToInt32(nudPort.Value); luaPrjProps.WorkingDirectory = txtWorkingDir.Text; luaPrjProps.ExternalProgram = txtExternalProgram.Text; luaPrjProps.CommandLineArguments = txtCmdLineArgs.Text; } } }
public ProjectPropertiesMain(ILuaEditDocumentProject parentDoc, HistoryStack prjHistoryStack, string title) : this(parentDoc) { this.Text = title; _prjHistoryStack = prjHistoryStack; _prjHistoryStack.CurrentIndexChanged += OnHistoryStackIndexChanged; ConstructPageControl(); }
private void FromXml(XmlLuaSolutionDocument objectToDeserialize) { base.FromXml(objectToDeserialize); if (objectToDeserialize.ActiveProject != null) { _activeProject = FindDocumentGroup(objectToDeserialize.ActiveProject.FileName) as ILuaEditDocumentProject; } }
private void setAsStartupProjectToolStripMenuItem_Click(object sender, EventArgs e) { if (solutionExplorerTreeView.SelectedItems.Count == 1) { ILuaEditDocumentProject prjDoc = solutionExplorerTreeView.SelectedItems[0].Tag as ILuaEditDocumentProject; if (prjDoc != null) { DocumentsManager.Instance.CurrentSolution.ActiveProject = prjDoc; } } }
public ProjectPropertiesMain(ILuaEditDocumentProject parentDoc, HistoryStack prjHistoryStack, XmlLuaProjectProperties xmlData) : this(parentDoc, prjHistoryStack) { this.BuildOutputDirectory = xmlData.BuildOutputDir; this.CommandLineArguments = xmlData.CmdLineArgs; this.ExternalProgram = xmlData.ExternalProgram; this.PostBuildEventCmdLine = xmlData.PostBuildEventCmdLine; this.PreBuildEventCmdLine = xmlData.PreBuildEventCmdLine; this.RemoteMachineName = xmlData.RemoteMachineName; this.RemotePort = xmlData.RemotePort; this.RunPostBuildEvent = xmlData.RunPostBuildEvent; this.StartAction = xmlData.StartAction; this.StartupFileName = xmlData.StartupFileName; this.UseRemoteMachine = xmlData.UseRemoteMachine; this.WorkingDirectory = xmlData.WorkingDir; }
public void SetDataFromUI(object destination) { ILuaEditDocumentProject luaPrj = destination as ILuaEditDocumentProject; if (luaPrj != null) { ILuaEditProjectProperties luaPrjProps = luaPrj.ProjectProperties; if (luaPrjProps != null) { luaPrjProps.PreBuildEventCmdLine = txtPreBuildEventCmdLine.Text; luaPrjProps.PostBuildEventCmdLine = txtPostBuildEventCmdLine.Text; luaPrjProps.RunPostBuildEvent = (PostBuildRunType)cboRunPostBuildEvent.SelectedIndex; } } }
public void SetUIFromData(object source) { try { _isUpdatingUIFromData = true; ILuaEditDocumentProject luaPrj = source as ILuaEditDocumentProject; if (luaPrj != null) { ILuaEditProjectProperties luaPrjProps = luaPrj.ProjectProperties; List <ILuaEditDocumentEditable> docList = new List <ILuaEditDocumentEditable>(); GetEditableFilesFromPrjRecursive(luaPrj, docList); cboStartupFile.Items.Clear(); int startupFileSelIndex = cboStartupFile.Items.Add("Currently Selected File"); foreach (ILuaEditDocumentEditable doc in docList) { int index = cboStartupFile.Items.Add(doc); string relativeDocPath = Win32Utils.GetRelativePath(doc.FileName, Path.GetDirectoryName(_prjDoc.FileName)); if (luaPrjProps != null && luaPrjProps.StartupFileName == relativeDocPath) { startupFileSelIndex = index; } } cboStartupFile.SelectedIndex = startupFileSelIndex; if (luaPrjProps != null) { radStartProject.Checked = luaPrjProps.StartAction == DebugStartAction.StartProject; radStartExternalProgram.Checked = luaPrjProps.StartAction == DebugStartAction.StartExternalProgram; txtExternalProgram.Text = luaPrjProps.ExternalProgram; txtCmdLineArgs.Text = luaPrjProps.CommandLineArguments; chkRemoteMachine.Checked = luaPrjProps.UseRemoteMachine; txtRemoteMachine.Text = luaPrjProps.RemoteMachineName; nudPort.Value = luaPrjProps.RemotePort; txtWorkingDir.Text = luaPrjProps.WorkingDirectory; } } } finally { _isUpdatingUIFromData = false; } }
public ProjectPropertiesMain(ILuaEditDocumentProject parentDoc, HistoryStack prjHistoryStack, ILuaEditProjectProperties copy) : this(parentDoc, prjHistoryStack) { if (copy != null) { this.BuildOutputDirectory = copy.BuildOutputDirectory; this.CommandLineArguments = copy.CommandLineArguments; this.ExternalProgram = copy.ExternalProgram; this.PostBuildEventCmdLine = copy.PostBuildEventCmdLine; this.PreBuildEventCmdLine = copy.PreBuildEventCmdLine; this.RemoteMachineName = copy.RemoteMachineName; this.RemotePort = copy.RemotePort; this.RunPostBuildEvent = copy.RunPostBuildEvent; this.StartAction = copy.StartAction; this.StartupFileName = copy.StartupFileName; this.UseRemoteMachine = copy.UseRemoteMachine; this.WorkingDirectory = copy.WorkingDirectory; } }
private void propertiesToolStripMenuItem_Click(object sender, EventArgs e) { if (solutionExplorerTreeView.SelectedItems.Count > 0) { TreeListViewItem[] selectedItems = new TreeListViewItem[0]; Array.Resize <TreeListViewItem>(ref selectedItems, solutionExplorerTreeView.SelectedItems.Count); solutionExplorerTreeView.SelectedItems.CopyTo(selectedItems, 0); foreach (TreeListViewItem tlvi in selectedItems) { ILuaEditDocumentProject prjDoc = tlvi.Tag as ILuaEditDocumentProject; if (prjDoc != null) { DocumentsManager.Instance.OpenDocument(prjDoc); } } } }
public void SetDataFromUI(object destination) { ILuaEditDocumentProject luaPrj = destination as ILuaEditDocumentProject; if (luaPrj != null) { try { _isUpdatingUIFromData = true; ILuaEditProjectProperties luaPrjProps = luaPrj.ProjectProperties; if (luaPrjProps != null) { luaPrjProps.BuildOutputDirectory = txtOutputDir.Text; } } finally { _isUpdatingUIFromData = false; } } }
public void SetUIFromData(object source) { ILuaEditDocumentProject luaPrj = source as ILuaEditDocumentProject; if (luaPrj != null) { try { _isUpdatingUIFromData = true; ILuaEditProjectProperties luaPrjProps = luaPrj.ProjectProperties; if (luaPrjProps != null) { txtOutputDir.Text = luaPrjProps.BuildOutputDirectory; } } finally { _isUpdatingUIFromData = false; } } }
public void SetUIFromData(object source) { try { _isUpdatingUIFromData = true; ILuaEditDocumentProject luaPrj = source as ILuaEditDocumentProject; if (luaPrj != null) { ILuaEditProjectProperties luaPrjProps = luaPrj.ProjectProperties; if (luaPrjProps != null) { txtPreBuildEventCmdLine.Text = luaPrjProps.PreBuildEventCmdLine; txtPostBuildEventCmdLine.Text = luaPrjProps.PostBuildEventCmdLine; cboRunPostBuildEvent.SelectedIndex = (int)luaPrjProps.RunPostBuildEvent; } } } finally { _isUpdatingUIFromData = false; } }
public ActiveProjectEventArgs(ILuaEditDocumentProject currentlyActivePrj, ILuaEditDocumentProject previouslyActivePrj) { _currentlyActivePrj = currentlyActivePrj; _previouslyActivePrj = previouslyActivePrj; }
public ProjectPropertiesMain(ILuaEditDocumentProject parentDoc, HistoryStack prjHistoryStack) : this(parentDoc, prjHistoryStack, string.Empty) { }
public ProjectPropertiesMain(ILuaEditDocumentProject parentDoc) { _parentDoc = parentDoc; InitializeComponent(); }
private void removeToolStripMenuItem_Click(object sender, EventArgs e) { if (solutionExplorerTreeView.SelectedItems.Count > 0) { string confirmMsg = string.Empty; if (removeToolStripMenuItem.Text == "Remove") { if (solutionExplorerTreeView.SelectedItems.Count == 1) { ILuaEditDocument doc = solutionExplorerTreeView.SelectedItems[0].Tag as ILuaEditDocument; confirmMsg = string.Format("'{0}' will be removed.", doc); } else { confirmMsg = "The selected items will be removed."; } if (!string.IsNullOrEmpty(confirmMsg) && FrameworkManager.ShowMessageBox(confirmMsg, MessageBoxButtons.OKCancel, MessageBoxIcon.Information) == DialogResult.OK) { TreeListViewItem[] selectedItems = new TreeListViewItem[0]; Array.Resize <TreeListViewItem>(ref selectedItems, solutionExplorerTreeView.SelectedItems.Count); solutionExplorerTreeView.SelectedItems.CopyTo(selectedItems, 0); foreach (TreeListViewItem tlvi in selectedItems) { ILuaEditDocumentProject prjDoc = tlvi.Tag as ILuaEditDocumentProject; if (prjDoc != null && prjDoc.ParentDocument != null) { if (DocumentsManager.Instance.CloseDocument(prjDoc)) { prjDoc.ParentDocument.RemoveDocument(prjDoc); } } } } } else { if (solutionExplorerTreeView.SelectedItems.Count == 1) { ILuaEditDocument doc = solutionExplorerTreeView.SelectedItems[0].Tag as ILuaEditDocument; if (doc != null && doc is ILuaEditDocumentFolder) { confirmMsg = string.Format("'{0}' and all its content will be deleted permanently.", doc); } else { confirmMsg = string.Format("'{0}' will be deleted permanently.", doc); } } else { confirmMsg = "The selected items will be deleted permanently."; } if (!string.IsNullOrEmpty(confirmMsg) && FrameworkManager.ShowMessageBox(confirmMsg, MessageBoxButtons.OKCancel, MessageBoxIcon.Information) == DialogResult.OK) { TreeListViewItem[] selectedItems = new TreeListViewItem[0]; Array.Resize <TreeListViewItem>(ref selectedItems, solutionExplorerTreeView.SelectedItems.Count); solutionExplorerTreeView.SelectedItems.CopyTo(selectedItems, 0); foreach (TreeListViewItem tlvi in selectedItems) { ILuaEditDocument doc = tlvi.Tag as ILuaEditDocument; DocumentsManager.Instance.DeleteDocument(doc); } } } } }