private void PasteSyntax()
{
//copy to clipboard and return for this function
// Clipboard.SetText(cmd.CommandSyntax);
//Clipboard.SetText("asd dddddw");
//Launch Syntax Editor window with command pasted /// 29Jan2013
MainWindow mwindow = LifetimeService.Instance.Container.Resolve <MainWindow>();
////// Start Syntax Editor //////
SyntaxEditorWindow sewindow = LifetimeService.Instance.Container.Resolve <SyntaxEditorWindow>();
sewindow.Owner = mwindow;
//string syncomment = "# Use BSkyFormat(obj) to format the output.\n" +
// "# UAloadDataset(\'" + UIController.GetActiveDocument().FileName.Replace('\\', '/') +
// "\', filetype=\'SPSS\', worksheetName=NULL, replace_ds=FALSE, csvHeader=TRUE, datasetName=\'" +
// UIController.GetActiveDocument().Name + "\' )\n";
// sewindow.PasteSyntax(syncomment + "asd dddddw");//paste command
string syncomment = BSky.GlobalResources.Properties.UICtrlResources.syncomment + " " + "\"" + getTitle() + "\"";
if (string.IsNullOrEmpty(getCommand()))
{
syncomment = syncomment = BSky.GlobalResources.Properties.UICtrlResources.syncomment2 + "\"" + getTitle() + "\"";
}
else
{
syncomment = syncomment + "\n" + getCommand();
}
sewindow.PasteSyntax(syncomment);
sewindow.Show();
sewindow.WindowState = WindowState.Normal;
sewindow.Activate();
this.Close();
}