public MainForm()
{
CheckSettings();
DiffScriptingAdapter = new JsAdapter(this);
Updater.UpdateUpdaterFile();
SplashScreen.Show(this);
RightToLeft = System.Globalization.CultureInfo.CurrentCulture.TextInfo.IsRightToLeft
? RightToLeft.Yes : RightToLeft.No;
SplashScreen.SetProgress(1);
InitializeComponent();
SplashScreen.SetProgress(5);
try
{
btntsShowHide.Image = Resources.Showhide;
btntsShowHideParameters.Image = Resources.Showhideparameters;
btntsSave.Image = Resources.Save;
btntsIgnore.Image = Resources.RightArrow;
btntsStop.Image = Resources.Stop;
btntsPreview.Image = Resources.preview;
btntsChanges.Image = Resources.changes;
btntsFalsePositive.Image = Resources.RollBack;
btntsStart.Image = Resources.Run;
btntsDelete.Image = Resources.Vista_trashcan_empty;
SplashScreen.SetProgress(10);
try
{
Parser = new Parsers(500, false);
}
catch (Exception ex)
{
ErrorHandler.HandleException(ex);
}
addToWatchList.SelectedIndex = 3;
cmboCategorise.SelectedIndex = 0;
cmboImages.SelectedIndex = 0;
listMaker.UserInputTextBox.ContextMenuStrip = mnuMakeFromTextBox;
listMaker.BusyStateChanged += SetProgressBar;
listMaker.NoOfArticlesChanged += UpdateButtons;
listMaker.StatusTextChanged += UpdateListStatus;
listMaker.cmboSourceSelect.SelectedIndexChanged += ListMakerSourceSelectHandler;
TheSession = new Session(this);
CreateEditor();
Profiles = new WikiFunctions.Profiles.AWBProfilesForm(TheSession);
Profiles.LoggedIn += ProfileLoggedIn;
Profiles.UserDefaultSettingsLoadRequired += UserDefaultSettingsLoadRequired;
SplashScreen.SetProgress(15);
_pasteMoreItems = new[]
{
PasteMore1, PasteMore2, PasteMore3, PasteMore4, PasteMore5, PasteMore6, PasteMore7, PasteMore8, PasteMore9, PasteMore10
};
// to avoid saving to app data
saveXML.InitialDirectory = openXML.InitialDirectory =
Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
}
catch (Exception ex)
{
ErrorHandler.HandleException(ex);
}
}