//Must be called by the inherited constructor protected bool ShowView(Decal.Adapter.Wrappers.PluginHost H) { if (MyDialogContainer.DialogExists(iDialogKey)) { disp = true; GC.SuppressFinalize(this); return(false); } MyDialogContainer.Initialize(); MyDialogContainer.AddDialog(iDialogKey, this, Dispose); View = ViewSystemSelector.CreateViewXML(H, GetDialogXML()); View.Visible = true; //Center view System.Drawing.Rectangle wnd = H.Actions.RegionWindow; int x = (wnd.Width - View.Size.Width) / 2; int y = (wnd.Height - View.Size.Height) / 2; View.Location = new System.Drawing.Point(x, y); #if VVS_REFERENCED if (View.ViewType == ViewSystemSelector.eViewSystem.VirindiViewService) { SetVVSProps(); } #endif return(true); }
public static void ViewInit() { //Create view here View = ViewSystemSelector.CreateViewResource(PluginCore.MyHost, "PhatACUtil.Views.MainView.xml"); // Spawn // Spawn Model txtSpawnModelSearchText = (ITextBox)View["txtSpawnModelSearchText"]; lstSpawnModelSearchList = (IList)View["lstSpawnModelSearchList"]; txtSpawnModelSearchText.Change += txtSpawnModelSearchText_Change; lstSpawnModelSearchList.Selected += lstSpawnModelSearchList_Selected; btnSpawnModelClearSpawns = (IButton)View["btnSpawnModelClearSpawns"]; btnSpawnModelClearSpawns.Hit += btnSpawnModelClearSpawns_Hit; btnSpawnModelClearLastAssessed = (IButton)View["btnSpawnModelClearLastAssessed"]; btnSpawnModelClearLastAssessed.Hit += btnSpawnModelClearLastAssessed_Hit; // Spawn Tool txtSpawnToolCommand = (ITextBox)View["txtSpawnToolCommand"]; txtSpawnToolValue = (ITextBox)View["txtSpawnToolValue"]; btnSpawnToolSpawn = (IButton)View["btnSpawnToolSpawn"]; btnSpawnToolSpawn.Hit += btnSpawnToolSpawn_Hit; btnSpawnToolSpawnTenX = (IButton)View["btnSpawnToolSpawnTenX"]; btnSpawnToolSpawnTenX.Hit += btnSpawnToolSpawnTenX_Hit; btnSpawnToolSpawnMinus = (IButton)View["btnSpawnToolSpawnMinus"]; btnSpawnToolSpawnMinus.Hit += btnSpawnToolSpawnMinus_Hit; btnSpawnToolSpawnPlus = (IButton)View["btnSpawnToolSpawnPlus"]; btnSpawnToolSpawnPlus.Hit += btnSpawnToolSpawnPlus_Hit; btnSpawnToolClearSpawns = (IButton)View["btnSpawnToolClearSpawns"]; btnSpawnToolClearSpawns.Hit += btnSpawnToolClearSpawns_Hit; btnSpawnToolClearLastAssessed = (IButton)View["btnSpawnToolClearLastAssessed"]; btnSpawnToolClearLastAssessed.Hit += btnSpawnToolClearLastAssessed_Hit; addAll(); }
protected override string GetDialogXML() { StringBuilder b = new StringBuilder(); b.Append("<?xml version=\"1.0\"?>"); b.Append("<view icon=\"" + iIcon + "\" title=\"" + iTitle + "\" width=\"296\" height=\"180\">"); b.Append("<control progid=\"DecalControls.FixedLayout\" name=\"mainlayout\" clipped=\"\">"); b.Append("<control progid=\"DecalControls.StaticText\" name=\"Label1\" left=\"8\" top=\"8\" width=\"260\" height=\"16\" text=\"Label1\"/>"); b.Append("<control progid=\"DecalControls.StaticText\" name=\"lblA\" left=\"8\" top=\"34\" width=\"60\" height=\"16\" text=\"Alpha:\"/>"); b.Append("<control progid=\"DecalControls.StaticText\" name=\"lblR\" left=\"8\" top=\"54\" width=\"60\" height=\"16\" text=\"Red:\"/>"); b.Append("<control progid=\"DecalControls.StaticText\" name=\"lblG\" left=\"8\" top=\"74\" width=\"60\" height=\"16\" text=\"Green:\"/>"); b.Append("<control progid=\"DecalControls.StaticText\" name=\"lblB\" left=\"8\" top=\"94\" width=\"60\" height=\"16\" text=\"Blue:\"/>"); b.Append("<control progid=\"DecalControls.Slider\" name=\"slA\" left=\"60\" top=\"34\" width=\"150\" height=\"16\" minimum=\"0\" maximum=\"255\" textcolor=\"0\" vertical=\"0\"/>"); b.Append("<control progid=\"DecalControls.Slider\" name=\"slR\" left=\"60\" top=\"54\" width=\"150\" height=\"16\" minimum=\"0\" maximum=\"255\" textcolor=\"0\" vertical=\"0\"/>"); b.Append("<control progid=\"DecalControls.Slider\" name=\"slG\" left=\"60\" top=\"74\" width=\"150\" height=\"16\" minimum=\"0\" maximum=\"255\" textcolor=\"0\" vertical=\"0\"/>"); b.Append("<control progid=\"DecalControls.Slider\" name=\"slB\" left=\"60\" top=\"94\" width=\"150\" height=\"16\" minimum=\"0\" maximum=\"255\" textcolor=\"0\" vertical=\"0\"/>"); bool outputbox = false; #if VVS_REFERENCED if (ViewSystemSelector.IsPresent(null, ViewSystemSelector.eViewSystem.VirindiViewService)) { outputbox = true; //We are using the VVS colorbox VVSColorBox = true; } #endif if (!outputbox) { //We are using the Decal colorbox b.Append("<control progid=\"DecalControls.PushButton\" name=\"ColorBox\" left=\"" + ColorBoxRect.Left.ToString() + "\" top=\"" + ColorBoxRect.Top.ToString() + "\" width=\"" + ColorBoxRect.Width.ToString() + "\" height=\"" + ColorBoxRect.Height.ToString() + "\" text=\"\"/>"); } for (int i = 0; i < iButtons.Length; ++i) { b.Append("<control progid=\"DecalControls.PushButton\" name=\"btn" + i.ToString() + "\" left=\"" + (224 - i * 72).ToString() + "\" top=\"124\" width=\"64\" height=\"24\" text=\"" + iButtons[i] + "\"/>"); } b.Append("</control>"); b.Append("</view>"); return(b.ToString()); }
public void ViewInit() { View = ViewSystemSelector.CreateViewResource(MyHost, "TankCommander.ViewXML.mainView.xml"); bLU1000 = (IButton)View["bLU1000"]; bSU1000 = (IButton)View["bSU1000"]; bLD1000 = (IButton)View["bLD1000"]; bSD1000 = (IButton)View["bSD1000"]; bLL1000 = (IButton)View["bLL1000"]; bSL1000 = (IButton)View["bSL1000"]; bLR1000 = (IButton)View["bLR1000"]; bSR1000 = (IButton)View["bSR1000"]; bLU0750 = (IButton)View["bLU0750"]; bSU0750 = (IButton)View["bSU0750"]; bLD0750 = (IButton)View["bLD0750"]; bSD0750 = (IButton)View["bSD0750"]; bLL0750 = (IButton)View["bLL0750"]; bSL0750 = (IButton)View["bSL0750"]; bLR0750 = (IButton)View["bLR0750"]; bSR0750 = (IButton)View["bSR0750"]; bLU0500 = (IButton)View["bLU0500"]; bSU0500 = (IButton)View["bSU0500"]; bLD0500 = (IButton)View["bLD0500"]; bSD0500 = (IButton)View["bSD0500"]; bLL0500 = (IButton)View["bLL0500"]; bSL0500 = (IButton)View["bSL0500"]; bLR0500 = (IButton)View["bLR0500"]; bSR0500 = (IButton)View["bSR0500"]; bLU0250 = (IButton)View["bLU0250"]; bSU0250 = (IButton)View["bSU0250"]; bLD0250 = (IButton)View["bLD0250"]; bSD0250 = (IButton)View["bSD0250"]; bLL0250 = (IButton)View["bLL0250"]; bSL0250 = (IButton)View["bSL0250"]; bLR0250 = (IButton)View["bLR0250"]; bSR0250 = (IButton)View["bSR0250"]; bLU0025 = (IButton)View["bLU0025"]; bSU0025 = (IButton)View["bSU0025"]; bLD0025 = (IButton)View["bLD0025"]; bSD0025 = (IButton)View["bSD0025"]; bLL0025 = (IButton)View["bLL0025"]; bSL0025 = (IButton)View["bSL0025"]; bLR0025 = (IButton)View["bLR0025"]; bSR0025 = (IButton)View["bSR0025"]; bTargetLockOn = (IButton)View["bTargetLockOn"]; bTargetLockOff = (IButton)View["bTargetLockOff"]; bLineup = (IButton)View["bLineup"]; bCombatmode = (IButton)View["bCombatmode"]; bPeacemode = (IButton)View["bPeacemode"]; bLU1000.Hit += new EventHandler(bLU1000_Hit); bSU1000.Hit += new EventHandler(bSU1000_Hit); bLD1000.Hit += new EventHandler(bLD1000_Hit); bSD1000.Hit += new EventHandler(bSD1000_Hit); bLL1000.Hit += new EventHandler(bLL1000_Hit); bSL1000.Hit += new EventHandler(bSL1000_Hit); bLR1000.Hit += new EventHandler(bLR1000_Hit); bSR1000.Hit += new EventHandler(bSR1000_Hit); bLU0750.Hit += new EventHandler(bLU0750_Hit); bSU0750.Hit += new EventHandler(bSU0750_Hit); bLD0750.Hit += new EventHandler(bLD0750_Hit); bSD0750.Hit += new EventHandler(bSD0750_Hit); bLL0750.Hit += new EventHandler(bLL0750_Hit); bSL0750.Hit += new EventHandler(bSL0750_Hit); bLR0750.Hit += new EventHandler(bLR0750_Hit); bSR0750.Hit += new EventHandler(bSR0750_Hit); bLU0500.Hit += new EventHandler(bLU0500_Hit); bSU0500.Hit += new EventHandler(bSU0500_Hit); bLD0500.Hit += new EventHandler(bLD0500_Hit); bSD0500.Hit += new EventHandler(bSD0500_Hit); bLL0500.Hit += new EventHandler(bLL0500_Hit); bSL0500.Hit += new EventHandler(bSL0500_Hit); bLR0500.Hit += new EventHandler(bLR0500_Hit); bSR0500.Hit += new EventHandler(bSR0500_Hit); bLU0250.Hit += new EventHandler(bLU0250_Hit); bSU0250.Hit += new EventHandler(bSU0250_Hit); bLD0250.Hit += new EventHandler(bLD0250_Hit); bSD0250.Hit += new EventHandler(bSD0250_Hit); bLL0250.Hit += new EventHandler(bLL0250_Hit); bSL0250.Hit += new EventHandler(bSL0250_Hit); bLR0250.Hit += new EventHandler(bLR0250_Hit); bSR0250.Hit += new EventHandler(bSR0250_Hit); bLU0025.Hit += new EventHandler(bLU0025_Hit); bSU0025.Hit += new EventHandler(bSU0025_Hit); bLD0025.Hit += new EventHandler(bLD0025_Hit); bSD0025.Hit += new EventHandler(bSD0025_Hit); bLL0025.Hit += new EventHandler(bLL0025_Hit); bSL0025.Hit += new EventHandler(bSL0025_Hit); bLR0025.Hit += new EventHandler(bLR0025_Hit); bSR0025.Hit += new EventHandler(bSR0025_Hit); bTargetLockOn.Hit += new EventHandler(bTargetLockOn_Hit); bTargetLockOff.Hit += new EventHandler(bTargetLockOff_Hit); bLineup.Hit += new EventHandler(bLineup_Hit); bCombatmode.Hit += new EventHandler(bCombatmode_Hit); bPeacemode.Hit += new EventHandler(bPeacemode_Hit); }
public static void ViewInit() { //Create view here View = ViewSystemSelector.CreateViewResource(PluginCore.MyHost, "PhatACUtil.Views.MainView.xml"); // Object txtObjectIDName = (ITextBox)View["txtObjectIDName"]; txtObjectScale = (ITextBox)View["txtObjectScale"]; btnObjectSpawn = (IButton)View["btnObjectSpawn"]; btnObjectSpawn.Hit += btnObjectSpawn_Hit; btnObjectSolidTrue = (IButton)View["btnObjectSolidTrue"]; btnObjectSolidTrue.Hit += btnObjectSolidTrue_Hit; btnObjectSolidFalse = (IButton)View["btnObjectSolidFalse"]; btnObjectSolidFalse.Hit += btnObjectSolidFalse_Hit; btnObjectEditableEnabled = (IButton)View["btnObjectEditableEnabled"]; btnObjectEditableEnabled.Hit += btnObjectEditableEnabled_Hit; btnObjectEditableDisabled = (IButton)View["btnObjectEditableDisabled"]; btnObjectEditableDisabled.Hit += btnObjectEditableDisabled_Hit; txtObjectNudgeAmount = (ITextBox)View["txtObjectNudgeAmount"]; btnObjectNudgeXMinus = (IButton)View["btnObjectNudgeXMinus"]; btnObjectNudgeXMinus.Hit += btnObjectNudgeXMinus_Hit; btnObjectNudgeXPlus = (IButton)View["btnObjectNudgeXPlus"]; btnObjectNudgeXPlus.Hit += btnObjectNudgeXPlus_Hit; btnObjectNudgeYMinus = (IButton)View["btnObjectNudgeYMinus"]; btnObjectNudgeYMinus.Hit += btnObjectNudgeYMinus_Hit; btnObjectNudgeYPlus = (IButton)View["btnObjectNudgeYPlus"]; btnObjectNudgeYPlus.Hit += btnObjectNudgeYPlus_Hit; btnObjectNudgeZMinus = (IButton)View["btnObjectNudgeZMinus"]; btnObjectNudgeZMinus.Hit += btnObjectNudgeZMinus_Hit; btnObjectNudgeZPlus = (IButton)View["btnObjectNudgeZPlus"]; btnObjectNudgeZPlus.Hit += btnObjectNudgeZPlus_Hit; txtObjectSpinAmount = (ITextBox)View["txtObjectSpinAmount"]; btnObjectSpin = (IButton)View["btnObjectSpin"]; btnObjectSpin.Hit += btnObjectSpin_Hit; btnObjectSpinWMinus = (IButton)View["btnObjectSpinWMinus"]; btnObjectSpinWMinus.Hit += btnObjectSpinWMinus_Hit; btnObjectSpinWPlus = (IButton)View["btnObjectSpinWPlus"]; btnObjectSpinWPlus.Hit += btnObjectSpinWPlus_Hit; btnObjectSpinWXMinus = (IButton)View["btnObjectSpinWXMinus"]; btnObjectSpinWXMinus.Hit += btnObjectSpinWXMinus_Hit; btnObjectSpinWXPlus = (IButton)View["btnObjectSpinWXPlus"]; btnObjectSpinWXPlus.Hit += btnObjectSpinWXPlus_Hit; btnObjectSpinWYMinus = (IButton)View["btnObjectSpinWYMinus"]; btnObjectSpinWYMinus.Hit += btnObjectSpinWYMinus_Hit; btnObjectSpinWYPlus = (IButton)View["btnObjectSpinWYPlus"]; btnObjectSpinWYPlus.Hit += btnObjectSpinWYPlus_Hit; btnObjectSpinWZMinus = (IButton)View["btnObjectSpinWZMinus"]; btnObjectSpinWZMinus.Hit += btnObjectSpinWZMinus_Hit; btnObjectSpinWZPlus = (IButton)View["btnObjectSpinWZPlus"]; btnObjectSpinWZPlus.Hit += btnObjectSpinWZPlus_Hit; // Spawn // Spawn Model txtSpawnModelSearchText = (ITextBox)View["txtSpawnModelSearchText"]; lstSpawnModelSearchList = (IList)View["lstSpawnModelSearchList"]; txtSpawnModelSearchText.Change += txtSpawnModelSearchText_Change; lstSpawnModelSearchList.Selected += lstSpawnModelSearchList_Selected; btnSpawnModelClearSpawns = (IButton)View["btnSpawnModelClearSpawns"]; btnSpawnModelClearSpawns.Hit += btnSpawnModelClearSpawns_Hit; btnSpawnModelClearLastAssessed = (IButton)View["btnSpawnModelClearLastAssessed"]; btnSpawnModelClearLastAssessed.Hit += btnSpawnModelClearLastAssessed_Hit; // Spawn Tool txtSpawnToolCommand = (ITextBox)View["txtSpawnToolCommand"]; txtSpawnToolValue = (ITextBox)View["txtSpawnToolValue"]; btnSpawnToolSpawn = (IButton)View["btnSpawnToolSpawn"]; btnSpawnToolSpawn.Hit += btnSpawnToolSpawn_Hit; btnSpawnToolSpawnTenX = (IButton)View["btnSpawnToolSpawnTenX"]; btnSpawnToolSpawnTenX.Hit += btnSpawnToolSpawnTenX_Hit; btnSpawnToolSpawnMinus = (IButton)View["btnSpawnToolSpawnMinus"]; btnSpawnToolSpawnMinus.Hit += btnSpawnToolSpawnMinus_Hit; btnSpawnToolSpawnPlus = (IButton)View["btnSpawnToolSpawnPlus"]; btnSpawnToolSpawnPlus.Hit += btnSpawnToolSpawnPlus_Hit; btnSpawnToolClearSpawns = (IButton)View["btnSpawnToolClearSpawns"]; btnSpawnToolClearSpawns.Hit += btnSpawnToolClearSpawns_Hit; btnSpawnToolClearLastAssessed = (IButton)View["btnSpawnToolClearLastAssessed"]; btnSpawnToolClearLastAssessed.Hit += btnSpawnToolClearLastAssessed_Hit; // Tele town txtTeleTownSearchText = (ITextBox)View["txtTeleTownSearchText"]; lstTeleTownSearchList = (IList)View["lstTeleTownSearchList"]; txtTeleTownSearchText.Change += txtTeleTownSearchText_Change; lstTeleTownSearchList.Selected += lstTeleTownSearchList_Selected; addAll(); }