Exemple #1
0
        public AlgoSampWindow(Registration registration, AlgoSampObjectRec algoSampObject, IMainWindowServices mainWindow)
        {
            this.registration   = registration;
            this.algoSampObject = algoSampObject;
            this.mainWindow     = mainWindow;

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

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

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

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

            foreach (string item in EnumUtility.GetDescriptions(AlgoSampObjectRec.NumChannelsAllowedValues))
            {
                comboBoxChannels.Items.Add(item);
            }

            foreach (string item in EnumUtility.GetDescriptions(AlgoSampObjectRec.LoopBidirectionalAllowedValues))
            {
                comboBoxLoop1Bidirectional.Items.Add(item);
                comboBoxLoop2Bidirectional.Items.Add(item);
                comboBoxLoop3Bidirectional.Items.Add(item);
            }

            documentBindingSource.Add(mainWindow.Document);
            algoSampObjectRecBindingSource.Add(algoSampObject);

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

            registration.Register(algoSampObject, this);
        }
 protected override object Load(BinaryReader reader, Document document)
 {
     algoSamp = new AlgoSampObjectRec(reader, new LoadContext(Document.CurrentFormatVersionNumber, document, LoadContextState.Paste));
     return(algoSamp);
 }
 public AlgoSampClipboard(AlgoSampObjectRec algoSamp, Document document)
     : base(document)
 {
     this.algoSamp = algoSamp;
 }