• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IEditor类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: Bind

        public void Bind(IEditor editorContainer, IModel model)
        {
            this.editorContainer = editorContainer;
            this.model = model;
            //this.editorContainer.Editor.Document.HighlightingStrategy =
            //    HighlightingStrategyFactory.CreateHighlightingStrategy("C#");
            OnBind();

            editorContainer.Editor.TextChanged += new EventHandler(Editor_TextChanged);
            editorContainer.Editor.InputChar += new Editors.OnInputChar(Editor_InputChar);
            editorContainer.Editor.KeyPreview += new Editors.OnKeyPreview(Editor_KeyPreview);

            GlobalService.ModelManager.ParseError += new OnParseError(ModelManager_ParseError);
        }
开发者ID:koksaver,项目名称:CodeHelper,代码行数:14,代码来源:BaseEditorController..cs


示例17: ViperPinForm

    public ViperPinForm(IEditor3 editor)
    {
      InitializeComponent();

      m_editor = editor;
      m_edSketch = m_editor as IEditSketch3;
      m_editLayers = m_editor as IEditLayers;

      lblEditLayer.Text = m_editLayers.CurrentLayer.Name;

      //Load field combo box with field names
      IFields pFields = m_editLayers.CurrentLayer.FeatureClass.Fields;
		  for (int i=0; i < pFields.FieldCount; i++)
      {
        cmbPINField.Items.Add(pFields.get_Field(i).Name);
      }

      //get pinfield from registry
      string pinField = null;
      RegistryKey pRegKey = Registry.CurrentUser.OpenSubKey("Software\\ESRI\\ViperPin");
      if (pRegKey != null)
      {
        pinField = pRegKey.GetValue("Pinfield").ToString();
      }

      //set the combo box to the pinfield
      for (int i = 0; i < pFields.FieldCount; i++)
      {
        if (pinField == pFields.get_Field(i).Name)
        {
          cmbPINField.Text = pinField;
          break;
        }
        else
        {
          cmbPINField.Text = "None";
        }
      }

      //cmbPINField.SelectedIndex = 0;
      cmbPINField.Refresh();
      m_lotNum = 1;
      txtlot.Text = "1";

      //Set center right of form to center right of screen
      this.StartPosition = FormStartPosition.Manual;
      this.Left = 0;
      this.Top = (Screen.PrimaryScreen.Bounds.Height / 2) - (this.Height / 2);
    }
开发者ID:Esri,项目名称:arcobjects-sdk-community-samples,代码行数:49,代码来源:ViperPinForm.cs


示例18: Expand

        public ExpandResult Expand(string folderPath, IEditor iEditor)
        {
            _iEditor = iEditor;

            string fileCompositePath = folderPath + "\\document.xml";
            // ちゃんとしたファイルを書き出す。
            XmlSerializer serializer = new XmlSerializer(typeof(XmlSaveObjectVer1_0_0));
            FileStream outstream = new System.IO.FileStream(fileCompositePath, System.IO.FileMode.Open);

            LoadComposition = (XmlSaveObjectVer1_0_0)serializer.Deserialize(outstream);
            outstream.Close();

            ExpandObject();

            return ExpandResult.Succeeded;
        }
开发者ID:kienaiProject,项目名称:ArtOfWords,代码行数:16,代码来源:FileExpanderVer1_0_0.cs


示例19: CurveByInference

        public CurveByInference()
        {
            Finished = true;
            Curves = new ObservableCollection<InferredCurve>();

            if (ArcMap.Application != null)
            {
                m_pEd = ArcMap.Application.FindExtensionByName("esri object editor") as IEditor;
                if (m_pEd != null)
                {
                    _IsEditing = m_pEd.EditState == esriEditState.esriStateEditing;
                    IEditEvents_Event editEvent = (IEditEvents_Event)m_pEd;

                    editEvent.OnStartEditing += new IEditEvents_OnStartEditingEventHandler(editEvent_OnStartEditing);
                    editEvent.OnStopEditing += new IEditEvents_OnStopEditingEventHandler(editEvent_OnStopEditing);
                }
            }
        }
开发者ID:travisval,项目名称:ParcelFabricCurveByInference,代码行数:18,代码来源:CurveByInference.cs


示例20: NotebookEditorLabel

        public NotebookEditorLabel(EditorNotebook parent_netbook, IEditor se)
        {
            this.CanFocus=false;
            this.BorderWidth = 1;

            string stockIcon = "home.png";

            if (se.FileName != "StartPage"){
                stockIcon = MainClass.Tools.GetIconForExtension( System.IO.Path.GetExtension(se.Caption) );
            }

            image = new Gtk.Image(MainClass.Tools.GetIconFromStock(stockIcon, Gtk.IconSize.Menu));
            image.SetPadding(2,2);
            this.PackStart(image, false, false, 0);

            caption =se.Caption.Replace("_","__");

            lblDisplay.Text = caption;
            lblDisplay.CanFocus=false;

            this.PackStart(lblDisplay, false, false, 0);

            Pixbuf default_pixbuf = null;
            string file = System.IO.Path.Combine(MainClass.Paths.ResDir, "stock-close.png");
            if (System.IO.File.Exists(file)) {
                default_pixbuf = new Pixbuf(file);

                Button btnClose = new Button(new Gtk.Image(default_pixbuf));
                btnClose.TooltipText = MainClass.Languages.Translate("close");
                btnClose.Relief = ReliefStyle.None;
                btnClose.CanFocus = false;
                btnClose.WidthRequest = btnClose.HeightRequest = 18;
                btnClose.Clicked += delegate { parent_netbook.ClosePage(se); };

                this.PackEnd(btnClose, false, false, 0);
            }

            lblDisplay.TooltipText = se.FileName;

            this.ShowAll();
        }
开发者ID:moscrif,项目名称:ide,代码行数:41,代码来源:NotebookEditorLabel.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IEditorData类代码示例发布时间:2022-05-24
下一篇:
C# IEditableRoot类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap