PanchalSoftwares.TextFinder.GUI/Program.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
//-----------------------------------------------------------------------
// <copyright file="Program.cs" company="Panchal Softwares">
// Copyright (c) Panchal Softwares. All rights reserved.
// </copyright>
// <author>Karn Panchal</author>
//-----------------------------------------------------------------------
/// <summary>
/// Namespace Text Finder GUI.
/// </summary>
namespace PanchalSoftwares.TextFinder.GUI
{
using System;
using System.Diagnostics;
using System.Windows.Forms;
/// <summary>
/// Class Program.
/// </summary>
public static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
public static void Main()
{
if (PriorProcess() != null)
{
string text = "Application Already Running.";
string caption = "Text Finder";
MessageBox.Show(text, caption, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
else
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new FormDefault());
}
}
/// <summary>
/// Priors the process.
/// </summary>
/// <returns>
/// Returns a System.Diagnostics.Process pointing to a pre-existing process with the same name as the current one, if any; or null if the current process is unique.
/// </returns>
public static Process PriorProcess()
{
Process curr = Process.GetCurrentProcess();
Process[] procs = Process.GetProcessesByName(curr.ProcessName);
foreach (Process p in procs)
{
if ((p.Id != curr.Id) && (p.MainModule.FileName == curr.MainModule.FileName))
{
return p;
}
}
return null;
后面还有 3 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。