本文整理汇总了C#中Console.Show方法的典型用法代码示例。如果您正苦于以下问题:C# Console.Show方法的具体用法?C# Console.Show怎么用?C# Console.Show使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Console
的用法示例。
在下文中一共展示了Console.Show方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Main
public Main()
{
InitializeComponent();
this.Location = new Point(Screen.AllScreens[0].Bounds.Width / 2 - this.Size.Width / 2, 0);
console = new Console(this);
console.Show();
graphics = new GraphicsCore(this);
game = new Game();
}
示例2: OnStartup
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
Console c = new Console();
ConsoleViewModel vm = new ConsoleViewModel();
vm.SomeString = "hello";
vm.SetImage(new RandomBitmapFactory().BuildRandomBitmap().Bitmap);
c.DataContext = vm;
c.Show();
}
示例3: Btn_Login_Click
private void Btn_Login_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(Txt_User.Text.Trim()) && string.IsNullOrEmpty(Txt_Pwd.Text.Trim()))
{
MessageBox.Show("用户名或密码不能为空","提示",MessageBoxButtons.OK,MessageBoxIcon.Error);
return;
}
var result = DoLogin();
var state = this.ChecinState(result);
if (state != "登录成功")
{
if (state == "请输入验证码")
{
//验证码登录
var verify = VerifyLogin(result);
var info = this.ChecinState(verify);
if (info != "登录成功")
{
MessageBox.Show(info, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
else
{
Function.Instance.user = Txt_User.Text.Trim();
Console console = new Console();
this.Hide();
console.Show();
}
}
else
{
MessageBox.Show(state, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
}
else
{
Function.Instance.user = Txt_User.Text.Trim();
Console console = new Console();
this.Hide();
console.Show();
}
}
示例4: Main
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
var console = new Console();
console.Show();
//CatModel cats = new CatModel();
ITableAdaptor cta = new MySqlTableAdaptor();
if (DialogResult.Yes == MessageBox.Show("DropTables ?", "?", MessageBoxButtons.YesNo))
{
var tt = GetTypesInNamespace(Assembly.GetExecutingAssembly(), "WindowsFormsApplication1.Model");
foreach (Type t in tt)
{
cta.DropTable(t.Name);
}
}
CreateForm(typeof(Cat));
Application.Run();
}
示例5: CheckPartList
public static bool CheckPartList(string List)
{
bool success = true;
string ignorelist = "";
Console = new Console();
Console.Show();
try
{
foreach (string p1 in List.Split('|'))
{
if (p1.Contains("#"))
continue;
if (string.IsNullOrEmpty(p1.Replace(" ", "")))
continue;
Part npart = default(Part);
string name = "";
foreach (string p2 in p1.Split(';'))
{
//Console.WriteLine("Splitting " + p1 + " into " + p2);
if (string.IsNullOrEmpty(p2))
continue;
if (p2 == Environment.NewLine)
continue;
string[] p3 = p2.Split(':');
//Console.WriteLine("Splitting " + p2 + " into " + p3[0]);
switch (p3[0])
{
case "Name":
//Console.WriteLine("Found " + p3[0]);
name = p3[1];
npart.Name = p3[1];
break;
case "RawName":
//Console.WriteLine("Found " + p3[0]);
npart.RawName = p3[1];
break;
case "Thrust":
//Console.WriteLine("Found " + p3[0]);
npart.Thrust = Convert.ToDouble(p3[1]);
break;
case "ISP":
//Console.WriteLine("Found " + p3[0]);
npart.ISP = Convert.ToInt32(p3[1]);
break;
case "LiquidFuel":
//Console.WriteLine("Found " + p3[0]);
npart.LiquidFuel = Convert.ToDouble(p3[1]);
break;
case "SolidFuel":
//Console.WriteLine("Found " + p3[0]);
break;
case "XenonGas":
//Console.WriteLine("Found " + p3[0]);
break;
case "Oxidizer":
//Console.WriteLine("Found " + p3[0]);
npart.Oxidizer = Convert.ToDouble(p3[1]);
break;
case "MonoPropellant":
//Console.WriteLine("Found " + p3[0]);
npart.MonoPropellant = Convert.ToDouble(p3[1]);
break;
case "ElectricCharge":
//Console.WriteLine("Found " + p3[0]);
npart.Electricity = Convert.ToDouble(p3[1]);
break;
case "IntakeAir":
//Console.WriteLine("Found " + p3[0]);
break;
case "Mass":
//Console.WriteLine("Found " + p3[0]);
npart.Mass = Convert.ToDouble(p3[1]);
break;
case "DryMass":
//Console.WriteLine("Found " + p3[0]);
npart.DryMass = Convert.ToDouble(p3[1]);
break;
case "Cost":
//Console.WriteLine("Found " + p3[0]);
npart.Cost = Convert.ToInt32(p3[1]);
break;
case "IsEngine":
//Console.WriteLine("Found " + p3[0]);
npart.IsEngine = Convert.ToBoolean(p3[1]);
break;
case "IsAirEngine":
//Console.WriteLine("Found " + p3[0]);
npart.IsAirEngine = Convert.ToBoolean(p3[1]);
break;
case "IsIntake":
//Console.WriteLine("Found " + p3[0]);
npart.IsIntake = Convert.ToBoolean(p3[1]);
break;
case "IsDrainingElectricity":
//Console.WriteLine("Found " + p3[0]);
npart.IsDrainingElectricity = Convert.ToBoolean(p3[1]);
break;
case "ElectricityDrainRate":
//.........这里部分代码省略.........
示例6: statsToolStripMenuItem_Click
private void statsToolStripMenuItem_Click(object sender, EventArgs e)
{
var form2 = new Console();
form2.Show();
}
示例7: OpenConsole
private void OpenConsole()
{
var console = new Console(this);
console.Show();
}
示例8: MainWindow
public MainWindow()
{
InitializeComponent();
trackingUser = false;
trackingUserId = 0;
stop = false;
console = new Console();
console.Show();
console.Top = 10;
console.Left = 10;
prompt = new UserPrompt();
prompt.Show();
prompt.Top = 10;
prompt.Left = 550;
this.Top = 250;
this.Left = 550;
context = new Context(CONFIG_FILE);
imageGenerator = new ImageGenerator(context);
userGenerator = new UserGenerator(context);
if (DRAW_SKELETON)
{
depthGenerator = new DepthGenerator(context);
depthBitmap = new WriteableBitmap(640, 480, DPI_X, DPI_Y, PixelFormats.Rgb24, null);
depthData = new DepthMetaData();
Histogram = new int[depthGenerator.DeviceMaxDepth];
skeletonDraw = new SkeletonDraw();
}
poseDetectionCapability = userGenerator.PoseDetectionCapability;
skeletonCapability = userGenerator.SkeletonCapability;
imageBitmap = new WriteableBitmap(640, 480, DPI_X, DPI_Y, PixelFormats.Rgb24, null);
imageData = new ImageMetaData();
Device.SetUp();
if (File.Exists(SpatialController.CALIBRATION_DATA_FILE))
{
spatialController = new SpatialController(ControllerStartup.FromFile, userGenerator);
}
else
{
spatialController = new SpatialController(ControllerStartup.Calibrate, userGenerator);
}
spatialController.RecalibrateCommand += new RecalibrateEventHandler(RecalibrateCommand);
userGenerator.NewUser += NewUser;
userGenerator.LostUser += LostUser;
skeletonCapability.CalibrationStart += CalibrationStart;
skeletonCapability.CalibrationEnd += CalibrationEnd;
skeletonCapability.SetSkeletonProfile(SkeletonProfile.All);
poseDetectionCapability.PoseDetected += PoseDetected;
poseDetectionCapability.PoseEnded += PoseEnded;
kinectDataThread = new Thread(new ThreadStart(ReadKinectData));
kinectDataThread.IsBackground = true;
checkGesturesThread = new Thread(new ThreadStart(CheckGestures));
checkGesturesThread.IsBackground = true;
imageTimer = new DispatcherTimer();
imageTimer.Tick += new EventHandler(ImageTick);
imageTimer.Interval = new TimeSpan(0, 0, 0, 0, 100);
kinectDataThread.Start();
checkGesturesThread.Start();
imageTimer.Start();
UserPrompt.Write("Finished loading window.");
Console.Write("Finished loading window");
UserPrompt.Write("Please assume the Psi pose and hold it until you see a skeleton overlaid"
+ " on the streaming video.");
}
示例9: button2_Click
/// <summary>
/// Shows console.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void button2_Click(object sender, EventArgs e)
{
m_consolePanel = new Console(this);
m_consolePanel.Show();
Form1.state = (int)Form1.e_states.Console;
}