예제 #1
0
        public void ShowUpdateAvaliable(SimpleSGLEditor editor, String uri)
        {
            // Initializes the variables to pass to the MessageBox.Show method.
            string            message = "A newer version is avaliable. Do you want to download it now?";
            string            caption = "Update avaliable";
            MessageBoxButtons buttons = MessageBoxButtons.YesNo;
            DialogResult      result;

            if (this.InvokeRequired)
            {
                GetThisCallback d = new GetThisCallback(ShowUpdateAvaliable);
                this.Invoke(d, new object[] { editor, uri });
            }
            else
            {
                // Displays the MessageBox.
                result = MessageBox.Show(editor, message, caption, buttons, MessageBoxIcon.Information);

                if (result == DialogResult.Yes)
                {
                    // Open standard browser with the dl page
                    System.Diagnostics.Process.Start(uri);
                }
            }
        }
예제 #2
0
        public void ShowUpdateAvaliable(SimpleSGLEditor editor, String uri)
        {
            // Initializes the variables to pass to the MessageBox.Show method.
            string message = "A newer version is avaliable. Do you want to download it now?";
            string caption = "Update avaliable";
            MessageBoxButtons buttons = MessageBoxButtons.YesNo;
            DialogResult result;

            if (this.InvokeRequired)
            {
                GetThisCallback d = new GetThisCallback(ShowUpdateAvaliable);
                this.Invoke(d, new object[] { editor, uri });
            }
            else
            {
                // Displays the MessageBox.
                result = MessageBox.Show(editor, message, caption, buttons, MessageBoxIcon.Information);

                if (result == DialogResult.Yes)
                {
                    // Open standard browser with the dl page
                    System.Diagnostics.Process.Start(uri);
                }
            }
        }