public static new void CreateEditor(ContentControl document) { RodskaApp app = (RodskaApp)RodskaApp.Current; document.Content = null; ITypeFactory typeFactory = app.currentMainVM.GetTypeFactory(); MainWindow mainWindow = (MainWindow)app.MainWindow; if (mainWindow.CurrentDocument == null) { return; } InteractionLiteral interaction = (InteractionLiteral)mainWindow.CurrentDocument; InteractionViewModel interactionView = typeFactory.CreateInstanceWithParametersAndAutoCompletion <InteractionViewModel>(interaction); InteractionControl control = new InteractionControl(interactionView); control.interactionWorkspace.ViewModel = new NodeNetwork.ViewModels.NetworkViewModel(); InteractionNode node = new InteractionNode(interaction); control.interactionWorkspace.ViewModel.Nodes.Add(node); node.Name = interaction.Title; control.CurrentDocument = interaction; document.Content = control; }
//method to actually set evertyhing up void actualStart() { //gets the ground (gdm37::and the unit script) ground = gameObject.GetComponent<MakeGround>(); gridFunc = gameObject.GetComponent<GridFunction>(); units = gameObject.GetComponent<UnitMaster>(); //gdm37 interaction = gameObject.GetComponent<InteractionControl>(); //gdm37 //used to set up attributes of board and then create it ground.SendMessage("setTerrainAttributes"); ground.SendMessage("startMakeGrid"); //gdm37:: used to create the units units.SendMessage("teamSetup"); isBattleGUIActive = false; }
private void LoadState(State curState) { tableLayoutPanel1.Controls.Remove(_currentControl); switch (curState) { case State.Start: break; case State.FeatureModel: if (_featureModelForm == null) { _featureModelForm = new FeatureModel(_model, button2); } button2.Visible = true; _currentControl = _featureModelForm; label1.Text = @"Feature Model Settings"; button1.Enabled = false; break; case State.Features: button1.Visible = true; if (_featureForm == null) { _featureForm = new Features(_model, button2); } _currentControl = _featureForm; button1.Enabled = true; label1.Text = @"Feature Distribution"; break; case State.Interaction: if (_interacForm == null) { _interacForm = new InteractionControl(_model, button2); } _currentControl = _interacForm; label1.Text = @"Interaction Distribution"; break; case State.Variant: if (_variantForm == null) { _variantForm = new TargetVariant(_model, button2); } _currentControl = _variantForm; label1.Text = @"Variant Distribution"; break; case State.Generate: if (_varGen == null) { _varGen = new VariantGenerationControl(_model, button2); } _currentControl = _varGen; label1.Text = @"Variant Generation Settings"; break; case State.EvolutionSettings: if (_evoSetting == null) { _evoSetting = new EvolutionSettings(_model, button2); } _currentControl = _evoSetting; label1.Text = @"Evolutionary Algorithm Settings"; break; case State.Evolution: if (_evolution == null) { _evolution = new Evolution(_model, button2); } _currentControl = _evolution; label1.Text = @"Evolutionary Algorithm"; button2.Enabled = true; break; case State.Results: if (_solution == null) { _solution = new SolutionVis(_model); } button2.Enabled = false; _currentControl = _solution; label1.Text = @"Solutions"; break; default: return; } var sml = _currentControl as IStateModelLoader; sml?.LoadSettings(); _currentControl.Dock = DockStyle.Fill; _currentControl.Padding = new Padding(10); tableLayoutPanel1.Controls.Add(_currentControl, 0, 1); }
// Use this for initialization void Start() { gameMaster = GameObject.FindGameObjectWithTag("GameMaster"); ground = gameMaster.GetComponent<MakeGround>(); interaction = gameMaster.GetComponent<InteractionControl>(); }
// Use this for initialization void Start() { gameMaster = GameObject.Find("GameMaster"); //gdm37 interaction = gameMaster.GetComponent<InteractionControl>(); }