Example #1
0
        public FruaTlbViewer(FruaTlbFile file, PluginParameter args)
        {
            if (args.Filename.ToUpper().Contains("8X8"))
            {
                _wallTlb = true;
            }

            _file              = file;
            _pictureBox        = new PictureBox();
            _pictureBox.Paint += PictureBoxPaint;
            ContainerWidth     = args.ContainerWidth;
            Zoom       = args.Zoom;
            _container = new UserControl {
                Dock = DockStyle.Fill
            };
            _container.AutoScroll = true;
            var exportButton = new Button();

            exportButton.Text        = "Export to Wall Template";
            exportButton.AutoSize    = true;
            exportButton.MouseClick += wallTemplateExportForm;

            if (_wallTlb)
            {
                _container.Controls.Add(exportButton);
            }
            _container.Controls.Add(_pictureBox);
        }
Example #2
0
        private void LoadExternalColorTable(string p)
        {
            //  string filename = Path.GetDirectoryName(_fullPath) + "\\" + p;
            string filename = p;
            var    dungcom  = new FruaTlbFile(filename);

            dungcom.LoadBitmaps();
            _colorTable = dungcom._colorTable;

            /*
             * using (var stream = new FileStream(filename, FileMode.Open))
             * {
             *  using (var reader = new BinaryReader(stream))
             *  {
             *      _colorDataOffset = 0;
             *      //ReadColorTable(reader, 194);
             *      ReadColorTable(reader, 198);
             *  }
             * }
             */
        }
Example #3
0
        public FruaTlbViewer(FruaTlbFile file, PluginParameter args)
        {
            if (args.Filename.ToUpper().Contains("8X8"))
                _wallTlb = true;

            _file = file;
            _pictureBox = new PictureBox();
            _pictureBox.Paint += PictureBoxPaint;
            ContainerWidth = args.ContainerWidth;
            Zoom = args.Zoom;
            _container = new UserControl{ Dock = DockStyle.Fill };
            _container.AutoScroll = true;
            var exportButton = new Button();
            exportButton.Text = "Export to Wall Template";
            exportButton.AutoSize = true;
            exportButton.MouseClick += wallTemplateExportForm;

            if (_wallTlb)
                _container.Controls.Add(exportButton);
            _container.Controls.Add(_pictureBox);

         }
 public IPlugin CreateUsing(PluginParameter args)
 {
     _file  = new FruaTlbFile(args.Filename);
     Viewer = new FruaTlbViewer(_file, args);
     return(this);
 }
Example #5
0
 public IPlugin CreateUsing(PluginParameter args)
 {
     _file = new FruaTlbFile(args.Filename);
     Viewer = new FruaTlbViewer(_file, args);
     return this;
 }
Example #6
0
 private void LoadExternalColorTable(string p)
 {
   //  string filename = Path.GetDirectoryName(_fullPath) + "\\" + p;
     string filename = p;
     var dungcom = new FruaTlbFile(filename);
     dungcom.LoadBitmaps();
     _colorTable = dungcom._colorTable;
     /*
     using (var stream = new FileStream(filename, FileMode.Open))
     {
         using (var reader = new BinaryReader(stream))
         {
             _colorDataOffset = 0;
             //ReadColorTable(reader, 194);
             ReadColorTable(reader, 198);
         }
     }
      */
 }