/// <summary> /// Creates the child controls2. /// </summary> private void CreateChildControls2() { string editorControl = "Editors/Simple/EditorControl.ascx"; string newEditorCtrl = ConfigurationManager.AppSettings["HtmlEditorControl"]; if (!String.IsNullOrEmpty(newEditorCtrl)) { editorControl = newEditorCtrl; } UserControl ctrl = (UserControl)this.LoadControl(editorControl); EditorControl.Controls.Add(ctrl); _EditorControl = (ITextEditorControl)ctrl; }
public EditorMediator(ITextEditorControl control) { //editorControl editorControl = control; //openTextFileDialog this.openTextFileDialog = new System.Windows.Forms.OpenFileDialog(); this.openTextFileDialog.DefaultExt = "txt"; this.openTextFileDialog.Filter = "Text files (*.txt)|*.txt"; this.openTextFileDialog.RestoreDirectory = true; //saveTextFileDialog this.saveTextFileDialog = new System.Windows.Forms.SaveFileDialog(); this.saveTextFileDialog.DefaultExt = "txt"; this.saveTextFileDialog.Filter = "Text files (*.txt)|*.txt"; this.saveTextFileDialog.RestoreDirectory = true; //bgWorker this.bgWorker = new System.ComponentModel.BackgroundWorker(); this.bgWorker.WorkerReportsProgress = true; bgWorker.DoWork += bgWorker_DoWork; bgWorker.RunWorkerCompleted += bgWorker_RunWorkerCompleted; bgWorker.ProgressChanged += bgWorker_ProgressChanged; }