", "Parágrafo"),
new KeyValuePair", "Título 1"),
new KeyValuePair
", "Título 2"),
new KeyValuePair
", "Título 3"),
new KeyValuePair
", "Título 4"),
new KeyValuePair
", "Título 5"),
new KeyValuePair
", "Título 6"),
new KeyValuePair
", "Pré-formatação")
};
this.ComboTextFormat.SelectedValuePath = "Key";
this.ComboTextFormat.DisplayMemberPath = "Value";
this.ComboTextFormat.SelectedIndex = 0;
}
private void FontSizeInitialize()
{
List");
if (!string.IsNullOrEmpty(this.ImagemLink.Text.Trim()))
{
str2 = string.Concat(new string[] { "", str2, "" });
}
dynamic obj2 = obj1;
if (obj2 != null)
{
obj2.pasteHTML(str2);
}
}
private void SettingsInsertOrderedList_Click(object sender, RoutedEventArgs e)
{
HTMLDocument htmlDocument = this.WebBrowserEditor.HtmlDocument;
if (htmlDocument == null)
{
return;
}
htmlDocument.execCommand("InsertOrderedList", false, Type.Missing);
}
private void SettingsItalic_Click(object sender, RoutedEventArgs e)
{
HTMLDocument htmlDocument = this.WebBrowserEditor.HtmlDocument;
if (htmlDocument == null)
{
return;
}
htmlDocument.execCommand("Italic", false, Type.Missing);
}
private void SettingsJustifyFull_Click(object sender, RoutedEventArgs e)
{
HTMLDocument htmlDocument = this.WebBrowserEditor.HtmlDocument;
if (htmlDocument == null)
{
return;
}
htmlDocument.execCommand("JustifyFull", false, Type.Missing);
}
private void SettingsLeftAlign_Click(object sender, RoutedEventArgs e)
{
HTMLDocument htmlDocument = this.WebBrowserEditor.HtmlDocument;
if (htmlDocument == null)
{
return;
}
htmlDocument.execCommand("JustifyLeft", false, Type.Missing);
}
private void SettingsLink_OnClick(object sender, RoutedEventArgs e)
{
HTMLDocument htmlDocument = this.WebBrowserEditor.HtmlDocument;
this.DescricaoBox.Visibility = System.Windows.Visibility.Visible;
IHTMLSelectionObject variable = htmlDocument.selection;
if (variable != null)
{
IHTMLTxtRange variable1 = variable.createRange() as IHTMLTxtRange;
if (variable1 != null)
{
this.DescricaoBox.Visibility = (!string.IsNullOrEmpty(variable1.htmlText) ? System.Windows.Visibility.Collapsed : System.Windows.Visibility.Visible);
}
}
this.LinkPanel.Visibility = System.Windows.Visibility.Visible;
this.WebBrowserEditor.Visibility = System.Windows.Visibility.Hidden;
}
private void SettingsRightAlign_Click(object sender, RoutedEventArgs e)
{
HTMLDocument htmlDocument = this.WebBrowserEditor.HtmlDocument;
if (htmlDocument == null)
{
return;
}
htmlDocument.execCommand("JustifyRight", false, Type.Missing);
}
private void SettingsUnderLine_Click(object sender, RoutedEventArgs e)
{
HTMLDocument htmlDocument = this.WebBrowserEditor.HtmlDocument;
if (htmlDocument == null)
{
return;
}
htmlDocument.execCommand("Underline", false, Type.Missing);
}
[DebuggerNonUserCode]
[EditorBrowsable(EditorBrowsableState.Never)]
[GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
{
switch (connectionId)
{
case 1:
{
((WebEditor)target).Loaded += new RoutedEventHandler(this.Window_Loaded);
return;
}
case 2:
{
this.PanelControls = (WrapPanel)target;
return;
}
case 3:
{
this.ComboTextFormat = (System.Windows.Controls.ComboBox)target;
this.ComboTextFormat.SelectionChanged += new SelectionChangedEventHandler(this.ComboTextFormat_SelectionChanged);
return;
}
case 4:
{
this.ComboFontFamily = (System.Windows.Controls.ComboBox)target;
this.ComboFontFamily.SelectionChanged += new SelectionChangedEventHandler(this.ComboFontFamily_SelectionChanged);
return;
}
case 5:
{
this.ComboFontSize = (System.Windows.Controls.ComboBox)target;
this.ComboFontSize.SelectionChanged += new SelectionChangedEventHandler(this.ComboFontSize_SelectionChanged);
return;
}
case 6:
{
this.SettingsBold = (System.Windows.Controls.Button)target;
this.SettingsBold.Click += new RoutedEventHandler(this.SettingsBold_Click);
return;
}
case 7:
{
this.SettingsItalic = (System.Windows.Controls.Button)target;
this.SettingsItalic.Click += new RoutedEventHandler(this.SettingsItalic_Click);
return;
}
case 8:
{
this.SettingsUnderLine = (System.Windows.Controls.Button)target;
this.SettingsUnderLine.Click += new RoutedEventHandler(this.SettingsUnderLine_Click);
return;
}
case 9:
{
this.SettingsFontColor = (System.Windows.Controls.Button)target;
this.SettingsFontColor.Click += new RoutedEventHandler(this.SettingsFontColor_Click);
return;
}
case 10:
{
this.SettingsBullets = (System.Windows.Controls.Button)target;
this.SettingsBullets.Click += new RoutedEventHandler(this.SettingsBullets_Click);
return;
}
case 11:
{
this.SettingsNumbered = (System.Windows.Controls.Button)target;
this.SettingsNumbered.Click += new RoutedEventHandler(this.SettingsInsertOrderedList_Click);
return;
}
case 12:
{
this.SettingsLeftAlign = (System.Windows.Controls.Button)target;
this.SettingsLeftAlign.Click += new RoutedEventHandler(this.SettingsLeftAlign_Click);
return;
}
case 13:
{
this.SettingsCenter = (System.Windows.Controls.Button)target;
this.SettingsCenter.Click += new RoutedEventHandler(this.SettingsCenter_Click);
return;
}
case 14:
{
this.SettingsRightAlign = (System.Windows.Controls.Button)target;
this.SettingsRightAlign.Click += new RoutedEventHandler(this.SettingsRightAlign_Click);
return;
}
case 15:
{
this.SettingsJustifyFull = (System.Windows.Controls.Button)target;
this.SettingsJustifyFull.Click += new RoutedEventHandler(this.SettingsJustifyFull_Click);
return;
}
case 16:
{
this.SettingsLink = (System.Windows.Controls.Button)target;
this.SettingsLink.Click += new RoutedEventHandler(this.SettingsLink_OnClick);
return;
}
case 17:
{
this.ImagemLink = (System.Windows.Controls.TextBox)target;
return;
}
case 18:
{
((System.Windows.Controls.MenuItem)target).Click += new RoutedEventHandler(this.SettingsImage_Click);
return;
}
case 19:
{
this.WebBrowserEditor = (Gestor.Application.Componentes.WebBrowser)target;
return;
}
case 20:
{
this.LinkPanel = (ItemsControl)target;
return;
}
case 21:
{
((System.Windows.Controls.Button)target).Click += new RoutedEventHandler(this.CancelLink_OnClick);
return;
}
case 22:
{
this.HrefLink = (System.Windows.Controls.TextBox)target;
return;
}
case 23:
{
this.DescricaoBox = (CustomItemControl)target;
return;
}
case 24:
{
this.DescricaoLink = (System.Windows.Controls.TextBox)target;
return;
}
case 25:
{
((System.Windows.Controls.Button)target).Click += new RoutedEventHandler(this.InsertLink_OnClick);
return;
}
}
this._contentLoaded = true;
}
private void Window_Loaded(object sender, RoutedEventArgs e)
{
if (this.WebBrowserEditor.Browser == null)
{
this.WebBrowserEditor.InstanciateNew(null);
}
this.FontFamilyInitialize();
this.FontSizeInitialize();
this.FontFormatInitialize();
}
}
}