private void treeView1_AfterSelect(object sender, TreeViewEventArgs e) { if (this.bool_0 && (this.treeView1.SelectedNode != null)) { IUserControl tag = this.treeView1.SelectedNode.Tag as IUserControl; if (tag != null) { if (tag is RepresentationRendererPage) { (tag as RepresentationRendererPage).RepresentationClassName = this.treeView1.SelectedNode.Text; } if (this.iuserControl_0 != null) { this.iuserControl_0.Visible = false; } this.iuserControl_0 = tag; try { tag.Visible = true; } catch { tag.Visible = false; } this.bool_1 = true; } } }
void Start() { _startPosition = transform.position; _rigidbody = GetComponent <Rigidbody2D>(); _userControl = GetComponent <IUserControl>(); //Cursor.visible = false; }
private void listBox1_SelectedIndexChanged(object sender, EventArgs e) { if (this.bool_0) { if (this.listBox1.Text == "Stretched") { if (this.iuserControl_0 != null) { this.iuserControl_0.Visible = false; } this.rasterStretchedRenderPage_0.Visible = true; this.iuserControl_0 = this.rasterStretchedRenderPage_0; } else if (this.listBox1.Text == "分类") { if (this.iuserControl_0 != null) { this.iuserControl_0.Visible = false; } this.rasterClassifiedRenderPage_0.Visible = true; this.iuserControl_0 = this.rasterClassifiedRenderPage_0; } else if (this.listBox1.Text == "RGB") { if (this.iuserControl_0 != null) { this.iuserControl_0.Visible = false; } this.rasterRGBRendererPage_0.Visible = true; this.iuserControl_0 = this.rasterRGBRendererPage_0; } } }
private void checkedListBox1_SelectedIndexChanged(object sender, EventArgs e) { this.btnDelete.Enabled = this.checkedListBox1.SelectedIndices.Count > 0; int selectedIndex = this.checkedListBox1.SelectedIndex; if (this.iuserControl_0 != null) { this.iuserControl_0.Visible = false; } if (selectedIndex != -1) { ITinRenderer tinRender = (this.checkedListBox1.SelectedItem as TinRenderWrap).TinRender; if (tinRender is ITinColorRampRenderer) { this.iuserControl_0 = this.tinColorRampRenderPropertyPage_0; this.tinColorRampRenderPropertyPage_0.TinRenderer = tinRender; this.tinColorRampRenderPropertyPage_0.CurrentLayer = this.itinLayer_0; this.tinColorRampRenderPropertyPage_0.Visible = true; } else if (tinRender is ITinSingleSymbolRenderer) { this.iuserControl_0 = this.tinSimpleRenderCtrl_0; this.tinSimpleRenderCtrl_0.CurrentLayer = this.itinLayer_0; this.tinSimpleRenderCtrl_0.TinRenderer = tinRender; this.tinSimpleRenderCtrl_0.Visible = true; } else { this.iuserControl_0 = this.tinUniqueRenderPropertyPage_0; this.tinUniqueRenderPropertyPage_0.CurrentLayer = this.itinLayer_0; this.tinUniqueRenderPropertyPage_0.TinRenderer = tinRender; this.tinUniqueRenderPropertyPage_0.Visible = true; } } }
private void frmAdmin_Load(object sender, EventArgs e) { //show the user as default iUserControls = new Users(); panelFormDisplay.Controls.Clear(); panelFormDisplay.Controls.Add((System.Windows.Forms.UserControl)iUserControls); RefreshDataset(); }
/// <summary> /// Gets the entity identifier of the entity. /// </summary> /// <param name="entity">The entity.</param> /// <returns>The entity identifier of the entity.</returns> public static StringUdi GetUdi(this IUserControl entity) { if (entity == null) { throw new ArgumentNullException("entity"); } return(new StringUdi(Constants.UdiEntityType.UserControl, entity.Path.TrimStart('/')).EnsureClosed()); }
/// <summary> /// Set control system /// </summary> /// <param name="userControl"></param> public void SetControl(IUserControl userControl) { if (_userControl != null) { Destroy(_userControl.Object); } _userControl = userControl; }
/// <summary> /// Set stick control system /// </summary> /// <param name="userControl"></param> public void SetControl(IUserControl userControl) { if (_userControl != null) { Destroy(_userControl.Component); } _userControl = userControl; }
protected void InitializeLinks() { _userControl = GetComponent <IUserControl>(); _rigidbody = GetComponent <Rigidbody>(); //set team color _teamColor = TeamHolder.Instance.GetTeamByIndex(_teamIndex).TeamColor; _teamMarker.material.color = _teamColor; }
private void method_0() { if (((this.irasterLayer_1 != null) && ((this.ibasicMap_0 == null) || this.irasterLayer_1.Renderer.CanRender(this.irasterLayer_1.Raster))) && (this.irasterLayer_1.Raster != null)) { int count = 1; if (this.irasterLayer_1.Raster is IRasterBandCollection) { count = (this.irasterLayer_1.Raster as IRasterBandCollection).Count; } this.listBox1.Items.Clear(); if (count == 3) { this.listBox1.Items.Add("Stretched"); this.listBox1.Items.Add("RGB"); } else { this.listBox1.Items.Add("Stretched"); this.listBox1.Items.Add("分类"); } if (this.iuserControl_0 != null) { (this.iuserControl_0 as UserControl).Visible = false; } IRasterRenderer renderer = this.irasterLayer_1.Renderer; if (renderer is IRasterStretchColorRampRenderer) { this.listBox1.SelectedIndex = 0; this.iuserControl_0 = this.rasterStretchedRenderPage_0; this.rasterClassifiedRenderPage_0.Visible = false; this.rasterStretchedRenderPage_0.Visible = true; this.rasterRGBRendererPage_0.Visible = false; } else if (renderer is IRasterClassifyColorRampRenderer) { this.listBox1.SelectedIndex = 1; this.iuserControl_0 = this.rasterClassifiedRenderPage_0; this.rasterClassifiedRenderPage_0.Visible = true; this.rasterStretchedRenderPage_0.Visible = false; this.rasterRGBRendererPage_0.Visible = false; } else if (renderer is IRasterRGBRenderer) { this.listBox1.SelectedIndex = 1; this.iuserControl_0 = this.rasterRGBRendererPage_0; this.rasterClassifiedRenderPage_0.Visible = false; this.rasterStretchedRenderPage_0.Visible = false; this.rasterRGBRendererPage_0.Visible = true; } else if (!(renderer is IRasterUniqueValueRenderer)) { } } }
private void InitializeControls() { this.TreeView_Menu.ExpandAll(); this.userControlAdmin = new UserControl_Admin(); this.userControlMaster = new UserControl_Master(); this.userControlScanning = new UserControl_Scanning(); this.userControlScanningNew = new UserControl_Scanning_New(); this.userControlConfig = new UserControl_SettingConfig(); this.userControlFunction = new UserControl_SettingFunction(); this.userControlViewDB = new UserControl_ViewDB(); this.Panel_ControlRight.Controls.Clear(); this.Panel_ControlRight.Controls.Add(userControlConfig as UserControl); }
public static bool HasFocusableChild(this IUserControl userControl) { ControlViewModel ctl = null; do { ctl = ((ControlViewModel)userControl).GetNextControl(ctl, true); if (ctl != null && ctl.CanSelect && ctl.TabStop) { break; } } while (ctl != null); return(ctl != null); }
private void method_1() { if (this.ilayer_0 != null) { IGeoFeatureLayer layer = this.ilayer_0 as IGeoFeatureLayer; if (this.ibasicMap_0 == null) { } if (layer.FeatureClass != null) { if (this.iuserControl_0 != null) { (this.iuserControl_0 as UserControl).Visible = false; } IFeatureRenderer renderer = layer.Renderer; if (renderer is ISimpleRenderer) { this.treeView1.SelectedNode = this.treeView1.Nodes[0].Nodes[0]; this.iuserControl_0 = this.simpleRenderControl_0; this.simpleRenderControl_0.Visible = true; } else if (renderer is IUniqueValueRenderer) { if ((renderer as IUniqueValueRenderer).FieldCount > 1) { this.treeView1.SelectedNode = this.treeView1.Nodes[1].Nodes[1]; this.iuserControl_0 = this.uniqueValueRendererMoreAttributeCtrl_0; this.uniqueValueRendererMoreAttributeCtrl_0.Visible = true; } else if ((renderer as IUniqueValueRenderer).FieldCount == 1) { if (((renderer as IUniqueValueRenderer).LookupStyleset != null) && ((renderer as IUniqueValueRenderer).LookupStyleset.Length > 0)) { this.treeView1.SelectedNode = this.treeView1.Nodes[1].Nodes[2]; } else { this.treeView1.SelectedNode = this.treeView1.Nodes[1].Nodes[0]; this.iuserControl_0 = this.uniqueValueRendererCtrl_0; this.uniqueValueRendererCtrl_0.Visible = true; } } } } } }
void dialog_Close(object sender, EventArgs e) { IUserControl iuc = sender as IUserControl; var newContent = iuc.EvaluationContent; if (null == newContent) { return; } //-->前后两个值一样,不用调用失去焦点事件了。 if (null != this.EvaluationValue && null != newContent && (EvaluationValue is XElement)) { var ev = EvaluationContent as XElement; if (ev.Value.Equals(newContent.Value)) { return; } } this.EvaluationValue = newContent.Value; _LostFocusMethod(this, new EvaluationCtrlLostFocusEventArgs(sender, this.MethodName, this.EvaluationValue.ToString(), this.CurrentSelectedControlName)); }
private void btnUsers_Click(object sender, EventArgs e) { RefreshDataset(); Button button = (Button)sender; if (button.Name == "btnUsers") { iUserControls = new Users(); } else if (button.Name == "btnOrders") { iUserControls = new Orders(); } else if (button.Name == "btnPLTrade") { iUserControls = new PLTrade(); } panelFormDisplay.Controls.Clear(); panelFormDisplay.Controls.Add((System.Windows.Forms.UserControl)iUserControls); iUserControls.RefreshDataset(); }
public static void BeginInvoke(this IUserControl instance, object p) { }
private void method_1() { if (this.ilayer_0 != null) { IGeoFeatureLayer layer = this.ilayer_0 as IGeoFeatureLayer; if (layer.FeatureClass != null) { if (layer.FeatureClass.ShapeType == esriGeometryType.esriGeometryPolygon) { if (this.treeView1.Nodes[2].Nodes.Count == 2) { TreeNode node = new TreeNode("点密度渲染"); this.treeView1.Nodes[2].Nodes.Add(node); node.Tag = this.dotDensityRendererCtrl_0; } } else if (this.treeView1.Nodes[2].Nodes.Count == 3) { this.treeView1.Nodes[2].Nodes.RemoveAt(2); } if (this.iuserControl_0 != null) { (this.iuserControl_0 as UserControl).Visible = false; } IFeatureRenderer renderer = layer.Renderer; if (renderer is ISimpleRenderer) { this.treeView1.SelectedNode = this.treeView1.Nodes[0].Nodes[0]; this.iuserControl_0 = this.simpleRenderControl_0; this.simpleRenderControl_0.Visible = true; } else if (renderer is IUniqueValueRenderer) { if ((renderer as IUniqueValueRenderer).FieldCount > 1) { this.treeView1.SelectedNode = this.treeView1.Nodes[1].Nodes[1]; this.iuserControl_0 = this.uniqueValueRendererMoreAttributeCtrl_0; this.uniqueValueRendererMoreAttributeCtrl_0.Visible = true; } else if ((renderer as IUniqueValueRenderer).FieldCount == 1) { if (((renderer as IUniqueValueRenderer).LookupStyleset != null) && ((renderer as IUniqueValueRenderer).LookupStyleset.Length > 0)) { this.treeView1.SelectedNode = this.treeView1.Nodes[1].Nodes[2]; this.iuserControl_0 = this.matchStyleGrallyCtrl_0; this.matchStyleGrallyCtrl_0.Visible = true; } else { this.treeView1.SelectedNode = this.treeView1.Nodes[1].Nodes[0]; this.iuserControl_0 = this.uniqueValueRendererCtrl_0; this.uniqueValueRendererCtrl_0.Visible = true; } } } else if (renderer is IClassBreaksRenderer) { this.treeView1.SelectedNode = this.treeView1.Nodes[2].Nodes[0]; this.iuserControl_0 = this.classBreaksRendererCtrl_0; this.classBreaksRendererCtrl_0.Visible = true; } else if (renderer is IProportionalSymbolRenderer) { this.treeView1.SelectedNode = this.treeView1.Nodes[2].Nodes[1]; this.iuserControl_0 = this.proportionalSymbolRendererCtrl_0; this.proportionalSymbolRendererCtrl_0.Visible = true; } else if (renderer is IDotDensityRenderer) { this.treeView1.SelectedNode = this.treeView1.Nodes[2].Nodes[2]; this.iuserControl_0 = this.dotDensityRendererCtrl_0; this.dotDensityRendererCtrl_0.Visible = true; } else if (!(renderer is IRepresentationRenderer)) { if (renderer is IChartRenderer) { IChartRenderer renderer2 = renderer as IChartRenderer; if (renderer2.ChartSymbol is IPieChartSymbol) { this.treeView1.SelectedNode = this.treeView1.Nodes[3].Nodes[0]; this.iuserControl_0 = this.chartRendererCtrl_0; this.chartRendererCtrl_0.Visible = true; } else if (renderer2.ChartSymbol is IBarChartSymbol) { this.treeView1.SelectedNode = this.treeView1.Nodes[3].Nodes[1]; this.iuserControl_0 = this.chartRendererCtrl_1; this.chartRendererCtrl_1.Visible = true; } } } else { this.iuserControl_0 = this.representationRendererPage_0; string name = ((renderer as IRepresentationRenderer).RepresentationClass as IDataset).Name; TreeNode node2 = this.treeView1.Nodes[this.treeView1.Nodes.Count - 1]; for (int i = 0; i < node2.Nodes.Count; i++) { if (node2.Nodes[i].Text == name) { this.treeView1.SelectedNode = node2.Nodes[i]; break; } } this.representationRendererPage_0.Visible = true; } } } }
public void SetControlOnPlayer <T>() where T : Component, IUserControl { IUserControl control = _player.gameObject.AddComponent <T>(); _player.SetControl(control); }
private void cboRenderType_SelectedIndexChanged(object sender, EventArgs e) { if (this.bool_0) { if (this.iuserControl_0 != null) { (this.iuserControl_0 as UserControl).Visible = false; } IGeoFeatureLayer layer = this.ifeatureLayer_0 as IGeoFeatureLayer; switch (this.cboRenderType.Text) { case "点密度渲染": this.iuserControl_0 = this.dotDensityRendererCtrl_0; this.dotDensityRendererCtrl_0.CurrentLayer = layer; this.dotDensityRendererCtrl_0.Visible = true; break; case "单一符号渲染": this.iuserControl_0 = this.simpleRenderControl_0; this.simpleRenderControl_0.CurrentLayer = layer; this.simpleRenderControl_0.Visible = true; break; case "唯一值渲染": this.iuserControl_0 = this.uniqueValueRendererCtrl_0; this.uniqueValueRendererCtrl_0.CurrentLayer = layer; this.uniqueValueRendererCtrl_0.Visible = true; break; case "唯一值渲染,多字段": this.iuserControl_0 = this.uniqueValueRendererMoreAttributeCtrl_0; this.uniqueValueRendererMoreAttributeCtrl_0.CurrentLayer = layer; this.uniqueValueRendererMoreAttributeCtrl_0.Visible = true; break; case "渐变染色渲染": this.iuserControl_0 = this.classBreaksRendererCtrl_0; this.classBreaksRendererCtrl_0.CurrentLayer = layer; this.classBreaksRendererCtrl_0.Visible = true; break; case "比例符号渲染": this.iuserControl_0 = this.proportionalSymbolRendererCtrl_0; this.proportionalSymbolRendererCtrl_0.CurrentLayer = layer; this.proportionalSymbolRendererCtrl_0.Visible = true; break; case "饼图渲染": this.iuserControl_0 = this.chartRendererCtrl_0; this.chartRendererCtrl_0.CurrentLayer = layer; this.chartRendererCtrl_0.Visible = true; break; case "柱状图渲染": this.iuserControl_0 = this.chartRendererCtrl_1; this.chartRendererCtrl_1.CurrentLayer = layer; this.chartRendererCtrl_1.Visible = true; break; } } }
private void method_0() { this.bool_0 = false; this.cboRenderType.Properties.Items.Clear(); IGeoFeatureLayer layer = this.ifeatureLayer_0 as IGeoFeatureLayer; if (layer.FeatureClass != null) { this.dotDensityRendererCtrl_0.CurrentLayer = null; this.simpleRenderControl_0.CurrentLayer = null; this.uniqueValueRendererCtrl_0.CurrentLayer = null; this.classBreaksRendererCtrl_0.CurrentLayer = null; this.proportionalSymbolRendererCtrl_0.CurrentLayer = null; this.chartRendererCtrl_0.CurrentLayer = null; this.chartRendererCtrl_1.CurrentLayer = null; this.uniqueValueRendererMoreAttributeCtrl_0.CurrentLayer = null; this.cboRenderType.Properties.Items.Add("单一符号渲染"); this.cboRenderType.Properties.Items.Add("唯一值渲染"); this.cboRenderType.Properties.Items.Add("唯一值渲染,多字段"); this.cboRenderType.Properties.Items.Add("渐变染色渲染"); this.cboRenderType.Properties.Items.Add("比例符号渲染"); if (layer.FeatureClass.ShapeType == esriGeometryType.esriGeometryPolygon) { this.cboRenderType.Properties.Items.Add("点密度渲染"); } this.cboRenderType.Properties.Items.Add("饼图渲染"); this.cboRenderType.Properties.Items.Add("柱状图渲染"); if (this.iuserControl_0 != null) { (this.iuserControl_0 as UserControl).Visible = false; } IFeatureRenderer renderer = layer.Renderer; if (renderer is ISimpleRenderer) { this.cboRenderType.Text = "单一符号渲染"; this.iuserControl_0 = this.simpleRenderControl_0; this.simpleRenderControl_0.CurrentLayer = layer; this.simpleRenderControl_0.Visible = true; } else if (renderer is IUniqueValueRenderer) { if ((renderer as IUniqueValueRenderer).FieldCount > 1) { this.cboRenderType.Text = "唯一值渲染,多字段"; this.iuserControl_0 = this.uniqueValueRendererMoreAttributeCtrl_0; this.uniqueValueRendererMoreAttributeCtrl_0.CurrentLayer = layer; this.uniqueValueRendererMoreAttributeCtrl_0.Visible = true; } else if ((renderer as IUniqueValueRenderer).FieldCount == 1) { if (((renderer as IUniqueValueRenderer).LookupStyleset != null) && ((renderer as IUniqueValueRenderer).LookupStyleset.Length > 0)) { this.cboRenderType.Text = "唯一值渲染"; this.iuserControl_0 = this.uniqueValueRendererCtrl_0; this.uniqueValueRendererCtrl_0.CurrentLayer = layer; this.uniqueValueRendererCtrl_0.Visible = true; } else { this.cboRenderType.Text = "唯一值渲染"; this.iuserControl_0 = this.uniqueValueRendererCtrl_0; this.uniqueValueRendererCtrl_0.CurrentLayer = layer; this.uniqueValueRendererCtrl_0.Visible = true; } } } else if (renderer is IClassBreaksRenderer) { this.cboRenderType.Text = "渐变染色渲染"; this.iuserControl_0 = this.classBreaksRendererCtrl_0; this.classBreaksRendererCtrl_0.CurrentLayer = layer; this.classBreaksRendererCtrl_0.Visible = true; } else if (renderer is IProportionalSymbolRenderer) { this.cboRenderType.Text = "比例符号渲染"; this.iuserControl_0 = this.proportionalSymbolRendererCtrl_0; this.proportionalSymbolRendererCtrl_0.CurrentLayer = layer; this.proportionalSymbolRendererCtrl_0.Visible = true; } else if (renderer is IDotDensityRenderer) { this.cboRenderType.Text = "点密度渲染"; this.iuserControl_0 = this.dotDensityRendererCtrl_0; this.dotDensityRendererCtrl_0.CurrentLayer = layer; this.dotDensityRendererCtrl_0.Visible = true; } else if (renderer is IChartRenderer) { IChartRenderer renderer2 = renderer as IChartRenderer; if (renderer2.ChartSymbol is IPieChartSymbol) { this.cboRenderType.Text = "饼图渲染"; this.iuserControl_0 = this.chartRendererCtrl_0; this.chartRendererCtrl_0.CurrentLayer = layer; this.chartRendererCtrl_0.Visible = true; } else if (renderer2.ChartSymbol is IBarChartSymbol) { this.cboRenderType.Text = "柱状图渲染"; this.iuserControl_0 = this.chartRendererCtrl_1; this.chartRendererCtrl_1.CurrentLayer = layer; this.chartRendererCtrl_1.Visible = true; } } this.bool_0 = true; } }
void Start() { _userControl = GetComponent <IUserControl>(); }
public override void Init(ISpaceship spaceship) { base.Init(spaceship); _userControl = GetComponent <IUserControl>(); }
public void SetParent(IUserControl parent) { this.parent = parent; }
public AccountController(IUserControl userControl, SignInManager <User> signInManager) { this.userControl = userControl; this.signInManager = signInManager; }
public static Point PointToClient(this IUserControl instance, object p) { return(default(Point)); }
public Channel(IUserControl userControl) { _userControl = userControl; }
public void DisplayUserControlOnUserControlViewPanel(IUserControl userControl) { userControl.ShowUserControl(); }