2020-08-10 06:58:51 +02:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace Giants.Launcher
|
|
|
|
|
{
|
2020-08-10 09:22:33 +02:00
|
|
|
|
class ScreenResolution : IComparable
|
2020-08-10 06:58:51 +02:00
|
|
|
|
{
|
|
|
|
|
public int Width { get; set; }
|
|
|
|
|
public int Height { get; set; }
|
|
|
|
|
|
|
|
|
|
public ScreenResolution(int width, int height)
|
|
|
|
|
{
|
2020-08-10 09:22:33 +02:00
|
|
|
|
this.Width = width;
|
|
|
|
|
this.Height = height;
|
2020-08-10 06:58:51 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int CompareTo(object obj)
|
|
|
|
|
{
|
|
|
|
|
if (obj == null) return 1;
|
|
|
|
|
|
|
|
|
|
ScreenResolution other = obj as ScreenResolution;
|
|
|
|
|
if (other == null)
|
|
|
|
|
throw new ArgumentException();
|
|
|
|
|
|
|
|
|
|
if (this.Width > other.Width)
|
|
|
|
|
return 1;
|
|
|
|
|
else if (this.Width == other.Width && this.Height == other.Height)
|
|
|
|
|
return 0;
|
|
|
|
|
else
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override string ToString()
|
|
|
|
|
{
|
2020-08-10 09:22:33 +02:00
|
|
|
|
return string.Format("{0}x{1}", this.Width, this.Height);
|
2020-08-10 06:58:51 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|