Beispiel #1
0
        void item_Click(object sender, EventArgs e)
        {
            var    item = (ToolStripItem)sender;
            var    otherWordWrapOptions = new WordWrapOptionsOld();
            string path = "WordWrapOptions\\" + item.Tag;

            RegistryUtility.GetObject(path, otherWordWrapOptions);
            this.WordWrapOptions.AssignFrom(otherWordWrapOptions);
            this.bindingSource.ResetBindings(false);
        }
        public static AnnotationSettings GetAnnotationSettings(AinFile ainFile)
        {
            var    annotationSettings = new AnnotationSettings();
            string baseName           = Path.GetFileNameWithoutExtension(ainFile.OriginalFilename);
            string pathName           = "AnnotationSettings\\" + baseName;

            if (RegistryUtility.PathExists(pathName))
            {
                RegistryUtility.GetObject(pathName, annotationSettings);
            }
            else
            {
            }
            return(annotationSettings);
        }
        void newItem_Click(object sender, EventArgs e)
        {
            ToolStripItem item = sender as ToolStripItem;

            if (item != null)
            {
                string codeName = item.Tag as string;
                if (codeName == null)
                {
                    codeName = item.Text;
                }
                RegistryUtility.GetObject("AnnotationSettings\\" + codeName, mySettings);
                ReadSettings();
            }
        }