Esempio n. 1
0
        public AlgoWaveTableWindow(Registration registration, AlgoWaveTableObjectRec algoWaveTableObject, IMainWindowServices mainWindow)
        {
            this.registration        = registration;
            this.algoWaveTableObject = algoWaveTableObject;
            this.mainWindow          = mainWindow;

            InitializeComponent();
            this.Icon = OutOfPhase.Properties.Resources.Icon2;

            this.textBoxFunction.TextService = Program.Config.EnableDirectWrite ? TextEditor.TextService.DirectWrite : TextEditor.TextService.Uniscribe;
            this.textBoxFunction.AutoIndent  = Program.Config.AutoIndent;

            DpiChangeHelper.ScaleFont(this, Program.Config.AdditionalUIZoom);

            menuStripManager.SetGlobalHandler(mainWindow);
            menuStripManager.HookUpTextEditorWindowHelper(this.textEditorWindowHelper);
            menuStripManager.HookUpTextBoxWindowHelper(this.textBoxWindowHelper);

            foreach (int i in AlgoWaveTableObjectRec.NumFramesAllowedValues)
            {
                comboBoxNumFrames.Items.Add(i.ToString());
            }

            documentBindingSource.Add(mainWindow.Document);
            algoWaveTableObjectRecBindingSource.Add(algoWaveTableObject);

            textBoxName.TextChanged += new EventHandler(textBoxName_TextChanged);
            GlobalNameChanged();

            registration.Register(algoWaveTableObject, this);
        }
 protected override object Load(BinaryReader reader, Document document)
 {
     algoWaveTable = new AlgoWaveTableObjectRec(reader, new LoadContext(Document.CurrentFormatVersionNumber, document, LoadContextState.Paste));
     return(algoWaveTable);
 }
 public AlgoWaveTableClipboard(AlgoWaveTableObjectRec algoWaveTable, Document document)
     : base(document)
 {
     this.algoWaveTable = algoWaveTable;
 }