Skip to content

Commit c9000c1

Browse files
author
anshbansal
committed
v0.6 of Cpmag
1 parent 80dcdd1 commit c9000c1

File tree

6 files changed

+118
-10
lines changed

6 files changed

+118
-10
lines changed

Code generator v0.1/Code generator v0.1/Code generator v0.1.vbproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
<MapFileExtensions>true</MapFileExtensions>
2929
<PublisherName>Aseem Bansal</PublisherName>
3030
<OpenBrowserOnPublish>false</OpenBrowserOnPublish>
31-
<ApplicationRevision>12</ApplicationRevision>
32-
<ApplicationVersion>0.5.0.%2a</ApplicationVersion>
31+
<ApplicationRevision>0</ApplicationRevision>
32+
<ApplicationVersion>0.7.0.%2a</ApplicationVersion>
3333
<UseApplicationTrust>false</UseApplicationTrust>
3434
<PublishWizardCompleted>true</PublishWizardCompleted>
3535
<BootstrapperEnabled>true</BootstrapperEnabled>
@@ -117,6 +117,7 @@
117117
<SubType>Form</SubType>
118118
</Compile>
119119
<Compile Include="Glossary_Content_Control.vb" />
120+
<Compile Include="Glossary_Strings.vb" />
120121
<Compile Include="Lesson01_Strings.vb" />
121122
<Compile Include="Lesson02_Strings.vb" />
122123
<Compile Include="Menu_Strings.vb" />

Code generator v0.1/Code generator v0.1/Form1.Designer.vb

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Code generator v0.1/Code generator v0.1/Form1.vb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Public Class Form1
22

3-
Public Const String_Version As String = "v 0.5"
3+
Public Const String_Version As String = "v 0.7"
44
Public Const String_Project_Start As String = "24th August 2012"
5-
Public Const String_Version_Release As String = "29th August 2012"
5+
Public Const String_Version_Release As String = "Not Yet"
66

77
Public Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
88
'This subroutine is used when GLOSSARY IS ENDED
@@ -116,5 +116,8 @@
116116
Public Sub RadioButton6_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton6.CheckedChanged
117117
RadioButton6_Checked() 'Leave this alone
118118
End Sub
119+
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
120+
Button3_Clicked() 'Leave this alone
121+
End Sub
119122
'LEAVE ALONE TILL HERE
120123
End Class
Lines changed: 87 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,98 @@
11
Module Glossary_Content_Control
22
Public Sub AddKeywords()
3+
'First Batch of Glossary Keywords
34
Form1.Lessons.Items.Clear()
4-
Form1.Lessons.Items.Add("None Added")
5+
Form1.Lessons.Items.Add("Tool")
6+
Form1.Lessons.Items.Add("Open Source")
7+
Form1.Lessons.Items.Add("IDE")
8+
Form1.Lessons.Items.Add("Glossary")
9+
Form1.Lessons.Items.Add("Keywords")
10+
Form1.Lessons.Items.Add("Libraries")
11+
Form1.Lessons.Items.Add("Functions")
12+
Form1.Lessons.Items.Add("Code:Blocks")
13+
Form1.Lessons.Items.Add("Tooltip")
14+
Form1.Lessons.Items.Add("Code:Blocks Shortcuts")
15+
Form1.Lessons.Items.Add("Programming")
16+
Form1.Lessons.Items.Add("C Language")
17+
Form1.Lessons.Items.Add("Use of C Language")
18+
Form1.Lessons.Items.Add("Integrated Development Environment")
19+
Form1.Lessons.Items.Add("C Software")
20+
Form1.Lessons.Items.Add("Compiler")
21+
Form1.Lessons.Items.Add("Code")
22+
Form1.Lessons.Items.Add("C Code")
23+
Form1.Lessons.Items.Add("Source Code")
24+
Form1.Lessons.Items.Add("Escape Identifiers")
25+
Form1.Lessons.Items.Add("New Line")
26+
Form1.Lessons.Items.Add("Line Break")
27+
Form1.Lessons.Items.Add("Tab Feed")
28+
Form1.Lessons.Items.Add("Comments")
29+
30+
'Second Batch of Glossary Keywords
31+
532
End Sub
633

734

