Exemple #1
0
        private void OnResourceRename(string path, ref bool ptr, ref string ptr2)
        {
            string text = Path.GetExtension(path);

            if (!string.IsNullOrEmpty(text))
            {
                text = text.Substring(1);
                ResourceType byExtension = ResourceTypeManager.Instance.GetByExtension(text);
                if (byExtension != null && byExtension.IsSpecialRenameResourceMode())
                {
                    ptr = true;
                    bool flag = false;
                    try
                    {
                        if (MainForm.Instance.ResourcesForm.WatchFileSystem)
                        {
                            MainForm.Instance.ResourcesForm.WatchFileSystem = false;
                            flag = true;
                        }
                        ptr2 = byExtension.DoUserRenameResource(path);
                    }
                    finally
                    {
                        if (flag)
                        {
                            MainForm.Instance.ResourcesForm.WatchFileSystem = true;
                        }
                    }
                }
            }
        }