View1Click method

Applies to
TForm2

Declaration
procedure View1Click(Sender: TObject);

Implementation

procedure TForm2.View1Click(Sender: TObject);
var encode:String;
begin try
Goto1.Enabled :=(Notebook1.PageIndex <> 1)and(Notebook1.PageIndex <> 4)and(Notebook1.PageIndex <> 10);
RefreshthisArticle2.Enabled :=Goto1.Enabled;
CoverPage1.Enabled := RefreshthisArticle2.Enabled;
Encoding1.Enabled :=Goto1.Enabled;
encode:='_autodetect_all';
if Goto1.Enabled then begin
   if Sender<>menu_update1 then begin
      case NoteBook1.PageIndex of
         0: encode:=IHTMLDocument2(wikipedia_console.Document).Get_CharSet();
         2: encode:=IHTMLDocument2(wikimedia_console.Document).Get_CharSet();
         3: encode:=IHTMLDocument2(wikidict_console.Document).Get_CharSet();
         5: encode:=IHTMLDocument2(wikibooks_console.Document).Get_CharSet();
         6: encode:=IHTMLDocument2(wikinews_console.Document).Get_CharSet();
         7: encode:=IHTMLDocument2(Wikiquote_console.Document).Get_CharSet();
         8: encode:=IHTMLDocument2(wikisource_console.Document).Get_CharSet();
         9: encode:=IHTMLDocument2(wikispices_console.Document).Get_CharSet();
      end;
   end;
   Automatic1.Checked := (encode=Automatic1.Hint);
   CentralEuropeanISO1.Checked := (encode=CentralEuropeanISO1.Hint);
   WesternEuropeanISO1.Checked := (encode=WesternEuropeanISO1.Hint);
   UnicodeUTF81.Checked := (encode=UnicodeUTF81.Hint);
   ArabicWindows1.Checked := (encode=ArabicWindows1.Hint);
   BalticWindows1.Checked := (encode=BalticWindows1.Hint);
   ChineseSimplifiedGB23121.Checked := (encode=ChineseSimplifiedGB23121.Hint);
   ChineseTraditionalBig51.Checked := (encode=ChineseTraditionalBig51.Hint);
   GreekWindows1.Checked := (encode=GreekWindows1.Hint);
   KoreanISO1.Checked := (encode=KoreanISO1.Hint);
   ThaiWindows1.Checked := (encode=ThaiWindows1.Hint);
   TurkishWindows1.Checked := (encode=TurkishWindows1.Hint);
end else
        Automatic1.Checked :=true;
RefreshmediaList2.Enabled :=(Notebook1.PageIndex=4);
RefreshmediaList2.Visible :=RefreshmediaList2.Enabled;
RefreshthisArticle2.Visible :=not RefreshmediaList2.Visible;
except
on E : Exception do _log_entry_error(E.ClassName,E.Message,'G20000');
end;End;


HTML generated by Time2HELP
http://www.time2help.com