private void btnGroupBySiteState_Click(object sender, EventArgs e) { if (!CheckConnection()) { return; } foreach (var item in _group_items) { if (sender.Equals(item)) { item.Checked = true; } else { item.Checked = false; } } if (sender.Equals(btnGroupByVariable)) { _GroupMethod = GroupMethod.VariableMedium; } else if (sender.Equals(btnGroupBySiteState)) { _GroupMethod = GroupMethod.SiteState; } else if (sender.Equals(btnGroupBySiteCategory)) { _GroupMethod = GroupMethod.SiteCategory; } CreateNodes(); }
public void Start(ServerCommand command) { switch (command.Type) { case CommandType.Blocked: var method = new BlockedMethod(); method.SetParams(int.Parse(command.Parameters[1]), int.Parse(command.Parameters[2])); method.Execute(command.Parameters); break; case CommandType.GetMatrixs: new MatrixHelper().Start(int.Parse(command.Parameters[1]), int.Parse(command.Parameters[2])); break; case CommandType.Unblocked: var umethod = new UnblockedMedhod(); umethod.SetParams(int.Parse(command.Parameters[1]), int.Parse(command.Parameters[2])); umethod.Execute(command.Parameters); break; case CommandType.Group: var gmethod = new GroupMethod(); gmethod.SetParams(int.Parse(command.Parameters[1]), int.Parse(command.Parameters[2]), int.Parse(command.Parameters[3])); gmethod.Execute(command.Parameters); break; case CommandType.Unknown: break; } }
public DatabaseExplorer() { InitializeComponent(); this.Load += DatabaseExplorer_Load; _NodeCreator = new ODMNodeCreator(); _NodeCreator.ImageList = this.imageList_odm; this.nodeStateIcon1.DataPropertyName = "Image"; this.nodeTextBox1.DataPropertyName = "Text"; _GroupMethod = GroupMethod.VariableMedium; _group_items = new ToolStripMenuItem[] { btnGroupBySiteCategory, btnGroupBySiteState, btnGroupByVariable }; }