コード例 #1
0
ファイル: VKDialog.cs プロジェクト: rcsir/RuNetImporter
 public VKDialog(): 
     base(new VKNetworkAnalyzer())
 {
     InitializeComponent();
     loginDialog = new VKLoginDialog();
     loginDialog.OnUserLogin += new VKLoginDialog.UserLoginHandler(UserLogin);
     this.EnableControls();
     addAttributes();
 }
コード例 #2
0
        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);
        }
コード例 #3
0
ファイル: VKGroupsForm.cs プロジェクト: rcsir/RuNetImporter
        // 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();
        }
コード例 #4
0
ファイル: VKContentForm.cs プロジェクト: rcsir/RuNetImporter
        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();
        }
コード例 #5
0
ファイル: VKFinderForm.cs プロジェクト: rcsir/RuNetImporter
        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);        
        }