当前位置: 首页>>代码示例>>C#>>正文


C# IEditor类代码示例

本文整理汇总了C#中IEditor的典型用法代码示例。如果您正苦于以下问题:C# IEditor类的具体用法?C# IEditor怎么用?C# IEditor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IEditor类属于命名空间,在下文中一共展示了IEditor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Load

        public static void Load(IEditor editor, string fileName)
        {
            editor.Clear();

            var doc = new XmlDocument();
            doc.Load(fileName);
            var waves = doc.SelectSingleNode("Waves");

            editor.WaveList = new ObservableCollection<Wave>();

            foreach (XmlNode wave in waves.SelectNodes("Wave"))
            {
                var w = new Wave();
                w.EnemyList = new ObservableCollection<Enemy>();

                foreach (XmlNode enemy in wave.SelectNodes("Enemy"))
                {
                    w.EnemyList.Add(new Enemy
                    {
                        Type = enemy.GetAttribute("Type"),
                        Spawn = float.Parse(enemy.GetAttribute("Spawn").Default("0")),
                        X = float.Parse(enemy.GetAttribute("X").Default("0")),
                        Speed = float.Parse(enemy.GetAttribute("Speed").Default("0")),
                        Money = float.Parse(enemy.GetAttribute("Money").Default("0"))
                    });
                }

                editor.WaveList.Add(w);
            }
        }
开发者ID:EricFreeman,项目名称:ShmupLevelEditor,代码行数:30,代码来源:IO.cs

示例2: CreateNewPlus

        /// <summary>
        /// 引き継いで新規作成
        /// </summary>
        /// <param name="iEditor">テキストを取得するためのIEditorインターフェース</param>
        /// <returns>正否だけどとりあえずtrueしか返さない</returns>
        public bool CreateNewPlus(IEditor iEditor)
        {
            NewFilePlusControl control = new NewFilePlusControl();
            control.Owner = Application.Current.MainWindow;
            var newFilePlusViewModel = NewFilePlusGenerator.GetNewFilePlusViewModel();
            control.DataContext = newFilePlusViewModel;

            //ダイアログを表示する
            if (ShowDialogManager.ShowDialog(control) == true)
            {
                var transferData = NewFilePlusGenerator.GetTransferData(newFilePlusViewModel);

                ModelsComposite.CreateNew(iEditor);
                CurrentFile = "";

                // Transferの過程でイベントが発生しても怒られないように、一旦Newの状態を各画面に通知する
                EventAggregator.OnDataReloaded(this, new DataReloadedEventArgs());

                // 引き継ぎ
                NewFilePlusTransferer.Transfer(transferData);

                // もっかい画面に通知
                EventAggregator.OnDataReloaded(this, new DataReloadedEventArgs());

                return true;
            }

            return true;
        }
开发者ID:kienaiProject,项目名称:ArtOfWords,代码行数:34,代码来源:SaveFileService.cs

示例3: FindReplaceDialogViewModel

 public FindReplaceDialogViewModel(IEditor editor)
 {
     this.editor = editor;
     //_searchDirections = new List<string>();
     //_searchDirections.Add("Next");
     //_searchDirections.Add("Prev");
 }
开发者ID:votrongdao,项目名称:DaxStudio,代码行数:7,代码来源:FindReplaceDialogViewModel.cs

示例4: SpiralCurveDialog

        // modified form constructor to accept the app and editor objects passed by ref
        public SpiralCurveDialog(ref IApplication pApp, ref IEditor pEditor)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            try
            {
                m_pApp = pApp;

                m_pEditor = pEditor;
                m_pEditProp2 = (IEditProperties2)m_pEditor;

                // REGEX strings that will be used for DMS units
                m_RegexUnitsDMS = new ArrayList();
                m_RegexUnitsDMS.Add(@" *(\d+)\.(\d\d)(\d\d\d\d) *");
                m_RegexUnitsDMS.Add(@" *(\d+)\/(\d+)\/(\d+\.?\d*) *");
                m_RegexUnitsDMS.Add(@" * *(\d+)\^(\d+)\'(\d+\.?\d*)\" + quote + " *");
                m_RegexUnitsDMS.Add(@" *(\d+)\-(\d+)\-(\d+\.?\d*) *");

                // REGEX string that will be used for DD, radians, Gons, etc..
                m_RegexUnitsDecimals = @" *(\d+\.?\d+) *";

                // REGEX object for validating the length with units
                m_RegexUnitsMeasure = new Regex(@"(\d*\.?\d+) *(" + String.Join("|", this.AllowedUnits) + ") *$");

                // validate the spatial reference of the edit data frame;
                m_SRValid = SpatialRefValid();
            }
            catch
            {

            }
        }
开发者ID:EAWCS1,项目名称:SUITT,代码行数:36,代码来源:SpiralCurveDialog.cs

示例5: SaveXml

 //! Save xml.
 public void SaveXml(XmlWriter Writer, IEditor AssetDatabase)
 {
     // Write original prefab
     Writer.WriteAttributeString("prefab", AssetDatabase.GetAssetPath(AssetDatabase.GetPrefabParent(gameObject)));
     // Save instance
     m_Instance.SaveXml(Writer);
 }
开发者ID:Trigve,项目名称:he_unity,代码行数:8,代码来源:NonMoveableObjectComponent.cs

