Beispiel #1
0
        private void BtnContinueSave_Click(object sender, EventArgs e)
        {
            try
            {
                //string EditText = "\n Author :" + userName + "\n" + richTextBox1.Text;
                string contents = richTextBox1.Text.ToString();
                dict = new Dictionary <string, string>();
                int pos1 = contents.IndexOf("/*");
                int pos2 = contents.IndexOf("*/");
                contents = contents.Substring(pos1 + 2, pos2 - 2);
                string[] a = contents.Split(new Char[] { ':' });
                for (int j = 0; j < a.Length - 1; j++)
                {
                    dict.Add(a[j].Trim(), null);
                }

                dict["Last Modified By"]            = userName;
                dict["Last Modified Date and Time"] = DateTime.Now.ToString();


                //string path = @"C:\Users\Alchemy.DESKTOP-V8A10HM\Desktop\CSharp\New folder\LicenceUpdate";
                var businessObject = new BusinessComponent();
                businessObject.MonitorDirectory(folder, dict, userName);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }