public PyjamaForm(string[] args) { InitializeComponent(); KeyDown += new KeyEventHandler(mainForm_KeyDown); _controller = new PyjamaFormController(this); _printEngine = new PrintEngine(_controller); Text = string.Format(Text, ApplicationInformation.Title(), ApplicationInformation.Version()); SetButtonsStatus(); ApplyUserSettings(ApplicationOptions.LoadUserSettings(ApplicationOptions.GetIsolatedStorage())); //this.ActiveControl = this.outputWindow.output; // Output window gets cursor int opened = 0; foreach (string filename in args) { string fullFilename = Path.GetFullPath(filename); // FIXME: if file exists, or allow create, if dir exists? OpenFile(fullFilename); opened++; } if (opened == 0) { NewFile(); } this.ActiveControl = _docManager.GetCurrentTabTextBox(); // tab text gets cursor // FIXME: make a general language changer this.languageName.Text = "Python"; this.columnNumber.Text = "" + 1; this.lineNumber.Text = "" + 1; }
public PrintEngine(PyjamaFormController form) { _form = form; InitializeControl("Untitled"); }