Пример #1
0
        public HouseProperties ExportToHouseClass()
        {
            HouseProperties properties = new HouseProperties();

            properties.Music = Music;
            return(properties);
        }
Пример #2
0
 public void LoadFromHouseClass(HouseProperties properties)
 {
     Music = properties.Music;
 }
Пример #3
0
        public winHouseProperties()
            : base("winHouseProperties")
        {
            this.Windowed = true;
            this.ShowInWindowSwitcher = false;
            this.TitleBar.Text = "Music";
            this.TitleBar.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 12);
            this.TitleBar.CloseButton.Visible = true;
            this.AlwaysOnTop = true;
            this.BackColor = Color.White;
            //this.BorderStyle = SdlDotNet.Widgets.BorderStyle.FixedSingle;
            //this.BorderWidth = 1;
            //this.BorderColor = Color.Black;
            this.Size = new Size(500, 160);
            this.Location = DrawingSupport.GetCenter(SdlDotNet.Graphics.Video.Screen.Size, this.Size);

            properties = Maps.MapHelper.ActiveMap.ExportToHouseClass();

            #region General

            lblMusic = new Label("lblMusic");
            lblMusic.Font = Logic.Graphics.FontManager.LoadFont("PMU", 22);
            lblMusic.AutoSize = true;
            lblMusic.Location = new Point(20, 10);
            lblMusic.Text = "Music";

            cmbMusic = new ComboBox("cmbMusic");
            cmbMusic.Size = new System.Drawing.Size(375, 30);
            cmbMusic.Location = new Point(25, 50);

            btnPlay = new Button("btnPlay");
            btnPlay.Font = Logic.Graphics.FontManager.LoadFont("PMU", 18);
            btnPlay.Size = new System.Drawing.Size(75, 30);
            btnPlay.Location = new Point(410, 20);
            Skins.SkinManager.LoadButtonGui(btnPlay);
            btnPlay.Text = "Play";
            btnPlay.Click += new EventHandler<MouseButtonEventArgs>(btnPlay_Click);

            btnStop = new Button("btnStop");
            btnStop.Font = Logic.Graphics.FontManager.LoadFont("PMU", 18);
            btnStop.Size = new System.Drawing.Size(75, 30);
            btnStop.Location = new Point(410, 50);
            Skins.SkinManager.LoadButtonGui(btnStop);
            btnStop.Text = "Stop";
            btnStop.Click += new EventHandler<MouseButtonEventArgs>(btnStop_Click);

            btnOk = new Button("btnOk");
            btnOk.Font = Logic.Graphics.FontManager.LoadFont("PMU", 18);
            btnOk.Size = new System.Drawing.Size(75, 30);
            btnOk.Location = new Point(20, 100);
            Skins.SkinManager.LoadButtonGui(btnOk);
            btnOk.Text = "Ok";
            btnOk.Click += new EventHandler<MouseButtonEventArgs>(btnOk_Click);

            btnCancel = new Button("btnCancel");
            btnCancel.Font = Logic.Graphics.FontManager.LoadFont("PMU", 18);
            btnCancel.Size = new System.Drawing.Size(75, 30);
            btnCancel.Location = new Point(95, 100);
            Skins.SkinManager.LoadButtonGui(btnCancel);
            btnCancel.Text = "Cancel";
            btnCancel.Click += new EventHandler<MouseButtonEventArgs>(btnCancel_Click);

            #endregion

            this.AddWidget(lblMusic);
            this.AddWidget(cmbMusic);
            this.AddWidget(btnPlay);
            this.AddWidget(btnStop);
            this.AddWidget(btnOk);
            this.AddWidget(btnCancel);

            this.LoadComplete();

            LoadMusic();
        }
Пример #4
0
 public void LoadFromHouseClass(HouseProperties properties)
 {
     Music = properties.Music;
 }
Пример #5
0
 public HouseProperties ExportToHouseClass()
 {
     HouseProperties properties = new HouseProperties();
     properties.Music = Music;
     return properties;
 }
Пример #6
0
 public void LoadFromHouseClass(HouseProperties properties)
 {
     Music          = properties.Music;
     YouTubeMusicID = properties.YouTubeMusicID;
 }