Exemplo n.º 1
0
 public override void OnApplicationStart(HmeApplicationStartArgs e)
 {
     e.Application.Root              = new View();
     _fontView                       = new FontView();
     e.Application.TextStyleCreated += _fontView.application_TextStyleCreated;
     e.Application.Root.Children.Add(_fontView);
 }
Exemplo n.º 2
0
        public override void Open(DockPanel panel, ThemeBase theme)
        {
            _view = new FontView(theme);
            _view.NewFontLoaded += FormOnNewFontLoaded;
            _view.SaveFont      += FormOnSaveFont;
            _view.SetFileFilter(Filter);

            UpdateFormLabel();
            _view.Show(panel, DockState.Document);
        }
        public override void Open(DockPanel panel)
        {
            _view = new FontView(System.IO.Path.GetFileName(Path));
            _view.NewFontLoaded += FormOnNewFontLoaded;
            _view.SaveFont      += FormOnSaveFont;
            _view.SetFileFilter(Filter);

            UpdateFormLabel();
            _view.Show(panel, DockState.Document);
        }
Exemplo n.º 4
0
    void OnEnable()
    {
        if (_spriteCollection != null)
        {
            SetGenerator(_spriteCollection);
        }

        spriteView      = new SpriteView(this);
        settingsView    = new SettingsView(this);
        fontView        = new FontView(this);
        spriteSheetView = new SpriteSheetView(this);
    }
Exemplo n.º 5
0
        public FormMain(SCIPackage package, SCIPackage translate)
        {
            _package   = package;
            _translate = translate;

            InitializeComponent();

            Text = package.GameDirectory;

            SetStyle(ControlStyles.OptimizedDoubleBuffer, true);

            sc.Panel2.Controls.Add(hexViewer  = new HexViewer());
            sc.Panel2.Controls.Add(textViewer = new TextViewer());
            sc.Panel2.Controls.Add(fontView   = new FontView());
            sc.Panel2.Controls.Add(scriptView = new ScriptView());
            sc.Panel2.Controls.Add(vocabView  = new VocabView());
            sc.Panel2.Controls.Add(msgView    = new MsgView());
            sc.Panel2.Controls.Add(picView    = new PicView());

            foreach (ResType resType in Enum.GetValues(typeof(ResType)))
            {
                var resources = package.GetResources(resType);
                if (!resources.Any())
                {
                    continue;
                }

                TreeNode tnRes = tv.Nodes.Add(ResTypeName(resType));
                tnRes.ImageKey         = "folder";
                tnRes.SelectedImageKey = tnRes.ImageKey;

                foreach (var res in resources)
                {
                    TreeNode tnRec = tnRes.Nodes.Add(res.ToString());
                    tnRec.ImageKey         = ResTypeKey(resType);
                    tnRec.SelectedImageKey = tnRec.ImageKey;
                    tnRec.Tag = res;
                }
            }

            if (_translate == null)
            {
                tsbTranslated.Checked = false;
                tsbTranslated.Visible = false;
                tsbSave.Visible       = false;
            }
        }
    void OnEnable()
    {
        if (_spriteCollection != null)
        {
            SetGenerator(_spriteCollection);
        }

        spriteView = new SpriteView(this);
        settingsView = new SettingsView(this);
        fontView = new FontView(this);
        spriteSheetView = new SpriteSheetView(this);
    }