// Use this for initialization void Start() { // Connect(); gui = GameObject.Find("Battle GUI").GetComponent <NetworkGUI>(); gui.SetOwnName(Player.Username); switch (PhotonNetwork.room.customProperties["mode"].ToString()) { case "Best of 1": distance = 1; break; case "Best of 3": distance = 3; break; case "Best of 5": distance = 5; break; } // print("Distance: " + distance); gui.SetDistance(PhotonNetwork.room.customProperties["mode"].ToString()); frames = new List <ParseObject>(); match = new Match(); match.Distance = distance; StartFrame(); }
// Network.NetworkGUI net = new Network.NetworkGUI(); public Multiple_Clique_Analysis(NetworkGUI.MainForm p) { parent = p; InitializeComponent(); add_files = new MultipleFileForm(this); //weightFileDialog = new OpenFileDialog(); // openFileDialog = new OpenFileDialog(); ncForm = new McaNCoptions(this); filenamelabel.Text = ""; }
void UserInitializeComponent() { this.SettingGUIList = new List<UserControl>(); this.MyAnimationForm = new AnimationForm(this); this.MyAnimationForm.SetOSM(this.MyOSM); this.MyAnimationForm.Show(); this.MyAnimationForm.Left = this.Right; this.DoubleBuffered = true; this.MyNetworkGUI = new NetworkGUI(this); this.MyNetworkGUI.SetOSM(this.MyOSM); this.MyNetworkGUI.Dock = DockStyle.Fill; this.MyNetworkGUI.Name = "NetworkGUI"; this.Controls.Add(this.MyNetworkGUI); this.SettingGUIList.Add(this.MyNetworkGUI); this.MyNetworkGUI.Visible = true; this.MyAgentGUI = new AgentGUI(this); this.MyAgentGUI.SetOSM(this.MyOSM); this.MyAgentGUI.Dock = DockStyle.Fill; this.MyAgentGUI.Name = "AgentGUI"; this.Controls.Add(this.MyAgentGUI); this.SettingGUIList.Add(this.MyAgentGUI); this.MyAgentGUI.Visible = false; this.MyLearningGUI = new LearningGUI(this); this.MyLearningGUI.SetOSM(this.MyOSM); this.MyLearningGUI.Dock = DockStyle.Fill; this.MyLearningGUI.Name = "LearningGUI"; this.Controls.Add(this.MyLearningGUI); this.SettingGUIList.Add(this.MyLearningGUI); this.MyLearningGUI.Visible = false; this.MyAnimationGUI = new AnimationGUI(); this.MyAnimationGUI.Dock = DockStyle.Fill; this.MyAnimationGUI.Name = "AnimationGUI"; this.Controls.Add(this.MyAnimationGUI); this.SettingGUIList.Add(this.MyAnimationGUI); this.MyAnimationGUI.Visible = false; this.MyExperimentGUI = new ExperimentGUI(this); this.MyExperimentGUI.Dock = DockStyle.Fill; this.MyExperimentGUI.Name = "ExperimentGUI"; this.Controls.Add(this.MyExperimentGUI); this.SettingGUIList.Add(this.MyExperimentGUI); this.MyExperimentGUI.Visible = false; }
public void DealWithMultipleCliques(NetworkGUI.Forms.FileForCliqueAnalysis[] files, String cutOffFileName, double binary_cut_off, bool dyadic, int opt, string fileName, string weightfile, bool useweight) { reset(); if (files[0] != null) { net.data = /*new List<Matrix>();*/ new List<global::Network.Matrices.Matrix>(); net.mTable.Clear(); List<clique> temp; List<List<clique>> cliqueList = new List<List<clique>>(); string Null; //Does nothing if (dyadic == false) { for (int i = 0; i < files.Length; i++) { net.SmartLoad(files[i].fileName, out Null); net.cet = files[i].option; temp = clique.convertClique(net.FindCliques(files[i].cutOff, false, 0.0, 0xFFFF, 0, false, _optionsForm.KCliqueValue, _optionsForm.KCliqueDiag)); net.merge(cliques, temp); if (useweight) net.LoadweightVector(weightfile); cliqueList.Add(temp); net.data.Add(net.mTable["Data"]); } } else { int variableCount = BufferedFileTable.GetFile(files[0].fileName).CountVarsInDyadicFile() - 1; for (int curVar = variableCount; curVar >= 0; --curVar) { net.cet = files[0].option; net.mTable["Data"] = MatrixReader.ReadMatrixFromFile(files[0].fileName, -1, curVar); temp = clique.convertClique(net.FindCliques(files[0].cutOff, false, 0.0, 0xFFFF, 0, false, _optionsForm.KCliqueValue, _optionsForm.KCliqueDiag)); net.merge(cliques, temp); if (useweight) net.LoadweightVector(weightfile); cliqueList.Add(temp); net.data.Add(net.mTable["Data"]); } } foreach (clique C in cliques) { C.find_num_networks(cliqueList); } cliques.Sort(delegate(clique p1, clique p2) { return p1.CompareTo(p2); }); Matrix jaffil = clique.GenerateAffiliationMatrixTemp(cliques); Matrix affil = clique.GenerateAffiliationMatrix(cliques); net.mTable.Add("Affiliation", affil); Matrix chara = clique.GenerateCharacteristicsMatrix(cliques); net.mTable.Add("chara", chara); //Matrix nc = clique.GenerateNCMatrix(net.data, cliques, _mcancForm.MCAcounterOptions); //net.mTable.Add("nc", nc); //no need //Matrix ovrlap = clique.GenerateOverLapTable(cliques); //net.mTable.Add("overlap", ovrlap); Matrix w_affil = clique.GenerateWeightedAffiliationMatrixTemp(cliques); net.mTable.Add("w_affil", w_affil); Matrix coc_mat = (jaffil.GetTranspose()) * jaffil; net.mTable.Add("coc_mat", coc_mat); Matrix cmo_mat = jaffil * (jaffil.GetTranspose()); net.mTable.Add("cmo_mat", cmo_mat); //Matrix wcoc = clique.GenerateWeightedCOCMatrix(cliques, net.mTable["coc_mat"]); Matrix wcoc = (w_affil.GetTranspose()) * w_affil; net.mTable.Add("wcoc", wcoc); Matrix wcmo = w_affil * (w_affil.GetTranspose()); net.mTable.Add("wcmo", wcmo); } #region comment /* if (opt == 0) { net.LoadMatrixIntoDataGridView(dataGrid, "wcmo"); return; } if (opt == 1) { net.LoadMatrixIntoDataGridView(dataGrid, "wcoc"); return; } if (opt == 2) { net.LoadMatrixIntoDataGridView(dataGrid, "overlap"); return; } if (opt == 3) { net.LoadMatrixIntoDataGridView(dataGrid, "CBCO"); return; } if (opt == 5) { net.LoadMatrixIntoDataGridView(dataGrid, "Affiliation"); SetChecked(); return; } if (opt == 4) { net.LoadMatrixIntoDataGridView(dataGrid, "chara"); } if (opt == 6) { net.SaveAffiliationMatrixToFile(fileName, cliques); } if (opt == 7) { net.SaveToMultivariableDyadicFile(net.data.ToArray(), fileName); } */ #endregion if (opt == 0) net.LoadMatrixIntoDataGridView(dataGrid, "wcmo"); else if (opt == 1) net.LoadMatrixIntoDataGridView(dataGrid, "wcoc"); else if (opt == 2) net.LoadMatrixIntoDataGridView(dataGrid, "cmo_mat"); //"overlap"); else if (opt == 3) net.LoadMatrixIntoDataGridView(dataGrid, "coc_mat"); //"CBCO"); else if (opt == 5) { net.LoadMatrixIntoDataGridView(dataGrid, "Affiliation"); SetChecked(); } else if (opt == 4) net.LoadMatrixIntoDataGridView(dataGrid, "chara"); else if (opt == 6) net.SaveAffiliationMatrixToFile(fileName, cliques); else if (opt == 7) net.SaveToMultivariableDyadicFile(net.data.ToArray(), fileName); else if (opt == 8) net.LoadMCACounterIntoDataGridView(dataGrid, net.mTable, cliques, _MCA_form.GetMCAcounter, _MCA_form.ncForm.TT, net.data, useweight/*, net.mcayear, net.mcanetwork, net.mcaweight*/); return; }
// Use this for initialization void Awake() { filePath = Application.persistentDataPath + string.Format("/{0}/{1}.log", Parse.ParseUser.CurrentUser.Username, Parse.ParseUser.CurrentUser.ObjectId + System.DateTime.Now.Ticks); print("Awake: " + filePath); gui = GameObject.Find("Battle GUI").GetComponent <NetworkGUI>(); }
public MultipleFileForm(NetworkGUI.Forms.Multiple_Clique_Analysis parent) { this.parent2 = parent; InitializeComponent(); }
// Use this for initialization void Start() { Connect(); gui = GameObject.Find("_GUI").GetComponent <NetworkGUI>(); }
private int _type; //realist = 1, liberal = 2, simplified realist = 3, simplified liberal = 4, NAPT simulation = 5 #endregion Fields #region Constructors public NetworkFormationSimulationForm(NetworkGUI.MainForm p) { parent = p; InitializeComponent(); _status = Status.Ready; }