コード例 #1
0
        public void createItem(string path, EditorController editorController)
        {
            String filePath = Path.Combine(path, Path.ChangeExtension(Name, ".oms"));

            filePath = Path.ChangeExtension(filePath, ".oms");
            if (editorController.ResourceProvider.exists(filePath))
            {
                MessageBox.show(String.Format("Are you sure you want to override {0}?", filePath), "Override", MessageBoxStyle.IconQuest | MessageBoxStyle.Yes | MessageBoxStyle.No, delegate(MessageBoxStyle overrideResult)
                {
                    if (overrideResult == MessageBoxStyle.Yes)
                    {
                        typeController.createNew(filePath, Type);
                    }
                });
            }
            else
            {
                typeController.createNew(filePath, Type);
            }
        }