示例#1
0
        //constructor
        public FormChild(string path, string file, FormParent f)
        {
            InitializeComponent();
            String ext = path.Substring(path.IndexOf(".", 0) + 1, 3);

            // if it is already encrypted
            if (ext.CompareTo("kpt") == 0)
            {
                do
                {
                    DialogUserNameEncryptedFile user = new DialogUserNameEncryptedFile();
                    if (user.ShowDialog() == DialogResult.OK)
                    {
                        string myUser = user.UserName;
                        nadiaUserControl1.SetUser = myUser;
                    }
                } while (nadiaUserControl1.UserExists == false);
                fileExt = "Krypt-Zapper Files | *.kpt";
            }
            else
            {
                fileExt = "Text Files | *.txt";
            }

            formParent = f;
            richTextBox1.Text = file;
            justSave = path;
        }
示例#2
0
 public FormChild(FormParent f)
 {
     InitializeComponent();
     formParent = f;
     fileExt = "Text Files | *.txt";
 }