Exemple #1
0
 public VKDialog(): 
     base(new VKNetworkAnalyzer())
 {
     InitializeComponent();
     loginDialog = new VKLoginDialog();
     loginDialog.OnUserLogin += new VKLoginDialog.UserLoginHandler(UserLogin);
     this.EnableControls();
     addAttributes();
 }
        public TestVKImpotrerForm()
        {
            InitializeComponent();

            vkLoginDialog = new VKLoginDialog();
            // subscribe for login events
            vkLoginDialog.OnUserLogin += new VKLoginDialog.UserLoginHandler(UserLogin);

            vkRestApi = new VkRestApi();
            // set up data handler
            vkRestApi.OnData += new VkRestApi.DataHandler(OnData);
            // set up error handler
            vkRestApi.OnError += new VkRestApi.ErrorHandler(OnError);
        }
Exemple #3
0
        // Constructor

        public VKGroupsForm()
        {
            InitializeComponent();
            userIdTextBox.Text = @"Please authorize";
            groupId = 0;
            isAuthorized = false;
            isWorkingFolderSet = false;
        
            vkLoginDialog = new VKLoginDialog();
            // subscribe for login events
            vkLoginDialog.OnUserLogin += OnUserLogin;

            vkRestApi = new VkRestApi();
            // set up data handler
            vkRestApi.OnData += OnData;
            // set up error handler
            vkRestApi.OnError += OnError;

            // setup background group posts worker handlers
            backgroundGroupsWorker.DoWork
                += GroupsWork;

            backgroundGroupsWorker.ProgressChanged
                += GroupsWorkProgressChanged;

            backgroundGroupsWorker.RunWorkerCompleted
                += GroupsWorkCompleted;

            // setup background group members worker handlers
            backgroundMembersWorker.DoWork
                += MembersWork;

            backgroundMembersWorker.ProgressChanged
                += MembersWorkProgressChanged;

            backgroundMembersWorker.RunWorkerCompleted
                += MembersWorkCompleted;


            // setup background group network worker handlers
            backgroundNetworkWorker.DoWork
                += NetworkWork;

            backgroundNetworkWorker.ProgressChanged
                += NetworkWorkProgressChanged;

            backgroundNetworkWorker.RunWorkerCompleted
                += NetworkWorkCompleted;

            // setup background Ego net worker handlers
            backgroundEgoNetWorker.DoWork
                += EgoNetWork;

            backgroundEgoNetWorker.ProgressChanged
                += EgoNetWorkProgressChanged;

            backgroundEgoNetWorker.RunWorkerCompleted
                += EgoNetWorkCompleted;

            // this.folderBrowserDialog1.ShowNewFolderButton = false;
            // Default to the My Documents folder. 
            folderBrowserDialog1.RootFolder = Environment.SpecialFolder.Personal;
            // this.folderBrowserDialog1.RootFolder = Environment.SpecialFolder.MyComputer;
            WorkingFolderTextBox.Text = folderBrowserDialog1.SelectedPath;

            GroupsProgressBar.Minimum = 0;
            GroupsProgressBar.Maximum = 100 * POSTS_PER_REQUEST;
            GroupsProgressBar.Step = 1;

            ActivateControls();
        }
Exemple #4
0
        public VKContentForm()
        {
            InitializeComponent();
            this.userIdTextBox.Text = "Please authorize";
            this.groupId = 0;
            this.isAuthorized = false;
            this.isWorkingFolderSet = false;

            folderBrowserDialog1.RootFolder = Environment.SpecialFolder.Personal;

            vkLoginDialog = new VKLoginDialog();
            // subscribe for login events
            vkLoginDialog.OnUserLogin += new VKLoginDialog.UserLoginHandler(OnUserLogin);

            vkRestApi = new VkRestApi();
            // set up data handler
            vkRestApi.OnData += new VkRestApi.DataHandler(OnData);
            // set up error handler
            vkRestApi.OnError += new VkRestApi.ErrorHandler(OnError);

            // setup background group posts worker handlers
            this.backgroundGroupsWorker.DoWork
                += new DoWorkEventHandler(GroupsWork);

            this.backgroundGroupsWorker.ProgressChanged
                += new ProgressChangedEventHandler(groupsWorkProgressChanged);

            this.backgroundGroupsWorker.RunWorkerCompleted
                += new RunWorkerCompletedEventHandler(groupsWorkCompleted);

            // setup background communication network worker handlers
            this.backgroundNetWorker.DoWork
                += new DoWorkEventHandler(netWork);

            this.backgroundNetWorker.ProgressChanged
                += new ProgressChangedEventHandler(NetWorkProgressChanged);

            this.backgroundNetWorker.RunWorkerCompleted
                += new RunWorkerCompletedEventHandler(NetWorkCompleted);

            ActivateControls();
        }
Exemple #5
0
        public VKFinderForm()
        {
            InitializeComponent();

            this.userIdTextBox.Text = "Please authorize";
            this.FindProgressBar.Minimum = 0;
            this.FindProgressBar.Maximum = 10000;
            this.FindProgressBar.Step = 1;

            updateStatus(0, "Ready");

            vkLoginDialog = new VKLoginDialog();
            // subscribe for login events
            vkLoginDialog.OnUserLogin += new VKLoginDialog.UserLoginHandler(UserLogin);

            vkRestApi = new VkRestApi();
            // set up data handler
            vkRestApi.OnData += new VkRestApi.DataHandler(OnData);
            // set up error handler
            vkRestApi.OnError += new VkRestApi.ErrorHandler(OnError);

            // folder for files
            this.folderBrowserDialog1.Description =
                "Select the directory that you want to use to store files.";
            // this.folderBrowserDialog1.ShowNewFolderButton = false;
            // Default to the My Documents folder. 
            this.folderBrowserDialog1.RootFolder = Environment.SpecialFolder.Personal;
            // this.folderBrowserDialog1.RootFolder = Environment.SpecialFolder.MyComputer;
            this.WorkingFolderTextBox.Text = this.folderBrowserDialog1.SelectedPath;

            // set up background find worker handlers
            this.backgroundFinderWorker.DoWork 
                += new DoWorkEventHandler(findWork);

            this.backgroundFinderWorker.ProgressChanged 
                += new ProgressChangedEventHandler(findWorkProgressChanged);

            this.backgroundFinderWorker.RunWorkerCompleted 
                += new RunWorkerCompletedEventHandler(findWorkCompleted);

            // set up background load worker handlers
            this.backgroundLoaderWorker.DoWork
                += new DoWorkEventHandler(loadWork);        
        }