PageRenderTime 15ms CodeModel.GetById 1ms app.highlight 9ms RepoModel.GetById 2ms app.codeStats 0ms

/Backup/TumbleDeck/Tumblarity.vb

#
Visual Basic | 39 lines | 25 code | 5 blank | 9 comment | 5 complexity | 3ed3bbde56343b8cace6ad8ef14b5800 MD5 | raw file
 1' _______                 _      _        _____               _       
 2'|__   __|               | |    | |      |  __ \             | |      
 3'   | | _   _  _ __ ___  | |__  | |  ___ | |  | |  ___   ___ | | __   
 4'   | || | | || '_ ` _ \ | '_ \ | | / _ \| |  | | / _ \ / __|| |/ /   
 5'   | || |_| || | | | | || |_) || ||  __/| |__| ||  __/| (__ |   <  _ 
 6'   |_| \__,_||_| |_| |_||_.__/ |_| \___||_____/  \___| \___||_|\_\(_)
 7Imports TumblePower
 8Public Class Tumblarity
 9    'You don't need to modify the form
10    Private score As Integer 'Calculated score
11    Dim acct As New tumblr.Account
12    Private TumblrData As tumblr
13
14    'I kept these apart, they may be used later
15    Dim MyPostsLikeSCORE As Integer
16    Dim MyPostsReblogSCORE As Integer
17    Dim MyFollowersSCORE As Integer
18    Dim MyReblogsSCORE As Integer
19
20    Dim MyPostsLike As Integer = 1 + MyPostsLikeSCORE
21    Dim MyPostsReblog As Integer = 3 + MyPostsReblogSCORE
22    Dim MyFollowers As Integer = 3 + MyFollowersSCORE
23    Dim MyReblogs As Integer = 3 + MyReblogsSCORE
24
25    Private Sub CalculateScore() 'Calculate score
26        'Set MyPostsLikeSCORE, MyPostsReblogSCORE, MyFollowersSCORE and MyReblogsSCORE
27        score = MyPostsLike + MyPostsReblog + MyFollowers + MyReblogs 'Add them together to make "score"
28        My.Settings.TumblarityScore = CStr(score) 'Save the score in Settings
29    End Sub
30
31    Private Sub InfoLinkLabel_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles HelpLinkLabel.LinkClicked
32        MessageBox.Show("How do we calculate your Tumblarity?" & vbLf & vbLf & "• 1 point for every Like your post gets" & vbLf & "• 3 points for every Reblog your post gets" & vbLf & "• 3 points for every new follower you get" & vbLf & "• 3 points for every Reblog of other people’s post" & vbLf & vbLf & "You start with 10 points, just for downloading TumbleDeck!", "How do we calculate your Tumblarity?")
33    End Sub
34
35    Private Sub Tumblarity_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
36        CalculateScore()
37        TumblarityLabel.Text = My.Settings.TumblarityScore 'Display the score
38    End Sub
39End Class