コード例 #1
0
        static void Main()
        {
            Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
            key.SetValue("DialogCustomerMessageServer", Application.ExecutablePath.ToString());
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            System.Threading.Thread.Sleep(800);
            PortConfigClass callServer = new PortConfigClass();
            String          portName   = callServer.dialogServer();

            Application.Run(new DialogSplashWindow());
            if (portName != "")
            {
                Application.Run(new DialogNotificationWindow(portName));
            }
            else
            {
                Application.Run(new DialogNotificationWindow(""));
            }
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: jewandara/Dialog_Project
        static void Main()
        {
            Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
            key.SetValue("DialogCustomerMessageServer", Application.ExecutablePath.ToString());
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new DialogSplashWindow());

            PortConfigClass callServer = new PortConfigClass();

            if (callServer.dialogServer())
            {
                Application.Run(new DialogNotificationWindow(callServer._truePortName));
            }
            else
            {
                MessageBox.Show(callServer._PortMessage, "Message Server Warning", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                Application.Exit();
            }
        }