Esempio n. 1
0
        private void Tile_Click(object sender, RoutedEventArgs e)
        {
            if (Window == null)
            {
                Window     = new CommandsGeneratorTemplate(this);
                Window.win = (Application.Current.MainWindow as IMainWindowCommands).AddWindow(Icon, Window, "命令生成器", this);
                Window.win.WindowClosed += Win_WindowClosed;
            }
            object content = null;
            string title   = (sender as Tile).Title;

            switch (title)
            {
            case "基础命令": content = new BasicCommands(Window); break;

            case "服务器命令": content = new ServerCommands(Window); break;

            case "实体命令": content = new EntityCommands(Window); break;

            case "玩家命令": content = new PlayerCommands(Window); break;

            case "Json书": content = new Book(Window); break;

            case "告示牌": content = new Sign(Window); break;

            case "消息文本": content = new Tellraw(Window); break;

            case "显示标题": content = new Title(Window); break;

            case "记分板目标": content = new ScoreboardObjective(Window); break;

            case "记分板玩家": content = new ScoreboardPlayers(Window); break;

            case "记分板队伍": content = new ScoreboardTeam(Window); break;

            case "物品NBT": content = new ItemNBT(Window); break;

            case "实体NBT": content = new EntityNBT(Window); break;

            case "物品与生成": content = new GetElement(); break;

            case "检测与执行": content = new ExecuteAndDetect(); break;

            case "方块NBT/放置填充方块": content = new SetBlocks(Window); break;

            case "村民交易": content = new VillagerTrade(Window); break;

            case "刷怪笼": content = new MobSpawner(Window); break;

            case "烟花": content = new Firework(Window); break;

            case "旗帜/盾牌": content = new Banners(Window); break;

            case "药水/药水箭": content = new Potion(Window); break;

            case "盔甲架": content = new ArmorStand(Window); break;
            }
            Window.AddPage(title, content);
        }
Esempio n. 2
0
        public SaveCommand(string cmd, CommandsGeneratorTemplate cmdGenerator)
        {
            InitializeComponent();
            refreshTreeView();
            root.IsExpanded = true;
            Data.Text       = cmd;
            CmdGenerator    = cmdGenerator;

            switch (CmdGenerator.nowCmd)
            {
            case "command": break;

            case "Pselector": CmdType.SelectedIndex = 1; break;

            case "Eselector": CmdType.SelectedIndex = 2; break;

            case "book": CmdType.SelectedIndex = 5; break;

            case "sign_item": CmdType.SelectedIndex = 6; break;

            case "sign_block": CmdType.SelectedIndex = 7; break;
            }
        }
Esempio n. 3
0
 public VillagerTrade(CommandsGeneratorTemplate cmd)
 {
     InitializeComponent();
     Tmp = cmd;
     trades.DataContext = Trades;
 }
Esempio n. 4
0
 private void Win_WindowClosed(object Sender, RoutedEventArgs e) => Window = null;