Exemplo n.º 1
0
        private void RemovetoolStripMenuItem_Click(object sender, EventArgs e)
        {
            var selectedItem = (RadishWorkflow)WorkflowobjectListView.SelectedObject;

            if (selectedItem != null)
            {
                RadishController.Get().Configuration.Workflows.Remove(selectedItem);
                WorkflowobjectListView.SetObjects(RadishController.Get().Configuration.Workflows);
            }
        }
Exemplo n.º 2
0
    public void init()
    {
        if (this._map.mapData.isRadish)
        {
            this.teamController = new RadishController(this._map);
            this.teamController.init(this);
        }

        this.totalTime = this._map.addDelayCall(this._map.mapData.fightTime * 1000, this.checkNextTime, ConfigConstant.MAP_CALL_BACK_TOTAL_TIME);
    }
Exemplo n.º 3
0
        private void AddtoolStripMenuItem_Click(object sender, EventArgs e)
        {
            var newworkflow = new RadishWorkflow("New Workflow");

            RadishController.Get().Configuration.Workflows.Add(newworkflow);
            WorkflowobjectListView.SetObjects(RadishController.Get().Configuration.Workflows);

            WorkflowobjectListView.SelectedObject = newworkflow;
            viewModel.CurrentWorkflow             = newworkflow;
            PropertyGrid.SelectedObject           = newworkflow;
        }
Exemplo n.º 4
0
    public override void setData(Dictionary <string, object> data)
    {
        this.totalTime          = (TimeAction)this._map.getNetObject((int)(data["totalTime"]));
        this.totalTime.callBack = this.checkNextTime;
        this.overTimeType       = (int)data["overTimeType"];
        if (data.ContainsKey("teamController"))
        {
            this.teamController = (RadishController)this._map.getNetObject((int)(data["teamController"]));
        }

        this.timeType = (int)data["timeType"];
        base.setData(data);
    }
Exemplo n.º 5
0
        public frmRadish()
        {
            // initialize Viewmodel
            viewModel = MockKernel.Get().GetRadishVM() as RadishViewModel;
            if (viewModel.IsCorrupt)
            {
                this.Close();
            }

            InitializeComponent();
            ApplyCustomTheme();

            // Set control objects
            WorkflowobjectListView.SetObjects(RadishController.Get().Configuration.Workflows);

            PropertyGrid.SelectedObject         = viewModel.CurrentWorkflow;
            PropertyGridSettings.SelectedObject = RadishController.GetConfig();
        }
Exemplo n.º 6
0
 private void frmRadish_FormClosing(object sender, FormClosingEventArgs e)
 {
     RadishController.Get().Configuration.Save();
 }
Exemplo n.º 7
0
        public RadishViewModel()
        {
            Logger = MainController.Get().Logger;
            switch (RadishController.Get().CheckSelf())
            {
            case RadishController.ERadishStatus.SettingsError:
                // load but functions are disabled
                break;

            case RadishController.ERadishStatus.Healthy:
                // check if different from settings file
                RadishController.Get().UpdatdeSelf();
                break;

            case RadishController.ERadishStatus.NoRadish:
            default:
                // close the view
                IsCorrupt = true;
                return;
            }

            RadishController.Get().Configuration.PropertyChanged += ConfigurationUpdated;

            // load bats
            var batlist = Directory.GetFiles(RadishController.Get().Configuration.RadishProjectPath, "*.bat*", SearchOption.AllDirectories)
                          .ToList();

            radishBats = new List <RadishBatFileWrapper>();
            foreach (var path in batlist)
            {
                var bat = new RadishBatFileWrapper(path);
                radishBats.Add(bat);
            }

            LaunchQuestEditorCommand = new RelayCommand(LaunchQuestEditor, CanLaunchQuestEditor);
            FullRebuildCommand       = new RelayCommand(FullRebuild, CanFullRebuild);
            RunSelectedCommand       = new RelayCommand(RunSelected, CanRunSelected);
            BuildUntilPackCommand    = new RelayCommand(BuildUntilPack, CanBuildUntilPack);
            PackCommand          = new RelayCommand(Pack, CanPack);
            ReCreateLinksCommand = new RelayCommand(ReCreateLinks, CanReCreateLinks);
            StartGameCommand     = new RelayCommand(StartGame, CanStartGame);

            RecreateLinksInternal();


            #region Setup Workflows
            // initialize workflows
            if (!RadishController.GetConfig().Workflows.Any(_ => _.Name == "All"))
            {
                RadishController.GetConfig().Workflows.Add(new RadishWorkflow("All")
                {
                    Cleanup_folder = true,

                    ENCODE_WORLD     = true,
                    ENCODE_ENVS      = true,
                    ENCODE_SCENES    = true,
                    ENCODE_QUEST     = true,
                    ENCODE_STRINGS   = true,
                    ENCODE_SPEECH    = true,
                    ENCODE_HAIRWORKS = true,

                    WCC_IMPORT_MODELS   = true,
                    WCC_IMPORT_TEXTURES = true,
                    WCC_COOK            = true,
                    WCC_NAVDATA         = true,
                    WCC_TEXTURECACHE    = true,
                    WCC_COLLISIONCACHE  = true,
                    WCC_ANALYZE         = true,
                    WCC_ANALYZE_WORLD   = true,

                    WCC_REPACK_DLC     = true,
                    WCC_REPACK_MOD     = true,
                    DEPLOY_SCRIPTS     = true,
                    DEPLOY_TMP_SCRIPTS = true,
                });
            }
            if (!RadishController.GetConfig().Workflows.Any(_ => _.Name == "Rebuild until pack"))
            {
                RadishController.GetConfig().Workflows.Add(new RadishWorkflow("Rebuild until pack")
                {
                    Cleanup_folder = true,

                    ENCODE_WORLD     = true,
                    ENCODE_ENVS      = true,
                    ENCODE_SCENES    = true,
                    ENCODE_QUEST     = true,
                    ENCODE_STRINGS   = true,
                    ENCODE_SPEECH    = true,
                    ENCODE_HAIRWORKS = true,

                    WCC_IMPORT_MODELS   = true,
                    WCC_IMPORT_TEXTURES = true,
                });
            }
            if (!RadishController.GetConfig().Workflows.Any(_ => _.Name == "Pack"))
            {
                RadishController.GetConfig().Workflows.Add(new RadishWorkflow("Pack")
                {
                    WCC_REPACK_DLC     = true,
                    WCC_REPACK_MOD     = true,
                    DEPLOY_SCRIPTS     = true,
                    DEPLOY_TMP_SCRIPTS = true,
                });
            }
            #endregion

            CurrentWorkflow = RadishController.Get().Configuration.Workflows.First();
        }