public void Initialize(CraftingSimEx sim)
        {
            Sim           = sim.Clone();
            OriginalSim   = sim;
            AllActions    = CraftingAction.CraftingActions.Values.Select(x => new ImageAndActionContainer(Sim, x)).ToArray();
            AllProperties = Enum.GetValues(typeof(PropertyInfo)).OfType <PropertyInfo>().ToArray();
            AllConditions = Enum.GetValues(typeof(ConditionInfo)).OfType <ConditionInfo>().ToArray();

            CraftingConditions = new ObservableCollection <CraftingCondition>();

            CraftingConditions.CollectionChanged += OnChanged;
        }
Exemplo n.º 2
0
        public void SetCraftingSim(CraftingSimEx sim)
        {
            Sim      = sim;
            Settings = sim.StepSettings;
            var actions = Sim.GetCraftingActions();

            StepSettingsContainer[] source = new StepSettingsContainer[Settings.Length];
            for (int i = 0; i < Settings.Length; i++)
            {
                source[i] = new StepSettingsContainer {
                    Step       = i,
                    Setting    = Settings[i],
                    ActionName = "None"
                };
            }

            for (int i = 0; i < actions.Length; i++)
            {
                source[i].ActionName = actions[i].Name;
            }

            ListViewSettings.ItemsSource = source;
        }
 public CraftingActionContainer(CraftingSimEx sim, CraftingAction action)
 {
     Source = G.Actions[action.Name].Images[sim.CurrentRecipe.ClassJob];
     Sim    = sim;
     Action = action;
 }
Exemplo n.º 4
0
 public ImageAndActionContainer(CraftingSimEx sim, CraftingAction craftingAction)
 {
     CraftingAction = craftingAction;
     BitmapSource   = G.Actions[CraftingAction.Name].Images[sim.CurrentRecipe.ClassJob];
 }