implement more features to stylish layout

This commit is contained in:
Bitl 2021-09-19 11:47:21 -07:00
parent bb65f01e18
commit 9f4484b752
7 changed files with 13225 additions and 6 deletions

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 641 KiB

View File

@ -30,35 +30,71 @@ namespace NovetusLauncher
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LauncherFormStylish));
this.splashLabel = new System.Windows.Forms.Label();
this.elementHost1 = new System.Windows.Forms.Integration.ElementHost();
this.launcherFormStylishInterface1 = new LauncherFormStylishInterface();
this.logoImageBox = new System.Windows.Forms.PictureBox();
((System.ComponentModel.ISupportInitialize)(this.logoImageBox)).BeginInit();
this.SuspendLayout();
//
// splashLabel
//
this.splashLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.splashLabel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(245)))), ((int)(((byte)(135)))), ((int)(((byte)(13)))));
this.splashLabel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.splashLabel.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.splashLabel.ForeColor = System.Drawing.Color.White;
this.splashLabel.Location = new System.Drawing.Point(12, 122);
this.splashLabel.Name = "splashLabel";
this.splashLabel.Size = new System.Drawing.Size(683, 32);
this.splashLabel.TabIndex = 1;
this.splashLabel.Text = "Novetus!";
this.splashLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.splashLabel.UseWaitCursor = true;
this.splashLabel.Paint += new System.Windows.Forms.PaintEventHandler(this.splashLabel_Paint);
//
// elementHost1
//
this.elementHost1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
this.elementHost1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.elementHost1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(78)))), ((int)(((byte)(100)))));
this.elementHost1.Location = new System.Drawing.Point(0, 57);
this.elementHost1.Location = new System.Drawing.Point(0, 157);
this.elementHost1.Name = "elementHost1";
this.elementHost1.Size = new System.Drawing.Size(707, 303);
this.elementHost1.TabIndex = 0;
this.elementHost1.Text = "elementHost1";
this.elementHost1.Child = this.launcherFormStylishInterface1;
//
// logoImageBox
//
this.logoImageBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.logoImageBox.BackColor = System.Drawing.Color.Transparent;
this.logoImageBox.Image = ((System.Drawing.Image)(resources.GetObject("logoImageBox.Image")));
this.logoImageBox.Location = new System.Drawing.Point(12, 3);
this.logoImageBox.Name = "logoImageBox";
this.logoImageBox.Size = new System.Drawing.Size(683, 116);
this.logoImageBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.logoImageBox.TabIndex = 3;
this.logoImageBox.TabStop = false;
//
// LauncherFormStylish
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(78)))), ((int)(((byte)(100)))));
this.ClientSize = new System.Drawing.Size(707, 361);
this.ClientSize = new System.Drawing.Size(707, 461);
this.Controls.Add(this.logoImageBox);
this.Controls.Add(this.splashLabel);
this.Controls.Add(this.elementHost1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.Name = "LauncherFormStylish";
this.Text = "Novetus";
this.Load += new System.EventHandler(this.LauncherFormStylish_Load);
((System.ComponentModel.ISupportInitialize)(this.logoImageBox)).EndInit();
this.ResumeLayout(false);
}
@ -67,5 +103,7 @@ namespace NovetusLauncher
private System.Windows.Forms.Integration.ElementHost elementHost1;
private LauncherFormStylishInterface launcherFormStylishInterface1;
private System.Windows.Forms.Label splashLabel;
private System.Windows.Forms.PictureBox logoImageBox;
}
}

View File

@ -16,5 +16,40 @@ namespace NovetusLauncher
{
InitializeComponent();
}
private void LauncherFormStylish_Load(object sender, EventArgs e)
{
CryptoRandom rand = new CryptoRandom();
int randColor = rand.Next(0, 2);
switch (randColor)
{
case 0:
//orange message
splashLabel.BackColor = Color.FromArgb(245, 135, 13);
break;
case 1:
//red message
splashLabel.BackColor = Color.FromArgb(255, 3, 2);
break;
default:
break;
}
}
void splashLabel_Paint(object sender, PaintEventArgs e)
{
DrawBorderSimple(e.Graphics, splashLabel.DisplayRectangle, Color.White, ButtonBorderStyle.Solid, 1);
}
void DrawBorderSimple(Graphics graphics, Rectangle bounds, Color color, ButtonBorderStyle style, int width)
{
//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
ControlPaint.DrawBorder(graphics, bounds,
color, width, style,
color, width, style,
color, width, style,
color, width, style);
}
}
}

View File

@ -480,13 +480,13 @@
<Button x:Name="ServerButton" Style="{DynamicResource HostButton}" Content="" HorizontalAlignment="Left" Margin="474,224,0,0" VerticalAlignment="Top" Width="90" Height="31" Grid.Column="1" RenderTransformOrigin="1.3,0.863"/>
<Rectangle x:Name="mapsGroupBox" Fill="#FFDEDCDC" HorizontalAlignment="Left" Height="179" Margin="230,10,0,0" Stroke="Black" VerticalAlignment="Top" Width="344" Grid.Column="1"/>
<Rectangle x:Name="mapsLabelBox" Fill="#FFAAA8A8" HorizontalAlignment="Left" Height="30" Margin="230,10,0,0" Stroke="Black" VerticalAlignment="Top" Width="344" Grid.Column="1"/>
<Label x:Name="hostServerLabel_Copy" Content="Maps" HorizontalAlignment="Left" Margin="388,9,0,0" VerticalAlignment="Top" FontSize="15" Width="52" Grid.Column="1"/>
<Label x:Name="mapsLabel" Content="Places" HorizontalAlignment="Left" Margin="388,9,0,0" VerticalAlignment="Top" FontSize="15" Width="52" Grid.Column="1"/>
<TextBox x:Name="mapsDescBox" Grid.Column="1" HorizontalAlignment="Left" Height="54" Margin="238,128,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="329" IsReadOnly="True" HorizontalContentAlignment="Left" VerticalContentAlignment="Top"/>
<TreeView x:Name="mapsBox" Grid.Column="1" HorizontalAlignment="Left" Height="61" Margin="238,64,0,0" VerticalAlignment="Top" Width="329"/>
<TextBox x:Name="searchBox" Grid.Column="1" HorizontalAlignment="Left" Height="20" Margin="238,42,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="207" HorizontalContentAlignment="Left" VerticalContentAlignment="Top" IsReadOnly="True"/>
<Button x:Name="searchButton" Style="{DynamicResource SearchButton}" Content="" Grid.Column="1" HorizontalAlignment="Left" Margin="450,43,0,0" VerticalAlignment="Top" Width="19" Height="19"/>
<Button x:Name="refreshButton" Style="{DynamicResource RefreshButton}" Content="" Grid.Column="1" HorizontalAlignment="Left" Margin="474,45,0,0" VerticalAlignment="Top" Width="16" Height="16"/>
<Button x:Name="addMapButton" Content="Add Map..." Grid.Column="1" HorizontalAlignment="Left" Margin="495,45,0,0" VerticalAlignment="Top" Width="72"/>
<Button x:Name="addMapButton" Content="Add Place" Grid.Column="1" HorizontalAlignment="Left" Margin="495,45,0,0" VerticalAlignment="Top" Width="72"/>
</Grid>
</TabItem>
<TabItem Header="VERSIONS" Style="{DynamicResource TabItemStyleSeperators}" BorderBrush="{x:Null}" Background="#FF294E64" Foreground="White" IsSelected="True" FontSize="18" FontFamily="Comic Sans MS">

Binary file not shown.

After

Width:  |  Height:  |  Size: 641 KiB