Beispiel #1
0
        private void LoadFile(string filename)
        {
            try
            {
                editControl.Text = File.ReadAllText(filename);

                _loadedFilename = Path.GetFileName(filename);
                _bufferType     = Path.GetExtension(filename).Equals(".pff", StringComparison.InvariantCultureIgnoreCase) ? Processor.BufferType.Pff :
                                  Path.GetExtension(filename).Equals(".mgf", StringComparison.InvariantCultureIgnoreCase) ? Processor.BufferType.Message :
                                  Processor.BufferType.Logic;
                RefreshUiElements();
            }

            catch (Exception exception)
            {
                MessageBox.Show(exception.Message);
            }
        }
Beispiel #2
0
 private void languageMenuItem_Click(object sender, EventArgs e)
 {
     _bufferType = (Processor.BufferType)((ToolStripMenuItem)sender).Tag;
     RefreshUiElements();
 }