Ejemplo n.º 1
0
        private void FormAbout_Load(object sender, System.EventArgs e)
        {
            this.label_About.Text    = ResourceUtility.GetString("RtUsingAbout");
            this.label_Password.Text = ResourceUtility.GetString("RtUsingPasswords");
            this.label_Vpp.Text      = ResourceUtility.GetString("RtUsingVpp");
            this.button_OK.Text      = ResourceUtility.GetString("RtOK");

            // general info
            this.textBox_AppInfo.Text = ResourceUtility.FormatString("RtAppGeneratedInfo", VisionControl.GenerationDateTime.ToString("r"),
                                                                     VisionControl.GeneratedByVersion);

            // vpp filename
            textBox_VppFilename.Text = mVisionControl.LoadedVppFilename;
            if (textBox_VppFilename.Text == "")
            {
                textBox_VppFilename.Text = ResourceUtility.GetString("RtNoFile");
            }

            // password info
            if (mVisionControl.UsingPasswords)
            {
                if (mVisionControl.CurrentPasswordFile != null &&
                    mVisionControl.CurrentPasswordFile.PasswordFileValid)
                {
                    textBox_PasswordFile.Text = mVisionControl.CurrentPasswordFile.PasswordFilename;
                }
                else
                {
                    textBox_PasswordFile.Text = ResourceUtility.GetString("RtDefaultPasswords");
                }
            }
            else
            {
                textBox_PasswordFile.Text = ResourceUtility.GetString("RtNoFile");
            }

            string aboutText = "";

            if (!File.Exists(mAboutFilename))
            {
                aboutText = ResourceUtility.GetString("RtNoDetails");
                textBox_AboutFile.Text = ResourceUtility.GetString("RtNoFile");
            }
            else
            {
                // open and read file
                textBox_AboutFile.Text = mAboutFilename;
                try
                {
                    if (mAboutFilename != null)
                    {
                        StreamReader sr = new StreamReader(mAboutFilename);
                        aboutText = sr.ReadToEnd();
                        sr.Close();
                    }
                }
                catch (Exception exc)
                {
                    aboutText  = ResourceUtility.FormatString("RtOpenFileError", mAboutFilename) + System.Environment.NewLine + System.Environment.NewLine;
                    aboutText += exc.ToString();
                }
            }

            // display contents
            textBox_aboutText.Text = aboutText;
        }
Ejemplo n.º 2
0
 private void FormQB_Load(object sender, System.EventArgs e)
 {
     this.Text = ResourceUtility.GetString("RtQuickBuildTitle");
     cogJobManagerEdit1.Subject = mJM;
 }
Ejemplo n.º 3
0
 private void FormPasswordPrompt_Load(object sender, System.EventArgs e)
 {
     this.label_Password.Text = ResourceUtility.GetString("RtPassword");
     this.button_OK.Text      = ResourceUtility.GetString("RtOK");
     this.button_Cancel.Text  = ResourceUtility.GetString("RtCancel");
 }