示例#1
0
        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;
        }
示例#2
0
        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();
        }
示例#3
0
        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);
            }
        }
示例#4
0
 private void locationListbox_SelectedValueChanged(object sender, EventArgs e)
 {
     updateButtons();
     SelectedLocation = (Config.Location)(locationListbox.SelectedItem);
 }
示例#5
0
 private void addPositionButton_Click_1(object sender, EventArgs e)
 {
     Config.Location newPosn = new Config.Location();
     m_config.WindowPositions.Add(newPosn);
     positionList.SelectedItem = newPosn;
 }