fix #1146
This commit is contained in:
parent
3892369e38
commit
6fca05683a
|
|
@ -37,6 +37,11 @@ namespace VisualPascalABC.OptionsContent
|
|||
}
|
||||
optionsWindow.ShowDialog();
|
||||
}
|
||||
public void UpdateOptionsForm()
|
||||
{
|
||||
if (optionsWindow != null)
|
||||
optionsWindow.UpdateOptionsForm();
|
||||
}
|
||||
internal void Action(IOptionsContent content, OptionsContentAction action)
|
||||
{
|
||||
content.Action(action);
|
||||
|
|
|
|||
|
|
@ -45,6 +45,17 @@ namespace VisualPascalABC.OptionsContent
|
|||
}
|
||||
}
|
||||
|
||||
public void UpdateOptionsForm()
|
||||
{
|
||||
int i = 0;
|
||||
foreach (IOptionsContent content in contentEngine.ContentList)
|
||||
{
|
||||
tvContentList.Nodes[i].Text = content.ContentName;
|
||||
i++;
|
||||
}
|
||||
PascalABCCompiler.StringResources.SetTextForAllObjects(this, strprefix);
|
||||
}
|
||||
|
||||
private void tvContentList_AfterSelect(object sender, TreeViewEventArgs e)
|
||||
{
|
||||
IOptionsContent cont;
|
||||
|
|
|
|||
|
|
@ -62,27 +62,7 @@ namespace VisualPascalABC.OptionsContent
|
|||
languageSelect.SelectedItem = PascalABCCompiler.StringResourcesLanguage.CurrentLanguageName;
|
||||
cbSaveFilesIfComilationOk.Checked = MainForm.UserOptions.SaveSourceFilesIfComilationOk;
|
||||
cbPauseInRunModeIfConsole.Checked = MainForm.UserOptions.PauseInRunModeIfConsole;
|
||||
|
||||
|
||||
cbErrorsStrategy.Items.Clear();
|
||||
//cbErrorsStrategy.Items.Add(PascalABCCompiler.StringResources.Get(strprefix + "ES_ALL"));
|
||||
cbErrorsStrategy.Items.Add(PascalABCCompiler.StringResources.Get(strprefix + "ES_FIRSTONLY"));
|
||||
cbErrorsStrategy.Items.Add(PascalABCCompiler.StringResources.Get(strprefix + "ES_FIRSTSEMANTICANDSYNTAX"));
|
||||
switch (MainForm.ErrorsManager.Strategy)
|
||||
{
|
||||
/*case ErrorsStrategy.All:
|
||||
cbErrorsStrategy.SelectedItem = cbErrorsStrategy.Items[1];
|
||||
break;*/
|
||||
case ErrorsStrategy.FirstOnly:
|
||||
cbErrorsStrategy.SelectedItem = cbErrorsStrategy.Items[0];
|
||||
break;
|
||||
case ErrorsStrategy.FirstSemanticAndSyntax:
|
||||
cbErrorsStrategy.SelectedItem = cbErrorsStrategy.Items[1];
|
||||
break;
|
||||
default:
|
||||
cbErrorsStrategy.SelectedItem = cbErrorsStrategy.Items[1];
|
||||
break;
|
||||
}
|
||||
addErrorStrategyComboBox();
|
||||
|
||||
cbShowDebugPlayPauseButtons.Checked = MainForm.PlayPauseButtonsVisibleInPanel;
|
||||
alreadyShown = true;
|
||||
|
|
@ -129,10 +109,36 @@ namespace VisualPascalABC.OptionsContent
|
|||
}
|
||||
#endregion
|
||||
|
||||
private void addErrorStrategyComboBox()
|
||||
{
|
||||
cbErrorsStrategy.Items.Clear();
|
||||
//cbErrorsStrategy.Items.Add(PascalABCCompiler.StringResources.Get(strprefix + "ES_ALL"));
|
||||
cbErrorsStrategy.Items.Add(PascalABCCompiler.StringResources.Get(strprefix + "ES_FIRSTONLY"));
|
||||
cbErrorsStrategy.Items.Add(PascalABCCompiler.StringResources.Get(strprefix + "ES_FIRSTSEMANTICANDSYNTAX"));
|
||||
switch (MainForm.ErrorsManager.Strategy)
|
||||
{
|
||||
/*case ErrorsStrategy.All:
|
||||
cbErrorsStrategy.SelectedItem = cbErrorsStrategy.Items[1];
|
||||
break;*/
|
||||
case ErrorsStrategy.FirstOnly:
|
||||
cbErrorsStrategy.SelectedItem = cbErrorsStrategy.Items[0];
|
||||
break;
|
||||
case ErrorsStrategy.FirstSemanticAndSyntax:
|
||||
cbErrorsStrategy.SelectedItem = cbErrorsStrategy.Items[1];
|
||||
break;
|
||||
default:
|
||||
cbErrorsStrategy.SelectedItem = cbErrorsStrategy.Items[1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void languageSelect_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
PascalABCCompiler.StringResourcesLanguage.CurrentLanguageName = (string)languageSelect.SelectedItem;
|
||||
CodeCompletionParserController.CurrentTwoLetterISO = PascalABCCompiler.StringResourcesLanguage.CurrentTwoLetterISO;
|
||||
PascalABCCompiler.StringResources.SetTextForAllObjects(this, strprefix);
|
||||
addErrorStrategyComboBox();
|
||||
MainForm.UpdateOptionsForm();
|
||||
}
|
||||
|
||||
private void cbShowDebugPlayPauseButtons_CheckedChanged(object sender, EventArgs e)
|
||||
|
|
|
|||
|
|
@ -125,6 +125,12 @@ namespace VisualPascalABC
|
|||
optionsContentEngine.AddContent(new IntelliseseOptionsContent(this));
|
||||
}
|
||||
|
||||
public void UpdateOptionsForm()
|
||||
{
|
||||
if (optionsContentEngine != null)
|
||||
optionsContentEngine.UpdateOptionsForm();
|
||||
}
|
||||
|
||||
void AddWindowToDockPanel(DockContent dc, DockPanel dp, DockStyle dockStyle, DockState dockState, bool isFloat, DockPane dockToPane, int ind)
|
||||
{
|
||||
if (dc.Visible && dc.Pane != null)
|
||||
|
|
|
|||
Loading…
Reference in a new issue