Ejemplo n.º 1
0
        private void NewModulatedKrystal()
        {
            using (NewModulationDialog kd = new NewModulationDialog())
            {
                DialogResult      result   = kd.ShowDialog();
                ModulationKrystal mKrystal = null;
                if (result == DialogResult.OK)
                {
                    if (string.IsNullOrEmpty(kd.XInputFilepath) || string.IsNullOrEmpty(kd.YInputFilepath))
                    {
                        MessageBox.Show("Both the XInput and the YInput krystals must be set.",
                                        "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                        NewModulatedKrystal(); // recursive call
                    }
                    else if (kd.ModulationKrystal != null)
                    {
                        mKrystal = kd.ModulationKrystal;
                    }
                    else
                    {
                        mKrystal = new ModulationKrystal(kd.XInputFilepath,
                                                         kd.YInputFilepath,
                                                         kd.ModulatorFilepath);
                    }

                    ModulationEditor editor = new ModulationEditor(mKrystal);
                    editor.EventHandler = new ModulationEditor.ModulationEditorEventHandler(HandleModulationEditorEvents);
                    editor.Show();
                }
            }
        }
Ejemplo n.º 2
0
        private void OpenModulatedKrystal()
        {
            try
            {
                string modulatedKrystalFilepath = K.GetFilepathFromOpenFileDialog(K.DialogFilterIndex.modulation);
                if (modulatedKrystalFilepath.Length > 0)
                {
                    ModulationKrystal outputKrystal = new ModulationKrystal(modulatedKrystalFilepath);

                    ModulationEditor editor = new ModulationEditor(outputKrystal);
                    editor.EventHandler = new ModulationEditor.ModulationEditorEventHandler(HandleModulationEditorEvents);
                    editor.Show();
                }
            }
            catch (ApplicationException ae)
            {
                MessageBox.Show(ae.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }
Ejemplo n.º 3
0
        private void OpenModulatedKrystal()
        {
            try
            {
                string modulatedKrystalFilepath = K.GetFilepathFromOpenFileDialog(K.DialogFilterIndex.modulation);
                if (modulatedKrystalFilepath.Length > 0)
                {
                    ModulationKrystal outputKrystal = new ModulationKrystal(modulatedKrystalFilepath);

                    ModulationEditor editor = new ModulationEditor(outputKrystal);
                    editor.EventHandler = new ModulationEditor.ModulationEditorEventHandler(HandleModulationEditorEvents);
                    editor.Show();
                }
            }
            catch (ApplicationException ae)
            {
                MessageBox.Show(ae.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }
Ejemplo n.º 4
0
        private void NewModulatedKrystal()
        {
            using(NewModulationDialog kd = new NewModulationDialog())
            {
                DialogResult result = kd.ShowDialog();
                ModulationKrystal mKrystal = null;
                if(result == DialogResult.OK)
                {
                    if(string.IsNullOrEmpty(kd.XInputFilepath) || string.IsNullOrEmpty(kd.YInputFilepath))
                    {
                        MessageBox.Show("Both the XInput and the YInput krystals must be set.",
                            "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                        NewModulatedKrystal(); // recursive call
                    }
                    else if(kd.ModulationKrystal != null)
                        mKrystal = kd.ModulationKrystal;
                    else
                        mKrystal = new ModulationKrystal(kd.XInputFilepath,
                                                   kd.YInputFilepath,
                                                   kd.ModulatorFilepath);

                    ModulationEditor editor = new ModulationEditor(mKrystal);
                    editor.EventHandler = new ModulationEditor.ModulationEditorEventHandler(HandleModulationEditorEvents);
                    editor.Show();
                }
            }
        }