public FunctionWindow(Registration registration, FunctionObjectRec functionObject, Document document, IMainWindowServices mainWindow) { this.registration = registration; this.functionObject = functionObject; this.document = document; this.mainWindow = mainWindow; InitializeComponent(); this.Icon = OutOfPhase.Properties.Resources.Icon2; this.textBoxFunctionBody.TextService = Program.Config.EnableDirectWrite ? TextEditor.TextService.DirectWrite : TextEditor.TextService.Uniscribe; this.textBoxFunctionBody.AutoIndent = Program.Config.AutoIndent; DpiChangeHelper.ScaleFont(this, Program.Config.AdditionalUIZoom); menuStripManager.SetGlobalHandler(mainWindow); menuStripManager.HookUpTextEditorWindowHelper(this.textEditorWindowHelper); menuStripManager.HookUpTextBoxWindowHelper(this.textBoxWindowHelper); documentBindingSource.Add(mainWindow.Document); functionObjectRecBindingSource.Add(functionObject); textBoxFunctionName.TextChanged += new EventHandler(textBoxFunctionName_TextChanged); GlobalNameChanged(); registration.Register(functionObject, this); }
protected override object Load(BinaryReader reader, Document document) { function = new FunctionObjectRec(reader, new LoadContext(Document.CurrentFormatVersionNumber, document, LoadContextState.Paste)); return(function); }
public FunctionClipboard(FunctionObjectRec function, Document document) : base(document) { this.function = function; }