Example #1
0
        private static void Register(Image bg, string text, Type panelType, string panelText)
        {
            SimpleRegister register = new SimpleRegister();

            if (register.ShowDialog() == DialogResult.OK)
            {
                Run(bg, text, panelType, panelText);
            }
            else
            {
                Application.ExitThread();
            }
        }
Example #2
0
        public static void StartSimpleMonitor(string key, Form form, bool needregister)
        {
            if (CheckMutex(key))
            {
                GetProgramState();
                string text = Application.ProductName + Application.ProductVersion;
                form.Text = text;
                if (needregister && productState != ProgramState.Registed)
                {
                    SimpleRegister register = new SimpleRegister();
                    if (register.ShowDialog() == DialogResult.OK)
                    {
                        GetProgramState();
                        if (productState != ProgramState.Registed)
                        {
                            Application.ExitThread();
                        }
                        else
                        {
                            Application.Run(form);
                        }
                    }
                    else
                    {
                        Application.ExitThread();
                    }

                    return;
                }
                else
                {
                    Application.Run(form);
                }


                //判断是否有使用文件配置存在
                //二如果发生时间
                //把需要附加到Winform的text的信息传递过去
            }
            else
            {
                //这里用不到
                MessageBoxHelper.Show("已经运行了一个这样的程序!");
            }
        }
Example #3
0
        private void button2_Click(object sender, EventArgs e)
        {
            Form fm = new FT.Windows.Forms.SimpleRegister();

            fm.ShowDialog();
        }
Example #4
0
 private void button2_Click(object sender, EventArgs e)
 {
     Form fm = new FT.Windows.Forms.SimpleRegister();
     fm.ShowDialog();
 }
Example #5
0
        private static void Register(Image bg, string text, Type panelType, string panelText)
        {
            SimpleRegister register = new SimpleRegister();
            if (register.ShowDialog() == DialogResult.OK)
            {

                Run(bg, text,panelType,panelText);

            }
            else
            {
                Application.ExitThread();
            }
        }
Example #6
0
        public static void StartSimpleMonitor(string key,Form form,bool needregister)
        {
            if (CheckMutex(key))
            {
                GetProgramState();
                string text = Application.ProductName + Application.ProductVersion;
                form.Text = text;
                if (needregister && productState != ProgramState.Registed)
                {

                    SimpleRegister register = new SimpleRegister();
                    if (register.ShowDialog() == DialogResult.OK)
                    {
                        GetProgramState();
                        if (productState != ProgramState.Registed)
                        {
                            Application.ExitThread();
                        }
                        else{
                            Application.Run(form);
                        }

                    }
                    else
                    {
                        Application.ExitThread();
                    }

                    return;

                }
                else
                {

                    Application.Run(form);
                }

                //�ж��Ƿ���ʹ���ļ����ô���
                //���������ʱ��
                //����Ҫ���ӵ�Winform��text����Ϣ���ݹ�ȥ

            }
            else
            {
                //������
                MessageBoxHelper.Show("�Ѿ�������һ�������ij���");
            }
        }