/// <summary>
        /// Create and initialize the chem master UI client-side. Creates the basic layout,
        /// actual data isn't filled in until the server sends data about the chem master.
        /// </summary>
        public ChemMasterWindow()
        {
            RobustXamlLoader.Load(this);
            IoCManager.InjectDependencies(this);
            LabelLineEdit.OnTextEntered += e => OnLabelEntered?.Invoke(e.Text);

            //Pill type selection buttons, in total there are 20 pills.
            //Pill rsi file should have states named as pill1, pill2, and so on.
            var resourcePath  = new ResourcePath(PillsRsiPath);
            var pillTypeGroup = new ButtonGroup();

            PillTypeButtons = new Button[20];
            for (uint i = 0; i < PillTypeButtons.Length; i++)
            {
                //For every button decide which stylebase to have
                //Every row has 10 buttons
                String styleBase = StyleBase.ButtonOpenBoth;
                uint   modulo    = i % 10;
                if (i > 0 && modulo == 0)
                {
                    styleBase = StyleBase.ButtonOpenRight;
                }
                else if (i > 0 && modulo == 9)
                {
                    styleBase = StyleBase.ButtonOpenLeft;
                }
                else if (i == 0)
                {
                    styleBase = StyleBase.ButtonOpenRight;
                }

                //Generate buttons
                PillTypeButtons[i] = new Button
                {
                    Access       = AccessLevel.Public,
                    StyleClasses = { styleBase },
예제 #2
0
        public HandLabelerWindow()
        {
            RobustXamlLoader.Load(this);

            LabelLineEdit.OnTextEntered += e => OnLabelEntered?.Invoke(e.Text);
        }