835
Public Sub AddLibraries()
936
Form1.Lessons.Items.Clear()
1037
Form1.Lessons.Items.Add("None Added")
1138
End Sub
39+
40+
'The reason that I am using strings for all the keywords is because
41+
'Many of them are synonyms and will display the same thing
42+
Public Sub Button3_Clicked()
43+
Select Case Form1.Lessons.SelectedItem
44+
'First Batch of Glossary Keywords
45+
Case "Tool"
46+
Form1.Display.Text = String_Tool
47+
Case "Open Source"
48+
Form1.Display.Text = String_Open_Source
49+
Case "IDE"
50+
Form1.Display.Text = String_Tool
51+
Case "Glossary"
52+
Form1.Display.Text = String_Glossarys
53+
Case "Keywords"
54+
Form1.Display.Text = String_Glossarys
55+
Case "Libraries"
56+
Form1.Display.Text = String_Libraries
57+
Case "Functions"
58+
Form1.Display.Text = String_Libraries
59+
Case "Code:Blocks"
60+
Form1.Display.Text = String_Tool
61+
Case "Tooltip"
62+
Form1.Display.Text = String_Tooltip
63+
Case "Code:Blocks Shortcuts"
64+
Form1.Display.Text = String_Code_Blocks_Shortcuts
65+
Case "Programming"
66+
Form1.Display.Text = String_Programming
67+
Case "C Language"
68+
Form1.Display.Text = String_C_Language
69+
Case "Use of C Language"
70+
Form1.Display.Text = String_C_Language
71+
Case "Integrated Development Environment"
72+
Form1.Display.Text = String_Tool
73+
Case "C Software"
74+
Form1.Display.Text = String_Tool
75+
Case "Compiler"
76+
Form1.Display.Text = String_Tool
77+
Case "Code"
78+
Form1.Display.Text = String_Code
79+
Case "C Code"
80+
Form1.Display.Text = String_Code
81+
Case "Source Code"
82+
Form1.Display.Text = String_Code
83+
Case "Escape Identifiers"
84+
Form1.Display.Text = String_Escape_Identifiers
85+
Case "New Line"
86+
Form1.Display.Text = String_Escape_Identifiers
87+
Case "Line Break"
88+
Form1.Display.Text = String_Escape_Identifiers
89+
Case "Tab Feed"
90+
Form1.Display.Text = String_Escape_Identifiers
91+
Case "Comments"
92+
Form1.Display.Text = String_Comments
93+
94+
'Second Batch of Glossary Keywords
95+
96+
End Select
97+
End Sub
1298
End Module
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Module Glossary_Strings
2+
'First Batch of Glossary Keywords
3+
Public Const String_Tool As String = "Keywords:-" & Chr(13) & "Tool, IDE, Code:Blocks, Integrated Development Environment, C Software, Compiler" & Chr(13) & "" & Chr(13) & "Introduction:-" & Chr(13) & "When making softwares using C Language a software called IDE(Integrated Development Environment) is generally used. It is the most common type of C software used. It is actually a collection of various softwares which are needed to properly convert a C code into an executable program." & Chr(13) & "" & Chr(13) & "Code:Blocks, the software that you are using is also an IDE. It is a free software and there are various versions for different Operating Systems like Windows, Linux, Mac." & Chr(13) & "" & Chr(13) & "This is not the only IDE present. There are many different IDEs. Some of them are free but there are many for which you have to pay money to use them." & Chr(13) & "" & Chr(13) & "There are many parts of an IDE. " & Chr(13) & "The two main parts that we usually deal with are the text editor and the compiler. The text editor is the part in which you type the code. Notepad is a simple example of a text editor. The other one - ""compiler"" is a type of software that you will mostly see when doing programming. It is a software that converts the code written in C language into instructions for the computer in the computer's ""machine language""." & Chr(13) & "" & Chr(13) & "When we press F9 in codeblocks we are actually starting the compile process. Compiler runs, converts C language into machine language and then we get our program."
4+
Public Const String_Open_Source As String = ""
5+
Public Const String_Glossarys As String = "Keywords:-" & Chr(13) & "Glossary, Keywords" & Chr(13) & "" & Chr(13) & "Meaning:-" & Chr(13) & "Keywords are those words that are seen mostly in a particular field. For example you will come across the word IDE most of the times when you are programming. So, IDE is a keyword related to programming" & Chr(13) & "" & Chr(13) & "Glossary means a list of terms in a particular field. A glossary is generally alphabetically arranged. For example this software has two glossaries:-" & Chr(13) & "1. Glossary of Keywords" & Chr(13) & " It contains an alphabetical list of keywords related to general programming, C language and the software used for making C software. Some other keywords are also present in it." & Chr(13) & "2. Glossary of Libraries And Functions" & Chr(13) & " It contains an alphabetical list of libraries and functions used in C lnaguage."
6+
Public Const String_Libraries As String = ""
7+
Public Const String_Tooltip As String = "Keywords:-" & Chr(13) & "Tooltip" & Chr(13) & "" & Chr(13) & "Where is this thing?" & Chr(13) & "When you start CodeBlocks you must have seen a windows that opens everytime. It has the heading 'ToolTip'. " & Chr(13) & "If it does not start when you start CodeBlocks then you can start it by going to Help Menu->Tips and then Tick the box ""Show Tips at Startup""." & Chr(13) & "" & Chr(13) & "So what is this tooltip?" & Chr(13) & "Tooltip is an a group of advices that the software shows you everytime. These tips contain information about how software works, about the shortcuts that you can use. In short tooltips display things that can make it easier for you to use the software."
8+
Public Const String_Code_Blocks_Shortcuts As String = "Keywords:-" & Chr(13) & "Code:Blocks Shortcuts" & Chr(13) & "" & Chr(13) & "1. Ctrl + Shift + N" & Chr(13) & "It can be used to create a new empty file" & Chr(13) & "" & Chr(13) & "2. Ctrl + D" & Chr(13) & "A. If used without selecting anything then the text of current line gets copied and pasted as-it-is in the next line" & Chr(13) & "B. If used after selecting some text then the selected text is copied and pasted where the selection ends" & Chr(13) & "" & Chr(13) & "3. Hold Ctrl and press Tab" & Chr(13) & "Is used to shift quickly between different files inside Code:blocks when more than one Source Codes are open." & Chr(13) & "" & Chr(13) & "4. F9" & Chr(13) & "Build And Run. Press this and if your Source Code has no syntax errors then your program will run"
9+
Public Const String_Programming As String = "Keywords:-" & Chr(13) & "Programming" & Chr(13) & "" & Chr(13) & "About:-" & Chr(13) & "Writing C Code is programming. " & Chr(13) & "Writing Codes in any computer language is programming." & Chr(13) & "" & Chr(13) & "Have you seen the apps on facebbok or the apps in android market?" & Chr(13) & "They are also made by programming. They were made by writing codes."
10+
Public Const String_C_Language As String = "Keywords:-" & Chr(13) & "C Language, Use of C Language" & Chr(13) & "" & Chr(13) & "About:-" & Chr(13) & "C Language is a general purpose programming language. It is widely used. Its main application areas include Operating System implementation and Embedded Systems. One of the main reasons of C language's popularity is its high-speed."
11+
Public Const String_Code As String = "Keywords:-" & Chr(13) & "Code, C Code, Source Code" & Chr(13) & "" & Chr(13) & "Introduction:-" & Chr(13) & "To make a software we need to write something in some computer language. That ""something"" which is written is called the code of the software or the Source Code." & Chr(13) & "" & Chr(13) & "While making C softwares you write codes in C Language. That is the ""C Code"" which will be used to make your program." & Chr(13) & "" & Chr(13) & "The following is an example of a source code." & Chr(13) & "/*-----------------------------------------" & Chr(13) & "#include<stdio.h>" & Chr(13) & "" & Chr(13) & "void main()" & Chr(13) & "{" & Chr(13) & " printf(""AsD"");" & Chr(13) & "}" & Chr(13) & "------------------------------------------*/"
12+
Public Const String_Escape_Identifiers As String = "Keywords:-" & Chr(13) & "Escape Identifiers, New Line, Line Break, Tab Feed" & Chr(13) & "" & Chr(13) & "About:-" & Chr(13) & "When displaying something on the screen we have to use a function. The most common example is printf function. Inside such function there is a string of characters starting and ending with a quote(""). Whatever we wish to display can be written between the quotes. " & Chr(13) & "But if want something else to happen. Something like going into the next line or introducing a tab we have to use some special characters. These special characters are called escape identifiers. They start with backslash(\). Two examples are \n and \t." & Chr(13) & "" & Chr(13) & "\n (New Line or Line Break)" & Chr(13) & "When we write this inside a printing statement the characters appearing after this are dislayed in the next line." & Chr(13) & "" & Chr(13) & "\t(Tab Feed)" & Chr(13) & "When we write this inside a printing statement the characters appearing after this are dislayed after a tab."
13+
Public Const String_Comments As String = "Keywords:-" & Chr(13) & "Comments" & Chr(13) & "" & Chr(13) & "Comments are used in programming languages for many things:-" & Chr(13) & "1. Make the Code easy to read. " & Chr(13) & "This is done by entering comments with every different logic implemented. Simply writing what a particular piece of code does makes the code easier to read." & Chr(13) & "2. Commenting Out part of the Code. " & Chr(13) & "Any Code placed inside comments does not affect the program. It becomes inactive. So it is possible to let some code remain in your Source Code which is actually inactive. This is called commenting out part of the code. The part of the code inside the comments is OUT OF WORKING."
14+
15+
'Second Batch of Glossary Keywords
16+
17+
End Module

0 commit comments

Comments
 (0)