internal void SetLocation(Config.Location location) { Vector3 position; Vector3 rotation; switch (location) { case Config.Location.LeftPanel: position = LeftPosition; rotation = LeftRotation; break; case Config.Location.CenterPanel: position = CenterPosition; rotation = CenterRotation; break; case Config.Location.RightPanel: position = RightPosition; rotation = RightRotation; break; default: DestroyImmediate(this.gameObject); return; } gameObject.transform.position = position; gameObject.transform.eulerAngles = rotation; gameObject.transform.localScale = scale; }
public WindowLocationSelector(Config.Top p_config, Guid p_windowGuid, Guid p_locationGuid, bool p_multiple) : this( p_config ) { Config.Window win = p_config.GetWindow(p_windowGuid); Config.Location loc = p_config.GetLocation(p_locationGuid); windowListbox.SelectedItem = win; locationListbox.SelectedItem = loc; allowMultipleMatchesCheckBox.Checked = p_multiple; updateButtons(); }
private void applyButton_Click(object sender, EventArgs e) { Forms.ActiveWindowSelector winList = new Forms.ActiveWindowSelector(); if (winList.ShowDialog() == DialogResult.OK) { Config.Window win = new Config.Window(winList.Window); Config.Location pos = (Config.Location)positionList.SelectedItem; WindowModifier.ApplyModification(win, pos, false); } }
private void locationListbox_SelectedValueChanged(object sender, EventArgs e) { updateButtons(); SelectedLocation = (Config.Location)(locationListbox.SelectedItem); }
private void addPositionButton_Click_1(object sender, EventArgs e) { Config.Location newPosn = new Config.Location(); m_config.WindowPositions.Add(newPosn); positionList.SelectedItem = newPosn; }