Esempio n. 1
0
        public MainScreen(IDictionary<Type, object> managers)
            : base(managers)
        {
            _background = ResourceManager.GetSprite("mainbg_filler");
            _background.Smoothing = Smoothing.Smooth;

            _buttConnect = new ImageButton
                               {
                                   ImageNormal = "connect_norm",
                                   ImageHover = "connect_hover"
                               };
            _buttConnect.Clicked += _buttConnect_Clicked;

            _buttOptions = new ImageButton
                               {
                                   ImageNormal = "options_norm",
                                   ImageHover = "options_hover"
                               };
            _buttOptions.Clicked += _buttOptions_Clicked;

            _buttExit = new ImageButton
                            {
                                ImageNormal = "exit_norm",
                                ImageHover = "exit_hover"
                            };
            _buttExit.Clicked += _buttExit_Clicked;

            _connectTextbox = new Textbox(100, ResourceManager) {Text = ConfigurationManager.GetServerAddress()};
            _connectTextbox.OnSubmit += ConnectTextboxOnSubmit;
            _connectTextbox.SetVisible(false);

            Assembly assembly = Assembly.GetExecutingAssembly();
            FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(assembly.Location);

            _lblVersion = new Label("v. " + fvi.FileVersion, "CALIBRI", ResourceManager);
            _lblVersion.Text.Color = Color.WhiteSmoke;
            _lblVersion.Position = new Point(Gorgon.Screen.Width - _lblVersion.ClientArea.Width - 3,
                                             Gorgon.Screen.Height - _lblVersion.ClientArea.Height - 3);

            _titleImage = new SimpleImage
                              {
                                  Sprite = "SpaceStationLogoColor",
                                  Position = new Point(Gorgon.Screen.Width - 550, 100)
                              };
        }