Example #1
0
        public void Import(string filename, bool isFalseColor = false)
        {
            try
            {
                ClipboardBuffer buffer;
                if (isFalseColor && string.Equals(".png", Path.GetExtension(filename), StringComparison.InvariantCultureIgnoreCase))
                {
                    buffer = ClipboardBuffer.LoadFalseColor(filename);
                }
                else
                {
                    buffer = ClipboardBuffer.Load(filename);
                }

                if (buffer != null)
                {
                    buffer.RenderBuffer();
                    LoadedBuffers.Add(buffer);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Schematic File Error", MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
Example #2
0
        public void Import(string filename)
        {
            ClipboardBuffer buffer = null;

            try
            {
                buffer = ClipboardBuffer.Load(filename);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Schematic File Error", MessageBoxButton.OK, MessageBoxImage.Error);
            }

            if (buffer != null)
            {
                buffer.RenderBuffer();
                LoadedBuffers.Add(buffer);
            }
        }