示例#1
0
 public AssignForm(ConfigClient owner)
 {
     InitializeComponent();
     this.owner       = owner;
     loading          = new KellControls.FloatingCircleLoading(150);
     timer1           = new System.Timers.Timer(1000);
     timer1.AutoReset = true;
     timer1.Elapsed  += new System.Timers.ElapsedEventHandler(timer1_Elapsed);
 }
示例#2
0
 public static ConfigClient GetInstance()
 {
     if (instance == null || instance.IsDisposed)
     {
         instance = new ConfigClient();
     }
     if (!instance.Visible)
     {
         instance.Show();
     }
     instance.WindowState = FormWindowState.Normal;
     instance.BringToFront();
     instance.Focus();
     return(instance);
 }
示例#3
0
        static void Main()
        {
            //CreateDesktopShortCut();
            Process process = RuningInstance();

            if (process == null)
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(ConfigClient.GetInstance());
            }
            else
            {
                MessageBox.Show("该应用程序已经在运行中,请留意任务栏或托盘区!");
                HandleRunningInstance(process);
                FlashWindow(process.MainWindowHandle, true);
                //System.Threading.Thread.Sleep(1000);
                //System.Environment.Exit(1);
            }
            //bool createNew;
            //using (System.Threading.Mutex mutex = new System.Threading.Mutex(true, Application.ProductName, out createNew))
            //{
            //    if (createNew)
            //    {
            //        Application.EnableVisualStyles();
            //        Application.SetCompatibleTextRenderingDefault(false);
            //        Application.Run(Form1.GetInstance());
            //    }
            //    else
            //    {
            //        MessageBox.Show("应用程序已经在运行中...");
            //        System.Threading.Thread.Sleep(1000);
            //        System.Environment.Exit(1);
            //    }
            //}
        }
示例#4
0
 public FlowTemplateForm(ConfigClient owner)
 {
     InitializeComponent();
     this.flowTemplateControl1.TheOwner = owner;
 }
示例#5
0
 public LockForm(ConfigClient owner)
 {
     InitializeComponent();
     this.owner = owner;
 }
示例#6
0
 public FlowListForm(ConfigClient owner)
 {
     InitializeComponent();
     this.owner = owner;
 }