Advertisement
boldizsarfodor

Untitled

Mar 19th, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.09 KB | None | 0 0
  1. using System;
  2. using System.IO;
  3. using System.Xml;
  4. using InstaBotConsole.Menus;
  5. using InstagramApiSharp.API;
  6. using InstagramApiSharp.Classes;
  7. using InstagramApiSharp.Enums;
  8.  
  9. namespace InstaBotConsole.Menus{
  10.     public class Bot{
  11.         public static void Start(){
  12.             Console.Clear();
  13.             WriteWelcome.Write();
  14.            
  15.             XmlDocument config = new XmlDocument();
  16.             XmlNode configNode = null;
  17.            
  18.  
  19.             if (File.Exists("config.xml")){
  20.                 Logger.Log("asd");
  21.             }
  22.            
  23.             try{
  24.                 config.LoadXml("config.xml");
  25.                 configNode = config.DocumentElement.SelectSingleNode("config");
  26.             } catch (Exception e){
  27.                 Logger.Log(e.ToString(), "error");
  28.             }
  29.            
  30.             var userSession = new UserSessionData
  31.             {
  32.                 UserName = configNode.SelectSingleNode("username").InnerText,
  33.                 Password = configNode.SelectSingleNode("passwd").InnerText
  34.             };
  35.            
  36.            
  37.         }
  38.     }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement