Exemplo n.º 1
0
 public Model2PowerPoint(WikiMedia aWiki, string basePath, string templatePath)
 {
     this.wiki = aWiki;
     fBasePath = basePath;
     if (fBasePath.Length > 0)
     {
         if (fBasePath[fBasePath.Length - 1] != '\\')
         {
             fBasePath += "\\";
         }
     }
     fTemplatePath = templatePath;
 }
Exemplo n.º 2
0
 public CategoryExport(WikiMedia wiki, Model2PowerPoint converter, SummaryBuilder[] extractors)
 {
     InitializeComponent();
     this.wiki       = wiki;
     this.converter  = converter;
     this.extractors = extractors;
     iExtractor.Items.Clear();
     foreach (SummaryBuilder extractor in extractors)
     {
         iExtractor.Items.Add(extractor.GetName());
     }
     iExtractor.SelectedIndex = 0;
 }
Exemplo n.º 3
0
 public WikiLoginForm(WikiMedia wiki, string username, string password)
 {
     //
     // The InitializeComponent() call is required for Windows Forms designer support.
     //
     InitializeComponent();
     this.wiki = wiki;
     if (username != null)
     {
         iUsername.Text = username;
     }
     if (password != null)
     {
         iPassword.Text = password;
     }
 }
Exemplo n.º 4
0
        private static void Main(string[] args)
        {
            // Configuration dirs
            string basePath;

            basePath  = Directory.GetCurrentDirectory() + "\\";
            wikiConf  = new WikiConf();
            wiki      = new WikiMedia(wikiConf.wikiURL, wikiConf.wikiDomain, wikiConf.wikiDefCategory);
            contatti  = new ContactsHelper(wiki);
            converter = new Model2PowerPoint(wiki, basePath, basePath + wikiConf.pptTemplate);
            string[] extNames = Directory.GetFiles(basePath + wikiConf.extractors);
            extractors = new SummaryBuilder[extNames.Length];
            for (int i = 0; i < extNames.Length; i++)
            {
                extractors[i] = new ExtractSummary(converter, extNames[i]);
            }
            string[] lines;
            if (File.Exists(wikiConf.loginConf) == true)
            {
                lines = File.ReadAllLines(wikiConf.loginConf, Encoding.UTF8);
            }
            else
            {
                lines = new string[2] {
                    null, null
                };
            }
            //GUI Init
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            wikiLoginForm  = new WikiLoginForm(wiki, lines[0], lines[1]);
            mainForm       = new MainForm(wiki, wikiConf);
            categoryExport = new CategoryExport(wiki, converter, extractors);
            categoryExport.SetCategories(wikiConf.categories);
            addressBookExport = new AddressBookExport(wiki, contatti);
            addressBookExport.SetCategories(wikiConf.categories);
            pageExport      = new PageExport(wiki, converter);
            replaceForm     = new ReplaceForm(wikiConf);
            createForm      = new CreateForm(wikiConf);
            pageProcessForm = new PageProcess(wikiConf, wiki);
            //GO
            Application.Run(mainForm);
        }
Exemplo n.º 5
0
 public PageProcess(WikiConf conf, WikiMedia wiki)
 {
     InitializeComponent();
     this.conf = conf;
     this.wiki = wiki;
 }
Exemplo n.º 6
0
 public MainForm(WikiMedia wiki, WikiConf conf)
 {
     this.wiki = wiki;
     this.conf = conf;
     InitializeComponent();
 }
 public AddressBookExport(WikiMedia wiki, ContactsHelper contacts)
 {
     InitializeComponent();
     this.wiki     = wiki;
     this.contacts = contacts;
 }
Exemplo n.º 8
0
 public ContactsHelper(WikiMedia aWiki)
 {
     this.wiki = aWiki;
     SetupContacts();
 }
Exemplo n.º 9
0
 public PageExport(WikiMedia wiki, Model2PowerPoint converter)
 {
     InitializeComponent();
     this.wiki      = wiki;
     this.converter = converter;
 }