示例6: frmMergeGNLines

 public frmMergeGNLines(IApplication app, IEditor editor)
 {
     InitializeComponent();
     _app = app;
     m_editor = editor;
     m_Config = ConfigUtil.GetMergeSplitConfig();
 }
开发者ID:rlwarford,项目名称:local-government-desktop-addins,代码行数:7,代码来源:frmMergeGNLines.cs

示例7: CurrentUserInfo

 public CurrentUserInfo(IEditor editor)
 {
     _userName = Environment.UserName;
       _domainName = Environment.UserDomainName;
       _fullName = String.Format(@"{0}\{1}", _domainName, _userName);
       _databaseUser = GetDatabaseUser(editor);
 }
开发者ID:jorik041,项目名称:local-government-desktop-addins,代码行数:7,代码来源:UserInfo.cs

示例8: CreateNew

        /// <summary>
        /// 新規作成
        /// </summary>
        /// <param name="iEditor">テキストを取得するためのIEditorインターフェース</param>
        /// <returns>正否だけどとりあえずtrueしか返さない</returns>
        public bool CreateNew(IEditor iEditor)
        {
            ModelsComposite.CreateNew(iEditor);
            CurrentFile = "";

            EventAggregator.OnDataReloaded(this, new DataReloadedEventArgs());

            return true;
        }
开发者ID:kienaiProject,项目名称:ArtOfWords,代码行数:14,代码来源:SaveFileService.cs

示例9: EventListener

    EventListener(IEditor editor, bool bListenAll)
    {
      if (editor == null)
      {
        throw new ArgumentNullException();
      }

      m_editor = editor;
    }
开发者ID:Esri,项目名称:arcobjects-sdk-community-samples,代码行数:9,代码来源:EventListener.cs

示例10: Setup

 public void Setup()
 {
     _messageDispatcher = new Fake_MessageDispatcher();
     _pluginFactory = MockRepository.GenerateMock<IPluginLoader>();
     _editor = MockRepository.GenerateMock<IEditor>();
     _fileWriter = MockRepository.GenerateMock<IFileWriter>();
     _dispatcher = new EditorDispatcher(_pluginFactory, _messageDispatcher, _fileWriter);
     _dispatcher.SetEditor(_editor);
 }
开发者ID:JamesTryand,项目名称:EditorEngine,代码行数:9,代码来源:EditorDispatcherTests.cs

示例11: SetFlowByDigitizedDirectionCSharp

        public SetFlowByDigitizedDirectionCSharp()
        {
            UID uidUtilNet = new UIDClass();
            uidUtilNet.Value = "esriEditorExt.UtilityNetworkAnalysisExt";
            m_utilNetExt = ArcMap.Application.FindExtensionByCLSID(uidUtilNet) as IUtilityNetworkAnalysisExt;

            UID uidEditor = new UIDClass();
            uidEditor.Value = "esriEditor.Editor";
            m_editorExt = ArcMap.Application.FindExtensionByCLSID(uidEditor) as IEditor;        
        }
开发者ID:Esri,项目名称:arcobjects-sdk-community-samples,代码行数:10,代码来源:SetFlowByDigitizedDirectionCSharp.cs

示例12: SaveScene

        //! Save scene.
        public void SaveScene(string Path, IEditor AssetDatabase)
        {
            // Testing for now
            var stream = new FileStream(Application.dataPath + "/Scenes/" + Path + "scene.bytes", FileMode.Create);
            var formatter = new BinaryFormatter();

            // Serialize map
            m_TerrainManager.Save(formatter, stream, AssetDatabase);

            stream.Flush();
            stream.Close();
        }
开发者ID:Trigve,项目名称:he_unity,代码行数:13,代码来源:LevelManager.cs

示例13: NotifyDocumentSaved

 public void NotifyDocumentSaved(IEditor source)
 {
     //If we are the source, don't do anything.  We already have the changes
     if(source != this)
     {
         DotaDataObject obj = EditingObject;
         //Force the property editor to clear out the data and redraw
         EditingObject = null;
         EditingObject = obj;
     }
   
 }
开发者ID:Oplkill,项目名称:WorldSmith,代码行数:12,代码来源:DotaObjectEditor.cs

示例14: EditorManager

        public EditorManager(IFileViewModel setting, MainViewModel mainViewModel)
        {
            m_editorsWithSettings = new FilteredObservableCollection<IEditor>(m_baseEditors, editor => editor.Settings != null);
              m_setting = setting;
              m_mainViewModel = mainViewModel;
              m_imageViewerViewModel = new ImageViewerViewModel();
              m_jsonEditorViewModel = new JsonEditorViewModel(mainViewModel);
              m_simpleEditor = new BaseTextEditorViewModel(mainViewModel);
              m_findInFilesViewModel = new FindInFilesViewModel(mainViewModel);

              UpdateSettings();
              m_setting.ContentChanged += SettingOnContentChanged;
        }
开发者ID:grarup,项目名称:SharpE,代码行数:13,代码来源:EditorManager.cs

示例15: DoSave

        protected override void DoSave(IEditor source)
        {

            if (source is TextEditor)
            {
                TextEditor textEd = source as TextEditor;
                //Commit these changes to the dota object.  
                KeyValue kv = KVParser.KV1.Parse(textEd.TextContent);

                DotaObject.KeyValue = kv;
            }

        }
开发者ID:Oplkill,项目名称:WorldSmith,代码行数:13,代码来源:DotaObjectDocument.cs


注:本文中的IEditor类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。